LvArray
Namespaces | Functions
umpireInterface.hpp File Reference

Contains the LvArray umpire interface. This is only used to keep umpire/ResourceManager.hpp out of the includes for most headers. More...

#include <camp/resource.hpp>
Include dependency graph for umpireInterface.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 LvArray
 The top level namespace.
 

Functions

void LvArray::umpireInterface::copy (void *const dstPointer, void *const srcPointer, std::size_t const size)
 Use memcpy to copy srcPointer in to dstPointer. More...
 
camp::resources::Event LvArray::umpireInterface::copy (void *const dstPointer, void *const srcPointer, camp::resources::Resource &resource, std::size_t const size)
 Use memcpy to (maybe asynchronously) copy src in to dst. More...
 
void LvArray::umpireInterface::memset (void *const dstPointer, int const val, std::size_t const size)
 Use memset to set the bytes of dstPointer. More...
 

Detailed Description

Contains the LvArray umpire interface. This is only used to keep umpire/ResourceManager.hpp out of the includes for most headers.

Function Documentation

◆ copy() [1/2]

void LvArray::umpireInterface::copy ( void *const  dstPointer,
void *const  srcPointer,
std::size_t const  size 
)

Use memcpy to copy srcPointer in to dstPointer.

Parameters
dstPointerThe destination pointer.
srcPointerThe source pointer.
sizeThe number of bytes to copy.

If both src and dst were allocated with Umpire then the Umpire ResouceManager is used to perform the copy, otherwise std::memcpy is used.

◆ copy() [2/2]

camp::resources::Event LvArray::umpireInterface::copy ( void *const  dstPointer,
void *const  srcPointer,
camp::resources::Resource &  resource,
std::size_t const  size 
)

Use memcpy to (maybe asynchronously) copy src in to dst.

Parameters
dstPointerThe destination slice.
srcPointerThe source slice.
resourceThe resource to use.
sizeThe number of bytes to copy.
Returns
The event corresponding to the copy.

If both src and dst were allocated with Umpire then the Umpire ResouceManager is used to perform the copy, otherwise std::memcpy is used. Umpire does not currently support asynchronous copying with host resources, in fact it does not even support synchronous copying with host resources. As such if a resource wraps a resource of type camp::resouces::Host the method that doesn't take a resource is used.

◆ memset()

void LvArray::umpireInterface::memset ( void *const  dstPointer,
int const  val,
std::size_t const  size 
)

Use memset to set the bytes of dstPointer.

Parameters
dstPointerThe destination pointer.
valThe value (converted to a char) to set.
sizeThe number of bytes to set.

If both src and dst were allocated with Umpire then the Umpire ResouceManager is used to perform the memset, otherwise std::memcpy is used.