9 #pragma GCC diagnostic push
10 #pragma GCC diagnostic ignored "-Wold-style-cast"
11 #include <cuda_runtime.h>
12 #pragma GCC diagnostic pop
14 #ifdef CUDA_ERROR_CHECK
15 #include <helper_functions.h>
16 #include <helper_cuda.h>
20 #define CudaSafeCall(err) __cudaSafeCall(err, __FILE__, __LINE__)
21 #define CudaCheckError() __cudaCheckError(__FILE__, __LINE__)
24 #define _BlockSize_ 1024
45 void __cudaSafeCall( cudaError err,
const char *file,
const int line );
93 #ifdef _LOW_MEMORY_STRUCTS_
size_t GetL2CacheSize(const int device=0)
KS: Get L2 cache size (in bytes) for the specified GPU device.
size_t GetMaxTexture1DSize(const int device=0)
KS: Get the maximum size for 1D textures on the specified GPU device.
void __cudaCheckError(const char *file, const int line)
Check if there's been an error.
void SetDevice(const int deviceId)
KS: Only useful if using multiple GPU.
void ResetDevice()
KS: Completely clean GPU, this is time consuming and may lead to unexpected behaviour.
void checkGpuMem()
KS: Get some fancy info about VRAM usage.
int GetNumGPUThreads(const int Device=0)
KS: Get number of GPU threads for currently used GPU.
void PrintNdevices()
KS: Get some fancy info about GPU.
void __cudaSafeCall(cudaError err, const char *file, const int line)
Check for a safe call on GPU.
size_t GetSharedMemoryPerBlock(const int device=0)
KS: Returns the maximum shared memory per block for a given GPU device.
Main namespace for MaCh3 software.