Documentation ¶
Overview ¶
Package pipelining provides a pipeline definition.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
A Builder can build pipelines.
func (Builder) WithCyclePerStage ¶
WithCyclePerStage sets the the number of cycles that each element needs to stage in each stage.
func (Builder) WithNumStage ¶
WithNumStage sets the number of pipeline stages
func (Builder) WithPipelineWidth ¶
WithPipelineWidth sets the number of lanes in the pipeline. If width=4, 4 elements can be in the same stage at the same time.
type Pipeline ¶
type Pipeline interface { tracing.NamedHookable // Tick moves elements in the pipeline forward. Tick() (madeProgress bool) // CanAccept checks if the pipeline can accept a new element. CanAccept() bool // Accept adds an element to the pipeline. If the first pipeline stage is // currently occupied, this function panics. Accept(elem PipelineItem) // Clear discards all the items that are currently in the pipeline. Clear() }
Pipeline allows simulation designers to define pipeline structures.
type PipelineItem ¶
type PipelineItem interface {
TaskID() string
}
PipelineItem is an item that can pass through a pipeline.
Click to show internal directories.
Click to hide internal directories.