Class MemoryOperation

Inheritance Relationships

Derived Types

Class Documentation

class MemoryOperation

Base class of an operation on memory.

Neither the transfrom or apply methods are pure virtual, so inheriting classes only need overload the appropriate method. However, both methods will throw an error if called.

Subclassed by umpire::op::CudaAdviseAccessedByOperation, umpire::op::CudaAdvisePreferredLocationOperation, umpire::op::CudaAdviseReadMostlyOperation, umpire::op::CudaAdviseUnsetAccessedByOperation, umpire::op::CudaAdviseUnsetPreferredLocationOperation, umpire::op::CudaAdviseUnsetReadMostlyOperation, umpire::op::CudaCopyFromOperation, umpire::op::CudaCopyOperation, umpire::op::CudaCopyToOperation, umpire::op::CudaMemPrefetchOperation, umpire::op::CudaMemsetOperation, umpire::op::GenericReallocateOperation, umpire::op::HipCopyFromOperation, umpire::op::HipCopyOperation, umpire::op::HipCopyToOperation, umpire::op::HipMemsetOperation, umpire::op::HostCopyOperation, umpire::op::HostMemsetOperation, umpire::op::HostReallocateOperation, umpire::op::NumaMoveOperation

Public Functions

virtual ~MemoryOperation()
void transform(void *src_ptr, void **dst_ptr, util::AllocationRecord *src_allocation, util::AllocationRecord *dst_allocation, std::size_t length)

Transfrom length bytes of memory from src_ptr to dst_ptr.

Parameters
  • src_ptr: Pointer to source memory location.

  • dst_ptr: Pointer to destinatino memory location.

  • src_allocation: AllocationRecord of source.

  • dst_allocation: AllocationRecord of destination.

  • length: Number of bytes to transform.

Exceptions

void apply(void *src_ptr, util::AllocationRecord *src_allocation, int val, std::size_t length)

Apply val to the first length bytes of src_ptr.

Parameters
  • src_ptr: Pointer to source memory location.

  • src_allocation: AllocationRecord of source.

  • val: Value to apply.

  • length: Number of bytes to modify.

Exceptions