TAPs 0.7.7.3
TAPsCUDA_GlobalFns.cu
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsCUDA_GlobalFns.cu
00003 ******************************************************************************/
00035 /******************************************************************************
00036 SUKITTI PUNAK   (08/27/2008)
00037 UPDATE          (09/17/2009)
00038 ******************************************************************************/
00039 #ifndef TAPs_CUDA_GLOBAL_FNS_HPP
00040 #define TAPs_CUDA_GLOBAL_FNS_HPP
00041 
00042 //-----------------------------------------------------------------------------
00043 // Template for global, device, and host&device functions
00044 //-----------------------------------------------------------------------------
00045 // __global__F1
00046 // __global__ means a function as being a kernel, 
00047 // which is executed on the device 
00048 // and callable from the host only.
00049 //template <typename T> __global__
00050 //void Global__F1 () {}
00051 
00052 // __device__F1
00053 // __device__ means a function that is executed on the device 
00054 // and callable from the device only.
00055 //template <typename T> __device__
00056 //void Device__F1 () {}
00057 
00058 // __host__device__F1
00059 // __host__ and __device__ means a function that is compiled 
00060 // for both the host and the device.
00061 //template <typename T> __host__ __device__
00062 //void Host__device__F1 () {}
00063 //-----------------------------------------------------------------------------
00064 
00065 BEGIN_NAMESPACE_TAPs__CUDA
00066 //=============================================================================
00067 //-----------------------------------------------------------------------------
00068 
00070 void Host__Init ( int argc, char **argv );
00071 
00073 void Host__Init_withPLHM ( int argc, char ** argv );
00074 
00076 int DeviceCount ();
00077 
00079 bool GetDevice ( int & device );
00080 
00085 bool SetDevice ( int device );
00086 
00088 bool GetDeviceProperties ( cudaDeviceProp * prop, int device );
00089 
00091 bool CanDeviceMapHostMemory ( int device );
00092 
00093 
00094 
00095 
00097 bool CheckError ( cudaError_t error, const char * msg, bool bExitProgram = false );
00098 
00100 const char * GetErrorString ( cudaError_t error );
00101 
00102 //=============================================================================
00103 END_NAMESPACE_TAPs__CUDA
00104 //-----------------------------------------------------------------------------
00105 
00106 #include "TAPsCUDA_GlobalFns_Def.cu"
00107 
00108 #endif
00109 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00110 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines