Tinker9 70bd052 (Thu Nov 9 12:11:35 2023 -0800)
Loading...
Searching...
No Matches
Classes | Macros | Functions
C++ Syntax

Classes

struct  tinker::PtrTrait< PTR >
 

Macros

#define TINKER_ICPC
 Macro for the Intel C++ compiler. More...
 
#define TINKER_GCC
 Macro for the GNU C++ compiler. More...
 
#define TINKER_CLANG
 Macro for the Clang C++ (either Apple or LLVM) compiler. More...
 
#define TINKER_APPLE_CLANG
 Macro for the Clang C++ (Apple) compiler. More...
 
#define TINKER_LLVM_CLANG
 Macro for the Clang C++ (LLVM) compiler. More...
 
#define TINKER_PGI
 Macro for the PGI or NVHPC C++ compiler. More...
 
#define restrict   __restrict__
 
#define CONSTEXPR
 
#define MAYBE_UNUSED
 
#define TINKER_STR(s)   TINKER_STR1_(s)
 
#define TINKER_EXTERN_DEFINITION_FILE   0
 
#define TINKER_EXTERN   extern
 
#define TINKER_DEBUG   0
 
#define TINKER9_DIR
 

Functions

template<class F >
tinker::toFloatingPoint (fixed g)
 Converts a fixed-point value g to floating-point value on host. More...
 
template<class F >
tinker::toFloatingPoint (double g)
 Converts a double-precision g to floating-point value on host. More...
 
template<class F >
tinker::toFloatingPoint (float g)
 Converts a single-precision g to floating-point value on host. More...
 

Detailed Description


Class Documentation

◆ tinker::PtrTrait

struct tinker::PtrTrait
template<class PTR>
struct tinker::PtrTrait< PTR >

A helper class to get the traits of the given 1D or 2D pointer type.

Example:

PTR PtrTrait<PTR>::type PtrTrait<PTR>::n
float* float 1
int (*)[3] int 3
Template Parameters
PTRA pointer type.

Macro Definition Documentation

◆ CONSTEXPR

#define CONSTEXPR

if constexpr has been added to C++ since C++17. if CONSTEXPR expands to if constexpr if this feature is supported. Otherwise it expands to if.

◆ MAYBE_UNUSED

#define MAYBE_UNUSED

Reduces the "unused variable" warnings from the compiler.

◆ restrict

#define restrict   __restrict__

Expands to __restrict__, which is a common C++ extension.

◆ TINKER9_DIR

#define TINKER9_DIR

Path to this source code directory.

◆ TINKER_APPLE_CLANG

#define TINKER_APPLE_CLANG

Macro for the Clang C++ (Apple) compiler.

◆ TINKER_CLANG

#define TINKER_CLANG

Macro for the Clang C++ (either Apple or LLVM) compiler.

◆ TINKER_DEBUG

#define TINKER_DEBUG   0

Expands to 0 if the macro NDEBUG was predefined. Expands to 1 otherwise.

◆ TINKER_EXTERN

#define TINKER_EXTERN   extern

Expands to extern, unless TINKER_EXTERN_DEFINITION_FILE has been predefined to 1. This is useful to declare and define the global variables.

See also
TINKER_EXTERN_DEFINITION_FILE

◆ TINKER_EXTERN_DEFINITION_FILE

#define TINKER_EXTERN_DEFINITION_FILE   0

Define this macro to 1 before this header file being included so that the macro TINKER_EXTERN will not be expanded to extern.

See also
TINKER_EXTERN

◆ TINKER_GCC

#define TINKER_GCC

Macro for the GNU C++ compiler.

◆ TINKER_ICPC

#define TINKER_ICPC

Macro for the Intel C++ compiler.

◆ TINKER_LLVM_CLANG

#define TINKER_LLVM_CLANG

Macro for the Clang C++ (LLVM) compiler.

◆ TINKER_PGI

#define TINKER_PGI

Macro for the PGI or NVHPC C++ compiler.

◆ TINKER_STR

#define TINKER_STR (   s)    TINKER_STR1_(s)

Converts a predefined macro s to a string "s".

Function Documentation

◆ toFloatingPoint() [1/3]

template<class F >
F tinker::toFloatingPoint ( double  g)
inline

Converts a double-precision g to floating-point value on host.

◆ toFloatingPoint() [2/3]

template<class F >
F tinker::toFloatingPoint ( fixed  g)
inline

Converts a fixed-point value g to floating-point value on host.

◆ toFloatingPoint() [3/3]

template<class F >
F tinker::toFloatingPoint ( float  g)
inline

Converts a single-precision g to floating-point value on host.