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

Classes

struct  tinker::int2
 
struct  tinker::int3
 
struct  tinker::int4
 
struct  tinker::float2
 
struct  tinker::float3
 
struct  tinker::float4
 
struct  tinker::double2
 
struct  tinker::double3
 
struct  tinker::double4
 

Macros

#define SEQ_ROUTINE   _Pragma("acc routine seq")
 
#define SEQ_CUDA
 

Functions

template<class T >
void tinker::atomic_add (T value, T *buffer, size_t offset=0)
 
template<class T , class = typename std::enable_if<std::is_same<T, float>::value || std::is_same<T, double>::value>::type>
void tinker::atomic_add (T value, fixed *buffer, size_t offset=0)
 
template<class T >
void tinker::atomic_add (T vxx, T vyx, T vzx, T vyy, T vzy, T vzz, T(*buffer)[8], size_t offset=0)
 Adds virial {xx,yx,zx,yy,zy,zz} to buffer[offset][0 to 7]. More...
 
template<class T , class = typename std::enable_if<std::is_same<T, float>::value || std::is_same<T, double>::value>::type>
void tinker::atomic_add (T vxx, T vyx, T vzx, T vyy, T vzy, T vzz, fixed(*buffer)[8], size_t offset=0)
 
template<class G , class T >
G tinker::floatTo (T val)
 Converts val of floating-point to type G. More...
 
template<class T >
tinker::fixedTo (fixed val)
 Converts val of fixed-point to floating-point. More...
 
template<class T >
tinker::toFloatGrad (fixed g)
 Converts a fixed-point value g to floating-point value. More...
 
template<class T >
tinker::toFloatGrad (double g)
 Converts a double-precision value g to floating-point value. More...
 
template<class T >
tinker::toFloatGrad (float g)
 Converts a single-precision value g to floating-point value. More...
 
template<class T , class U >
constexpr bool tinker::eq ()
 Used as eq<T1,T2>() for two type identifiers. More...
 
int2 tinker::make_int2 (int x, int y)
 
int3 tinker::make_int3 (int x, int y, int z)
 
int4 tinker::make_int4 (int x, int y, int z, int w)
 
float2 tinker::make_float2 (float x, float y)
 
float3 tinker::make_float3 (float x, float y, float z)
 
float4 tinker::make_float4 (float x, float y, float z, float w)
 
double2 tinker::make_double2 (double x, double y)
 
double3 tinker::make_double3 (double x, double y, double z)
 
double4 tinker::make_double4 (double x, double y, double z, double w)
 

Detailed Description


Class Documentation

◆ tinker::int2

struct tinker::int2

Public Attributes

int x
 
int y
 

Member Data Documentation

◆ x

int tinker::int2::x

◆ y

int tinker::int2::y

◆ tinker::int3

struct tinker::int3

Public Attributes

int x
 
int y
 
int z
 

Member Data Documentation

◆ x

int tinker::int3::x

◆ y

int tinker::int3::y

◆ z

int tinker::int3::z

◆ tinker::int4

struct tinker::int4

Public Attributes

int x
 
int y
 
int z
 
int w
 

Member Data Documentation

◆ w

int tinker::int4::w

◆ x

int tinker::int4::x

◆ y

int tinker::int4::y

◆ z

int tinker::int4::z

◆ tinker::float2

struct tinker::float2

Public Attributes

float x
 
float y
 

Member Data Documentation

◆ x

float tinker::float2::x

◆ y

float tinker::float2::y

◆ tinker::float3

struct tinker::float3

Public Attributes

float x
 
float y
 
float z
 

Member Data Documentation

◆ x

float tinker::float3::x

◆ y

float tinker::float3::y

◆ z

float tinker::float3::z

◆ tinker::float4

struct tinker::float4

Public Attributes

float x
 
float y
 
float z
 
float w
 

Member Data Documentation

◆ w

float tinker::float4::w

◆ x

float tinker::float4::x

◆ y

float tinker::float4::y

◆ z

float tinker::float4::z

◆ tinker::double2

struct tinker::double2

Public Attributes

double x
 
double y
 

