CmdL2Ops#

Fully qualified name: cupva::CmdL2Ops

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

class CmdL2Ops : public cupva::BaseCmd#

Command to perform L2 memory coherence operations.

This command can be submitted to a stream to perform operations on L2 memory allocations. It allows control over how L2 memory is managed for coherency between different processing units. Operations include flushing, invalidating, or flushing and invalidating for specified L2SRAM device pointer.

Please refer to L2OperationType for more details and usage examples.

CmdL2Ops API requires driver version >= 2007.

Public Functions

CmdL2Ops() noexcept#

Construct a default object of CmdL2Ops.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

CmdL2Ops(CmdL2Ops &&obj) noexcept#

Move constructor.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

Parameters:

obj – The object to move from.

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

Move assignment operator.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: No

    • Runtime: Yes

    • De-Init: No

Parameters:

obj – The object to move from.

Returns:

CmdL2Ops& Reference to this object.

CmdL2Ops(CmdL2Ops const&) = delete#

Copy constructor (deleted).

CmdL2Ops &operator=(CmdL2Ops const&) & = delete#

Copy assignment operator (deleted).

~CmdL2Ops() noexcept#

Destroy the CmdL2Ops object.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: No

    • Runtime: No

    • De-Init: Yes

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”

Public Static Functions

static CmdL2Ops Create(
cupva::mem::L2OperationType const opType,
void *const devptr,
)#

Create a CmdL2Ops object.

Creates a command that performs the specified L2 operation on the given device pointer.

Usage considerations

  • Allowed context for the API call

    • Thread-safe: Yes

  • API group

    • Init: Yes

    • Runtime: No

    • De-Init: No

Parameters:
  • opType – The type of L2 operation to perform (FLUSH, INVALIDATE, or FLUSH_AND_INVALIDATE)

  • devptr – The device pointer to perform the operation on

Throws:

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

Returns:

CmdL2Ops A new command object