PyPO User Manual
MemUtils.h File Reference

Utility class for CUDA memory allocations. More...

#include <iostream>
#include <vector>
#include <cuda.h>
#include <cuComplex.h>

Go to the source code of this file.

Classes

class  MemUtils
 

Macros

#define gpuErrchk(ans)   { gpuAssert((ans), __FILE__, __LINE__); }
 

Functions

void gpuAssert (cudaError_t code, const char *file, int line, bool abort=true)
 

Detailed Description

Utility class for CUDA memory allocations.

Contains often used memory allocation/copy/deallocation operations between host and device.

Function Documentation

◆ gpuAssert()

void gpuAssert ( cudaError_t  code,
const char *  file,
int  line,
bool  abort = true 
)
inline

Check CUDA API error status of call.

Wrapper for finding errors in CUDA API calls.

Parameters
codeThe errorcode returned from failed API call.
fileThe file in which failure occured.
lineThe line in file in which error occured.
abortExit code upon error.