Proto  3.2
Classes | Macros | Functions
Proto_Macros.H File Reference
#include "Proto_MemType.H"
#include "Proto_CPU.H"
Include dependency graph for Proto_Macros.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dim3
 

Macros

#define protoStream_t   int
 
#define protoGetCurrentStream   0
 
#define protoMalloc(memtype, PTR, NBYTES)   protoMallocCPU(PTR,NBYTES)
 
#define protoFree(memtype, PTR)   protoFreeCPU(PTR)
 
#define protoMemcpy(memtype, to, from, size, copyType)   protoMemcpyCPU((char*)to,(char*)from,size,copyType)
 
#define protoMemcpyAsync(memtype, to, from, size, copyType, stream)   protoMemcpyAsyncCPU(to,from,size,copyType,stream)
 
#define protoMemcpyFromSymbol(memtype, a, b, c, d, e)   protoMemcpyFromSymbolCPU(a,b,c,d,e)
 
#define protoMemcpyToSymbol(memtype, a, b, c, d, e)   protoMemcpyToSymbolCPU(a,b,c,d,e)
 
#define protoDeviceSynchronize(memtype)   protoDeviceSynchronizeCPU()
 

Functions

template<Proto::MemType Type, typename Ker , typename... Args>
void protoLaunchKernelT (int nBlocks, int nbThreads, const Args &... args)
 
template<Proto::MemType Type, typename Ker , typename... Args>
void protoLaunchKernelT (dim3 nBlocks, int nbThreads, const Args &... args)
 
template<Proto::MemType Type, typename Ker , typename... Args>
void protoLaunchKernelMemAsyncT (dim3 nBlocks, int nbThreads, int smem, protoStream_t stream, const Args &... args)
 

Macro Definition Documentation

◆ protoStream_t

#define protoStream_t   int

◆ protoGetCurrentStream

#define protoGetCurrentStream   0

◆ protoMalloc

#define protoMalloc (   memtype,
  PTR,
  NBYTES 
)    protoMallocCPU(PTR,NBYTES)

◆ protoFree

#define protoFree (   memtype,
  PTR 
)    protoFreeCPU(PTR)

◆ protoMemcpy

#define protoMemcpy (   memtype,
  to,
  from,
  size,
  copyType 
)    protoMemcpyCPU((char*)to,(char*)from,size,copyType)

◆ protoMemcpyAsync

#define protoMemcpyAsync (   memtype,
  to,
  from,
  size,
  copyType,
  stream 
)    protoMemcpyAsyncCPU(to,from,size,copyType,stream)

◆ protoMemcpyFromSymbol

#define protoMemcpyFromSymbol (   memtype,
  a,
  b,
  c,
  d,
 
)    protoMemcpyFromSymbolCPU(a,b,c,d,e)

◆ protoMemcpyToSymbol

#define protoMemcpyToSymbol (   memtype,
  a,
  b,
  c,
  d,
 
)    protoMemcpyToSymbolCPU(a,b,c,d,e)

◆ protoDeviceSynchronize

#define protoDeviceSynchronize (   memtype)    protoDeviceSynchronizeCPU()

Function Documentation

◆ protoLaunchKernelT() [1/2]

template<Proto::MemType Type, typename Ker , typename... Args>
void protoLaunchKernelT ( int  nBlocks,
int  nbThreads,
const Args &...  args 
)
inline

◆ protoLaunchKernelT() [2/2]

template<Proto::MemType Type, typename Ker , typename... Args>
void protoLaunchKernelT ( dim3  nBlocks,
int  nbThreads,
const Args &...  args 
)
inline

◆ protoLaunchKernelMemAsyncT()

template<Proto::MemType Type, typename Ker , typename... Args>
void protoLaunchKernelMemAsyncT ( dim3  nBlocks,
int  nbThreads,
int  smem,
protoStream_t  stream,
const Args &...  args 
)
inline

r/ #define protoLaunchKernelMem(memtype,Ker, nbBlocks, nbThreads, smem, args...) \ protoLaunchKernelMemCPU(Ker, nbBlocks, nbThreads, smem, args)

References Proto::DEVICE, GPU_CHECK, PRINT_KERNEL_NAME_ARGS, protoLaunchKernelT(), protoStream_t, dim3::x, dim3::y, and dim3::z.