CmdWaitOnFences#

Fully qualified name: cupva::CmdWaitOnFences

Defined in src/host/cpp_api/include/cupva_host.hpp

class CmdWaitOnFences : public cupva::BaseCmd#

CmdWaitOnFences is blocking the stream processing until fences expire.

Submitting CmdWaitOnFences to a Stream ensures that all subsequent Commands wait for Fence expiration before executing. Note that this wait occurs at the device level; creating and submitting CmdWaitOnFences is asynchronous to the host.

If a Stream submission begins with a CmdWaitOnFences, the device will wait for these fences to be signalled before starting the execution timer. If no execution timer is specified, a submission can only complete if all fences waited on by CmdWaitOnFences in a submission are signalled.

Public Functions

CmdWaitOnFences() noexcept#

Construct a new, uninitialized object.

This constructor allows declaring stl containers. Commands should be initialized before submitting to streams.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

explicit CmdWaitOnFences(const Fence &fence) noexcept#

Construct a new object.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

Parameters:

fence – The reference to the fence to wait on.

CmdWaitOnFences(const Fence *const fences, int32_t const count)#

Construct a new object.

Wait on an array of fences to expire.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

Parameters:
  • fences – The pointer to the fence array.

  • count – The number of fences in the array.

Throws:

cupva::Exception(InvalidArgument) – if MAX_CMD_WAIT_ON_FENCES_ARRAY_SIZE < count <= 0

~CmdWaitOnFences() noexcept#

Destroy the object.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

CmdWaitOnFences(CmdWaitOnFences const&) = delete#
CmdWaitOnFences &operator=(CmdWaitOnFences const&) & = delete#
CmdWaitOnFences(CmdWaitOnFences &&obj) noexcept#

Move constructor.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

CmdWaitOnFences &operator=(CmdWaitOnFences &&obj) & noexcept#

Move assignment.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

void finalize()#

Destroy the resources created by a BaseCmd object.

This method is exposed to allow fine-grained control over error handling.

During destruction of the object, this method will be called but the destructor must not propagate exceptions. To handle exceptions, manually invoke this method prior to object destruction.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: No

  • API group

    • Init: No

    • Runtime: No

    • De-Init: Yes

Throws:
  • cupva::Exception(DriverAPIError) – if driver returns error during de-initialization of mapped/pinned memory

  • cupva::Exception(NotAllowedInOperationalState) – if called when NVIDIA DRIVE OS VM state is “Operational”