JDFTx  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GpuKernelUtils.h File Reference

Common utility functions/macros for the gpu kernels and launchers in the .cu files. More...

#include <algorithm>
#include <cuda_runtime.h>
#include <cublas_v2.h>
#include <driver_types.h>
#include <vector_types.h>
#include <core/vector3.h>

Classes

struct  GpuLaunchConfig
 Base-class for launch configuration for gpu kernels. More...
 
struct  GpuLaunchConfig1D
 1D launch configuration More...
 
struct  GpuLaunchConfig3D
 3D launch configuration More...
 
struct  GpuLaunchConfigHalf3D
 3D launch configuration for symmetry-reduced G-space loops (z dimension folded for real data sets) More...
 

Macros

#define kernelIndex(dir)   (blockIdx.dir * blockDim.dir + threadIdx.dir)
 
#define kernelIndex1D()   ((blockIdx.y*gridDim.x+blockIdx.x) * blockDim.x + threadIdx.x)
 

Functions

void gpuErrorCheck ()
 Check for gpu errors and print a useful message (implemented in GpuUtils.cpp) More...
 

Variables

cudaDeviceProp cudaDevProps
 cached properties of currently running device (defined in GpuUtil.cpp)
 
cublasHandle_t cublasHandle
 global handle to cublas (defined in GpuUtil.cpp)
 

Detailed Description

Common utility functions/macros for the gpu kernels and launchers in the .cu files.