UMPIRE
Umpire: resource management and provision
umpire::op::CudaCopyOperation Class Reference

Copy operation to move data between two GPU addresses. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/umpire/checkouts/develop/src/umpire/op/CudaCopyOperation.hpp>

Inheritance diagram for umpire::op::CudaCopyOperation:

Public Member Functions

 CudaCopyOperation (cudaMemcpyKind kind)
 
void transform (void *src_ptr, void **dst_ptr, umpire::util::AllocationRecord *src_allocation, umpire::util::AllocationRecord *dst_allocation, std::size_t length)
 Transform length bytes of memory from src_ptr to dst_ptr. More...
 
camp::resources::EventProxy< camp::resources::Resourcetransform_async (void *src_ptr, void **dst_ptr, util::AllocationRecord *src_allocation, util::AllocationRecord *dst_allocation, std::size_t length, camp::resources::Resource &ctx)
 
virtual 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. More...
 
virtual camp::resources::EventProxy< camp::resources::Resourceapply_async (void *src_ptr, util::AllocationRecord *src_allocation, int val, std::size_t length, camp::resources::Resource &ctx)
 

Detailed Description

Copy operation to move data between two GPU addresses.

Constructor & Destructor Documentation

◆ CudaCopyOperation()

umpire::op::CudaCopyOperation::CudaCopyOperation ( cudaMemcpyKind  kind)

Member Function Documentation

◆ transform()

void umpire::op::CudaCopyOperation::transform ( void *  src_ptr,
void **  dst_ptr,
umpire::util::AllocationRecord src_allocation,
umpire::util::AllocationRecord dst_allocation,
std::size_t  length 
)
virtual

Transform length bytes of memory from src_ptr to dst_ptr.

Uses cudaMemcpy to move data when both src_ptr and dst_ptr are on NVIDIA GPUs.

Parameters
src_ptrPointer to source memory location.
dst_ptrPointer to destinatino memory location.
src_allocationAllocationRecord of source.
dst_allocationAllocationRecord of destination.
lengthNumber of bytes to transform.
Exceptions
util::runtime_error

Reimplemented from umpire::op::MemoryOperation.

References umpire::error(), and UMPIRE_ERROR.

◆ transform_async()

camp::resources::EventProxy< camp::resources::Resource > umpire::op::CudaCopyOperation::transform_async ( void *  src_ptr,
void **  dst_ptr,
util::AllocationRecord src_allocation,
util::AllocationRecord dst_allocation,
std::size_t  length,
camp::resources::Resource ctx 
)
virtual

◆ apply()

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

Apply val to the first length bytes of src_ptr.

Parameters
src_ptrPointer to source memory location.
src_allocationAllocationRecord of source.
valValue to apply.
lengthNumber of bytes to modify.
Exceptions
util::runtime_error

Reimplemented in umpire::op::HipAdviseOperation, umpire::op::CudaAdviseOperation, umpire::op::SyclMemsetOperation, umpire::op::HipMemsetOperation, umpire::op::CudaMemsetOperation, umpire::op::HostMemsetOperation, umpire::op::SyclMemPrefetchOperation, umpire::op::OpenMPTargetMemsetOperation, and umpire::op::CudaMemPrefetchOperation.

References UMPIRE_ERROR.

Referenced by umpire::op::MemoryOperation::apply_async().

◆ apply_async()

camp::resources::EventProxy< camp::resources::Resource > umpire::op::MemoryOperation::apply_async ( void *  src_ptr,
util::AllocationRecord src_allocation,
int  val,
std::size_t  length,
camp::resources::Resource ctx 
)
virtualinherited