Files
TomoATT/cuda/cuda_constants.cuh
2025-12-17 10:53:43 +08:00

35 lines
944 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef CUDA_CONSTANTS_H
#define CUDA_CONSTANTS_H
#include <cuda_runtime.h>
#include <cuda.h>
#define CUSTOMREAL double // need here for cuda kernels
#define MPI_CR MPI_DOUBLE
//#define CUSTOMREAL float // need here for cuda kernels
//#define MPI_CR MPI_FLOAT
#define MPI_DUMMY_TAG_CUDA 9999
// maximum grid dimension in one direction of GPU
//#define MAXIMUM_GRID_DIM 65535
#define CUDA_MAX_BLOCK_SIZE 1024
#define CUDA_MAX_GRID_SIZE 65535
#define CUDA_MAX_THREADS_PER_BLOCK 1024
//#define CUDA_SWEEPING_BLOCK_SIZE 16 // s
//#define CUDA_SWEEPING_BLOCK_SIZE 32 // 15.254 s
//#define CUDA_SWEEPING_BLOCK_SIZE 64 // 15.281 s
//#define CUDA_SWEEPING_BLOCK_SIZE 128 // 15.378 s
//#define CUDA_SWEEPING_BLOCK_SIZE 256 // s
#define CUDA_SWEEPING_BLOCK_SIZE 512 //
//#define CUDA_SWEEPING_BLOCK_SIZE 1024 //
#define CUDA_L1_BLOCK_SIZE 128
//#define CUDA_L1_BLOCK_SIZE 256
#define CUDA_MAX_NUM_STREAMS 32
#endif // CUDA_CONSTANTS_H