QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Namespaces | Macros | Functions
quda_cuda_api.h File Reference
#include <cuda.h>
#include <cuda_runtime.h>
#include <quda_cuda_api.h>
Include dependency graph for quda_cuda_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 quda
 

Macros

#define STRINGIFY__(x)   #x
 
#define __STRINGIFY__(x)   STRINGIFY__(x)
 
#define qudaMemcpy(dst, src, count, kind)   ::quda::qudaMemcpy_(dst, src, count, kind, __func__, quda::file_name(__FILE__), __STRINGIFY__(__LINE__));
 
#define STRINGIFY__(x)   #x
 
#define __STRINGIFY__(x)   STRINGIFY__(x)
 
#define qudaMemcpyAsync(dst, src, count, kind, stream)   ::quda::qudaMemcpyAsync_(dst, src, count, kind, stream, __func__, quda::file_name(__FILE__), __STRINGIFY__(__LINE__));
 
#define STRINGIFY__(x)   #x
 
#define __STRINGIFY__(x)   STRINGIFY__(x)
 
#define qudaMemcpy2DAsync(dst, dpitch, src, spitch, width, height, kind, stream)   ::quda::qudaMemcpy2DAsync_(dst, dpitch, src, spitch, width, height, kind, stream, __func__, quda::file_name(__FILE__), __STRINGIFY__(__LINE__));
 
#define STRINGIFY__(x)   #x
 
#define __STRINGIFY__(x)   STRINGIFY__(x)
 
#define qudaDeviceSynchronize()   ::quda::qudaDeviceSynchronize_(__func__, quda::file_name(__FILE__), __STRINGIFY__(__LINE__));
 

Functions

void quda::qudaMemcpy_ (void *dst, const void *src, size_t count, cudaMemcpyKind kind, const char *func, const char *file, const char *line)
 Wrapper around cudaMemcpy used for auto-profiling. Do not call directly, rather call macro below which will grab the location of the call. More...
 
void quda::qudaMemcpyAsync_ (void *dst, const void *src, size_t count, cudaMemcpyKind kind, const cudaStream_t &stream, const char *func, const char *file, const char *line)
 Wrapper around cudaMemcpyAsync or driver API equivalent Potentially add auto-profiling support. More...
 
void quda::qudaMemcpy2DAsync_ (void *dst, size_t dpitch, const void *src, size_t spitch, size_t width, size_t hieght, cudaMemcpyKind kind, const cudaStream_t &stream, const char *func, const char *file, const char *line)
 Wrapper around cudaMemcpy2DAsync or driver API equivalent Potentially add auto-profiling support. More...
 
cudaError_t quda::qudaLaunchKernel (const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream)
 Wrapper around cudaLaunchKernel. More...
 
cudaError_t quda::qudaEventQuery (cudaEvent_t &event)
 Wrapper around cudaEventQuery or cuEventQuery. More...
 
cudaError_t quda::qudaEventRecord (cudaEvent_t &event, cudaStream_t stream=0)
 Wrapper around cudaEventRecord or cuEventRecord. More...
 
cudaError_t quda::qudaStreamWaitEvent (cudaStream_t stream, cudaEvent_t event, unsigned int flags)
 Wrapper around cudaEventRecord or cuEventRecord. More...
 
cudaError_t quda::qudaStreamSynchronize (cudaStream_t &stream)
 Wrapper around cudaStreamSynchronize or cuStreamSynchronize. More...
 
cudaError_t quda::qudaEventSynchronize (cudaEvent_t &event)
 Wrapper around cudaEventSynchronize or cuEventSynchronize. More...
 
cudaError_t quda::qudaDeviceSynchronize_ (const char *func, const char *file, const char *line)
 Wrapper around cudaDeviceSynchronize or cuDeviceSynchronize. More...
 
void quda::printAPIProfile ()
 Print out the timer profile for CUDA API calls. More...
 

Detailed Description

Wrappers around CUDA API function calls allowing us to easily profile and switch between using the CUDA runtime and driver APIs.

Definition in file quda_cuda_api.h.

Macro Definition Documentation

◆ __STRINGIFY__ [1/4]

#define __STRINGIFY__ (   x)    STRINGIFY__(x)

Definition at line 144 of file quda_cuda_api.h.

◆ __STRINGIFY__ [2/4]

#define __STRINGIFY__ (   x)    STRINGIFY__(x)

Definition at line 144 of file quda_cuda_api.h.

◆ __STRINGIFY__ [3/4]

#define __STRINGIFY__ (   x)    STRINGIFY__(x)

Definition at line 144 of file quda_cuda_api.h.

◆ __STRINGIFY__ [4/4]

#define __STRINGIFY__ (   x)    STRINGIFY__(x)

Definition at line 144 of file quda_cuda_api.h.

◆ qudaDeviceSynchronize

#define qudaDeviceSynchronize ( )    ::quda::qudaDeviceSynchronize_(__func__, quda::file_name(__FILE__), __STRINGIFY__(__LINE__));

◆ qudaMemcpy

#define qudaMemcpy (   dst,
  src,
  count,
  kind 
)    ::quda::qudaMemcpy_(dst, src, count, kind, __func__, quda::file_name(__FILE__), __STRINGIFY__(__LINE__));

◆ qudaMemcpy2DAsync

#define qudaMemcpy2DAsync (   dst,
  dpitch,
  src,
  spitch,
  width,
  height,
  kind,
  stream 
)    ::quda::qudaMemcpy2DAsync_(dst, dpitch, src, spitch, width, height, kind, stream, __func__, quda::file_name(__FILE__), __STRINGIFY__(__LINE__));

Definition at line 43 of file quda_cuda_api.h.

Referenced by quda::cudaColorSpinorField::sendGhost().

◆ qudaMemcpyAsync

#define qudaMemcpyAsync (   dst,
  src,
  count,
  kind,
  stream 
)    ::quda::qudaMemcpyAsync_(dst, src, count, kind, stream, __func__, quda::file_name(__FILE__), __STRINGIFY__(__LINE__));

◆ STRINGIFY__ [1/4]

#define STRINGIFY__ (   x)    #x

Definition at line 143 of file quda_cuda_api.h.

◆ STRINGIFY__ [2/4]

#define STRINGIFY__ (   x)    #x

Definition at line 143 of file quda_cuda_api.h.

◆ STRINGIFY__ [3/4]

#define STRINGIFY__ (   x)    #x

Definition at line 143 of file quda_cuda_api.h.

◆ STRINGIFY__ [4/4]

#define STRINGIFY__ (   x)    #x

Definition at line 143 of file quda_cuda_api.h.