CmdL2Ops#

Fully qualified name: cupva::CmdL2Ops

Defined in 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.

  • Maturity: GA

Public Functions

CmdL2Ops() noexcept#

Construct a default object of CmdL2Ops.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: Yes

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Pre:

None

CmdL2Ops(CmdL2Ops &&obj) noexcept#

Move constructor.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: Yes

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Parameters:

obj – The object to move from.

Pre:

None

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

Move assignment operator.

Usage considerations

  • Allowed context for the API call

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: Yes

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: Yes

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Parameters:

obj – The object to move from.

Returns:

CmdL2Ops& Reference to this object.

Pre:

None

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

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: Yes

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: No

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

Pre:

None

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

    • Interrupt handler: No

    • Signal handler: No

    • Thread-safe: Yes

    • Re-entrant: No

    • Async/Sync: Sync

  • Required privileges: None

  • Allowed execution state

    • Initialization: Yes

    • Operational: No

    • Reinit/Deinit Preparation: Yes

  • Maturity: GA

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

Pre:

None