10#pragma GCC diagnostic push
11#pragma GCC diagnostic ignored "-Wold-style-cast"
12#include <cuda_runtime.h>
13#pragma GCC diagnostic pop
15#ifdef CUDA_ERROR_CHECK
16#include <helper_functions.h>
17#include <helper_cuda.h>
21#define CudaSafeCall(err) __cudaSafeCall(err, __FILE__, __LINE__)
22#define CudaCheckError() __cudaCheckError(__FILE__, __LINE__)
25#define _BlockSize_ 1024
47void __cudaSafeCall( cudaError err,
const char *file,
const int line );
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.