Member Data Documentation

◆ x

double tinker::double2::x

◆ y

double tinker::double2::y

◆ tinker::double3

struct tinker::double3

Public Attributes

double x
 
double y
 
double z
 

Member Data Documentation

◆ x

double tinker::double3::x

◆ y

double tinker::double3::y

◆ z

double tinker::double3::z

◆ tinker::double4

struct tinker::double4

Public Attributes

double x
 
double y
 
double z
 
double w
 

Member Data Documentation

◆ w

double tinker::double4::w

◆ x

double tinker::double4::x

◆ y

double tinker::double4::y

◆ z

double tinker::double4::z

Macro Definition Documentation

◆ SEQ_CUDA

#define SEQ_CUDA

An empty macro in the OpenACC source code.

◆ SEQ_ROUTINE

#define SEQ_ROUTINE   _Pragma("acc routine seq")

Expands to _Pragma("acc routine seq") in OpenACC source files. #pragma acc cannot be used in macro.

Function Documentation

◆ atomic_add() [1/4]

template<class T , class = typename std::enable_if<std::is_same<T, float>::value || std::is_same<T, double>::value>::type>
void tinker::atomic_add ( value,
fixed buffer,
size_t  offset = 0 
)
inline

Adds value to buffer[offset] via fixed-point arithmetic.

Template Parameters
TA floating-point type.

◆ atomic_add() [2/4]

template<class T >
void tinker::atomic_add ( value,
T *  buffer,
size_t  offset = 0 
)
inline

Adds value to buffer[offset].

Note
value and buffer elements are of the same type.

◆ atomic_add() [3/4]

template<class T , class = typename std::enable_if<std::is_same<T, float>::value || std::is_same<T, double>::value>::type>
void tinker::atomic_add ( vxx,
vyx,
vzx,
vyy,
vzy,
vzz,
fixed(*)  buffer[8],
size_t  offset = 0 
)
inline

Adds virial {xx,yx,zx,yy,zy,zz} to buffer[offset][0 to 7] via fixed-point arithmetic.

◆ atomic_add() [4/4]

template<class T >
void tinker::atomic_add ( vxx,
vyx,
vzx,
vyy,
vzy,
vzz,
T(*)  buffer[8],
size_t  offset = 0 
)
inline

Adds virial {xx,yx,zx,yy,zy,zz} to buffer[offset][0 to 7].

◆ eq()

template<class T , class U >
constexpr bool tinker::eq ( )
constexpr

Used as eq<T1,T2>() for two type identifiers.

◆ fixedTo()

template<class T >
T tinker::fixedTo ( fixed  val)
inline

Converts val of fixed-point to floating-point.

◆ floatTo()

template<class G , class T >
G tinker::floatTo ( val)
inline

Converts val of floating-point to type G.

◆ make_double2()

double2 tinker::make_double2 ( double  x,
double  y 
)
inline

◆ make_double3()

double3 tinker::make_double3 ( double  x,
double  y,
double  z 
)
inline

◆ make_double4()

double4 tinker::make_double4 ( double  x,
double  y,
double  z,
double  w 
)
inline

◆ make_float2()

float2 tinker::make_float2 ( float  x,
float  y 
)
inline

◆ make_float3()

float3 tinker::make_float3 ( float  x,
float  y,
float  z 
)
inline

◆ make_float4()

float4 tinker::make_float4 ( float  x,
float  y,
float  z,
float  w 
)
inline

◆ make_int2()

int2 tinker::make_int2 ( int  x,
int  y 
)
inline

◆ make_int3()

int3 tinker::make_int3 ( int  x,
int  y,
int  z 
)
inline

◆ make_int4()

int4 tinker::make_int4 ( int  x,
int  y,
int  z,
int  w 
)
inline

◆ toFloatGrad() [1/3]

template<class T >
T tinker::toFloatGrad ( double  g)
inline

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

◆ toFloatGrad() [2/3]

template<class T >
T tinker::toFloatGrad ( fixed  g)
inline

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

◆ toFloatGrad() [3/3]

template<class T >
T tinker::toFloatGrad ( float  g)
inline

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