SequenceDataFlow#
Fully qualified name: cupva::SequenceDataFlow
Defined in src/host/cpp_api/include/cupva_host.hpp
-
class SequenceDataFlow : public cupva::BaseDataFlow#
SequenceDataFlow describes data transfers which execute sequentially.
SequenceDataFlow is a sequence of data transfers. When the sequence completes, device code can choose to begin the sequence again or close the transfer. Each time the sequence begins, a limited set of parameters may be dynamically modified from device code. Refer to device side API documentation for details on dynamically modifying parameters.
All DataFlows should be created by invoking methods on cupva::CmdProgram. DataFlows are owned by CmdProgram objects. User should only operate on DataFlows via non-owning references returned by CmdProgram objects.
Public Functions
-
SequenceDataFlow &handler(const Parameter &handler)#
Set the SequenceDataFlow handler.
The handler is an area of VMEM which is used to call device side methods. Specifying a handler is mandatory, failure to do so will cause an error during DMA compilation.
In device code, use VMEM_SEQDF_HANDLER to declare the handler.
Usage considerations
Allowed context for the API call
Thread-safe: No
API group
Init: Yes
Runtime: No
De-Init: No
- Parameters:
handler – The handler defined in VMEM and represented by the host parameter
- Throws:
cupva::Exception(InvalidState) – The object is not instantiated correctly
- Returns:
SequenceDataFlow& The reference to current object
-
SequenceDataFlowTransfer addTransfer()#
Add a new transfer to the sequence.
Each SequenceDataFlow must have at least 1 SequenceDataFlowTransfer and may have up to MAXIMUM_TRANSFERS.
If a single SequenceDataFlow will be used for both reads to VMEM and writes from VMEM via dynamic reconfiguration in device code, at least one read and one write SequenceDataFlowTransfers must be added with this API.
Usage considerations
Allowed context for the API call
Thread-safe: Yes
API group
Init: Yes
Runtime: No
De-Init: No
- Throws:
cupva::Exception(InvalidArgument) – The SequenceDataFlow already holds the maximum number of SequenceDataFlowTransfers
cupva::Exception(InvalidState) – The object is not instantiated correctly
- Returns:
SequenceDataFlowTransfer& reference to the new transfer
Public Static Attributes
-
static constexpr int32_t MAXIMUM_TRANSFERS = {8}#
Maximum number of transfers which may be added to a SequenceDataFlow.
-
SequenceDataFlow &handler(const Parameter &handler)#