Tinker9 70bd052 (Thu Nov 9 12:11:35 2023 -0800)
|
Platforms and platform-specific syntaxes. More...
Modules | |
C++ Syntax | |
CUDA Syntax | |
OpenACC Syntax | |
NVIDIA GPU | |
Classes | |
class | tinker::ThrustCache |
Device memory cache (allocator) for the Thrust Library. More... | |
Macros | |
#define | TINKER_CUDART 1 |
#define | TINKER_GPULANG_OPENACC 0 |
#define | TINKER_GPULANG_CUDA 0 |
Enumerations | |
enum class | tinker::Platform { tinker::Platform::UNKNOWN = 0x000 , tinker::Platform::ACC = 0x001 , tinker::Platform::CUDA = 0x002 } |
Functions | |
std::string | tinker::cxxCompilerName () |
Returns the name of the C++ compiler. More... | |
std::string | tinker::accCompilerName () |
Returns the name of the OpenACC compiler. More... | |
std::string | tinker::cudaCompilerName () |
Returns the name of the CUDA compiler. More... | |
void | tinker::cudalibData (RcOp) |
Sets up the CUDA variables including but not limited to CUDA streams, CUDA library handles, CUDA memory buffers, and integer units for the OpenACC queues. More... | |
std::string | tinker::exec (const std::string &cmd) |
Executes a command in shell and returns the output in a string. More... | |
void | tinker::throwExceptionMissingFunction (const char *functionName, const char *file, int lineNum) |
void | tinker::gpuData (RcOp) |
Sets up the GPU card. More... | |
int | tinker::gpuGridSize (int nthreadsPerBlock) |
int | tinker::gpuMaxNParallel (int idev) |
void | tinker::platformData (RcOp) |
Variables | |
void * | tinker::pinned_buf |
Preallocated pinned host memory. More... | |
void * | tinker::dptr_buf |
Preallocated device memory. More... | |
int | tinker::ndevice |
Total number of visible devices. More... | |
int | tinker::idevice |
Device ID number in use. More... | |
Platform | tinker::pltfm_config |
Platforms and platform-specific syntaxes.
class tinker::ThrustCache |
Device memory cache (allocator) for the Thrust Library.
The strategy of this allocator is as follows: it only expands the size of the allocated memory, and does not free the memory on calling deallocate(value_type*, size_t)
, until clear()
is called.
Public Types | |
using | value_type = char |
Public Member Functions | |
ThrustCache () | |
value_type * | allocate (ptrdiff_t) |
Expands and returns the allocated memory upon request. More... | |
void | deallocate (value_type *, size_t) |
Does not do anything. More... | |
void | clear () |
Deallocates the memory. More... | |
Static Public Member Functions | |
static ThrustCache & | instance () |
Returns the reference to the singleton object. More... | |
static void | allocate () |
Allocates the memory managed by the singleton object. More... | |
static void | deallocate () |
Deallocates the memory managed by the singleton object. More... | |
using tinker::ThrustCache::value_type = char |
tinker::ThrustCache::ThrustCache | ( | ) |
|
static |
Allocates the memory managed by the singleton object.
value_type * tinker::ThrustCache::allocate | ( | ptrdiff_t | ) |
Expands and returns the allocated memory upon request.
void tinker::ThrustCache::clear | ( | ) |
Deallocates the memory.
|
static |
Deallocates the memory managed by the singleton object.
void tinker::ThrustCache::deallocate | ( | value_type * | , |
size_t | |||
) |
Does not do anything.
|
static |
Returns the reference to the singleton object.
#define TINKER_CUDART 1 |
Macro for the CUDA runtime-enabled GPU code. Defined to 0 when the code is compiled on the CPU platform.
#define TINKER_GPULANG_CUDA 0 |
Macro for the CUDA GPU code. Defined to 0 when
#define TINKER_GPULANG_OPENACC 0 |
Macro for the OpenACC GPU code. Defined to 0 when
|
strong |
std::string tinker::accCompilerName | ( | ) |
Returns the name of the OpenACC compiler.
std::string tinker::cudaCompilerName | ( | ) |
Returns the name of the CUDA compiler.
void tinker::cudalibData | ( | RcOp | ) |
Sets up the CUDA variables including but not limited to CUDA streams, CUDA library handles, CUDA memory buffers, and integer units for the OpenACC queues.
std::string tinker::cxxCompilerName | ( | ) |
Returns the name of the C++ compiler.
std::string tinker::exec | ( | const std::string & | cmd | ) |
Executes a command in shell and returns the output in a string.
void tinker::gpuData | ( | RcOp | ) |
Sets up the GPU card.
int tinker::gpuGridSize | ( | int | nthreadsPerBlock | ) |
nthreadsPerBlock | Dimension of the thread blocks. |
int tinker::gpuMaxNParallel | ( | int | idev | ) |
idev | Device number. |
void tinker::platformData | ( | RcOp | ) |
void tinker::throwExceptionMissingFunction | ( | const char * | functionName, |
const char * | file, | ||
int | lineNum | ||
) |
|
extern |
Preallocated device memory.
|
extern |
Device ID number in use.
|
extern |
Total number of visible devices.
|
extern |
Preallocated pinned host memory.
|
extern |
Platform in use.