HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CudaUtils.h File Reference
#include <cuda.h>
#include <cuda_runtime_api.h>
+ Include dependency graph for CudaUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define cudaCheck(ans)
 
#define checkPtr(ptr, msg)
 
#define cudaSync()
 
#define cudaCheckError()
 

Functions

cudaError_t cudaMallocAsync (void **d_ptr, size_t size, cudaStream_t)
 Dummy implementation of cudaMallocAsync that calls cudaMalloc. More...
 
cudaError_t cudaFreeAsync (void *d_ptr, cudaStream_t)
 Dummy implementation of cudaFreeAsync that calls cudaFree. More...
 

Macro Definition Documentation

#define checkPtr (   ptr,
  msg 
)
Value:
{ \
ptrAssert((ptr), (msg), __FILE__, __LINE__); \
}
auto ptr(T p) -> const void *
Definition: format.h:2448

Definition at line 41 of file CudaUtils.h.

#define cudaCheck (   ans)
Value:
{ \
gpuAssert((ans), __FILE__, __LINE__); \
}

Definition at line 36 of file CudaUtils.h.

#define cudaCheckError ( )
Value:
{ \
cudaCheck(cudaGetLastError()); \
}
#define cudaCheck(ans)
Definition: CudaUtils.h:36

Definition at line 51 of file CudaUtils.h.

#define cudaSync ( )
Value:
{ \
cudaCheck(cudaDeviceSynchronize()); \
}
#define cudaCheck(ans)
Definition: CudaUtils.h:36

Definition at line 46 of file CudaUtils.h.

Function Documentation

cudaError_t cudaFreeAsync ( void d_ptr,
cudaStream_t   
)
inline

Dummy implementation of cudaFreeAsync that calls cudaFree.

Parameters
d_ptrDevice pointer that will be freed
dummyThe stream establishing the stream ordering promise (ignored)
Returns
Cuda error code

Definition at line 69 of file CudaUtils.h.

cudaError_t cudaMallocAsync ( void **  d_ptr,
size_t  size,
cudaStream_t   
)
inline

Dummy implementation of cudaMallocAsync that calls cudaMalloc.

Parameters
d_ptrDevice pointer to allocated device memory
sizeNumber of bytes to allocate
dummyThe stream establishing the stream ordering contract and the memory pool to allocate from (ignored)
Returns
Cuda error code

Definition at line 63 of file CudaUtils.h.