32 #ifndef CUDA_PARAMETERS_H
33 #define CUDA_PARAMETERS_H
35 #include <cuda_runtime.h>
int samplerGridSize1D
Number of blocks for the 1D data sampling kernels.
dim3 solverTransposeBlockSize
Block size for the transposition kernels.
int GetSamplerGridSize1D() const
Get Number of blocks for the 1D data sampling kernels.
int deviceIdx
Index of the device the code is being run on.
dim3 solverTransposeGirdSize
Grid size for the transposition kernels.
static const int DEFAULT_DEVICE_IDX
Default Device Index - no default GPU.
int samplerBlockSize1D
Number of threads for the 1D data sampling kernels.
void SetUpDeviceConstants() const
Upload useful simulation constants into device constant memory.
dim3 GetSolverTransposeBlockSize() const
Get block size for the transposition kernels.
int solverBlockSize1D
Number of threads for 1D block used by kSpaceSolver.
Class responsible for CUDA runtime setup.
std::string GetDeviceName() const
Get the name of the device used.
TCUDAParameters & operator=(const TCUDAParameters &src)
operator = not allowed for public.
void SelectDevice(const int DeviceIdx=DEFAULT_DEVICE_IDX)
Select cuda device for execution.
TCUDAParameters()
Default constructor - only friend class can create an instance.
Class storing all parameters of the simulation.
static const int UNDEFINDED_SIZE
Undefined block or grid size.
int GetSamplerBlockSize1D() const
Get number of threads for the 1D data sampling kernels.
The header file containing the structure with 3D dimension sizes.
int GetSolverGridSize1D() const
Get number of block for 1D grid used by kSpaceSolver.
int GetDeviceIdx() const
Get Idx of the device being used.
dim3 GetSolverTransposeGirdSize() const
Get grid size for the transposition kernels.
int GetSolverBlockSize1D() const
Get number of threads for 1D block used by kSpaceSolver.
cudaDeviceProp deviceProperties
Device properties of the selected GPU.
int solverGridSize1D
Number of block for 1D grid used by kSpaceSolver.
~TCUDAParameters()
Destructor.
void CheckCUDAVersion()
Check whether the CUDA driver version installed is sufficient for the code.
void SetKernelConfiguration()
Set kernel configurations based on the simulation parameters.
const cudaDeviceProp & GetDeviceProperties() const
Return properties of currently used GPU.
bool CheckCUDACodeVersion()
Check whether the code was compiled for a given SM model.