PyPO User Manual
MemUtils Class Reference

Public Member Functions

std::vector< float * > cuMallFloat (int &n, int &size)
 
std::vector< float * > cuMallFloatStack (int &n, int &size)
 
std::vector< cuFloatComplex * > cuMallComplex (int &n, int &size)
 
std::vector< cuFloatComplex * > cuMallComplexStack (int &n, int &size)
 
void cuMemCpFloat (std::vector< float * > vecFloat, std::vector< float * > vecData, int &size, bool H2D=true)
 
void cuMemCpComplex (std::vector< cuFloatComplex * > vecFloat, std::vector< cuFloatComplex * > vecData, int &size, bool H2D=true)
 
void deallocFloatHost (std::vector< float * > vecFloat)
 
void deallocComplexHost (std::vector< cuFloatComplex * > vecFloat)
 

Member Function Documentation

◆ cuMallComplex()

std::vector< cuFloatComplex * > MemUtils::cuMallComplex ( int &  n,
int &  size 
)
inline

Allocate memory for cuFloatComplex on GPU and return pointers.

Parameters
nNumber of pointers to allocate on GPU.
sizeNumber of elements to allocate.
Returns
out Vector containing GPU-allocated pointers.

◆ cuMallComplexStack()

std::vector< cuFloatComplex * > MemUtils::cuMallComplexStack ( int &  n,
int &  size 
)
inline

Allocate memory for cuFloatComplex on local stack and return pointers.

Parameters
nNumber of pointers to allocate on GPU.
sizeNumber of elements to allocate.
Returns
out Vector containing stack-allocated pointers.

◆ cuMallFloat()

std::vector< float * > MemUtils::cuMallFloat ( int &  n,
int &  size 
)
inline

Allocate memory for floats on GPU and return pointers.

Parameters
nNumber of pointers to allocate on GPU.
sizeNumber of elements to allocate.
Returns
out Vector containing GPU-allocated pointers.

◆ cuMallFloatStack()

std::vector< float * > MemUtils::cuMallFloatStack ( int &  n,
int &  size 
)
inline

Allocate memory for floats on host stack and return pointers.

Parameters
nNumber of pointers to allocate on stack.
sizeNumber of elements to allocate.
Returns
out Vector containing stack-allocated pointers.

◆ cuMemCpComplex()

void MemUtils::cuMemCpComplex ( std::vector< cuFloatComplex * >  vecFloat,
std::vector< cuFloatComplex * >  vecData,
int &  size,
bool  H2D = true 
)
inline

Copy local arrays of cuFloatComplex to allocated memory on GPU.

Parameters
vecFloatVector containing allocated pointers to arrays of floats.
vecDataVector containing pointers to local arrays.
sizeNumber of elements to copy.
H2DDirection of copy. If true (default), copy from host to device. If false, copy from device to host.

◆ cuMemCpFloat()

void MemUtils::cuMemCpFloat ( std::vector< float * >  vecFloat,
std::vector< float * >  vecData,
int &  size,
bool  H2D = true 
)
inline

Copy local arrays of floats to allocated memory on GPU.

Parameters
vecFloatVector containing allocated pointers to arrays of floats.
vecDataVector containing pointers to local arrays.
sizeNumber of elements to copy.
H2DDirection of copy. If true (default), copy from host to device. If false, copy from device to host.

◆ deallocComplexHost()

void MemUtils::deallocComplexHost ( std::vector< cuFloatComplex * >  vecFloat)
inline

Deallocate local arrays of floats.

Parameters
vecFloatVector containing pointers to local arrays to deallocate.

◆ deallocFloatHost()

void MemUtils::deallocFloatHost ( std::vector< float * >  vecFloat)
inline

Deallocate local arrays of cuFloatComplex.

Parameters
vecFloatVector containing pointers to local arrays to deallocate.

The documentation for this class was generated from the following file: