Feb2021 GPU Package Update - GPU Package Files
This commit is contained in:
@ -20,6 +20,29 @@
|
||||
#include <cuda_runtime.h>
|
||||
#endif
|
||||
|
||||
// ---------------------- OPENMP PREPROCESSOR STUFF ------------------
|
||||
#if defined(_OPENMP)
|
||||
#if !defined(LAL_USE_OMP)
|
||||
#define LAL_USE_OMP 1
|
||||
#endif
|
||||
|
||||
#if !defined(LAL_USE_OMP_SIMD)
|
||||
#if (_OPENMP >= 201307)
|
||||
#define LAL_USE_OMP_SIMD 1
|
||||
#else
|
||||
#define LAL_USE_OMP_SIMD 0
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#if !defined(LAL_USE_OMP)
|
||||
#define LAL_USE_OMP 0
|
||||
#endif
|
||||
|
||||
#if !defined(LAL_USE_OMP_SIMD)
|
||||
#define LAL_USE_OMP_SIMD 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct _lgpu_int2 {
|
||||
int x; int y;
|
||||
};
|
||||
@ -75,6 +98,7 @@ inline std::ostream & operator<<(std::ostream &out, const _lgpu_double4 &v) {
|
||||
#define ACC_PRECISION double
|
||||
#define numtyp2 _lgpu_float2
|
||||
#define numtyp4 _lgpu_float4
|
||||
#define acctyp2 _lgpu_double2
|
||||
#define acctyp4 _lgpu_double4
|
||||
#endif
|
||||
|
||||
@ -84,6 +108,7 @@ inline std::ostream & operator<<(std::ostream &out, const _lgpu_double4 &v) {
|
||||
#define ACC_PRECISION double
|
||||
#define numtyp2 _lgpu_double2
|
||||
#define numtyp4 _lgpu_double4
|
||||
#define acctyp2 _lgpu_double2
|
||||
#define acctyp4 _lgpu_double4
|
||||
#endif
|
||||
|
||||
@ -93,44 +118,16 @@ inline std::ostream & operator<<(std::ostream &out, const _lgpu_double4 &v) {
|
||||
#define ACC_PRECISION float
|
||||
#define numtyp2 _lgpu_float2
|
||||
#define numtyp4 _lgpu_float4
|
||||
#define acctyp2 _lgpu_float2
|
||||
#define acctyp4 _lgpu_float4
|
||||
#endif
|
||||
|
||||
enum{SPHERE_SPHERE,SPHERE_ELLIPSE,ELLIPSE_SPHERE,ELLIPSE_ELLIPSE};
|
||||
|
||||
// OCL_DEFAULT_VENDOR: preprocessor define for hardware
|
||||
// specific sizes of OpenCL kernel related constants
|
||||
|
||||
#ifdef FERMI_OCL
|
||||
#define OCL_DEFAULT_VENDOR "fermi"
|
||||
#endif
|
||||
|
||||
#ifdef KEPLER_OCL
|
||||
#define OCL_DEFAULT_VENDOR "kepler"
|
||||
#endif
|
||||
|
||||
#ifdef CYPRESS_OCL
|
||||
#define OCL_DEFAULT_VENDOR "cypress"
|
||||
#endif
|
||||
|
||||
#ifdef GENERIC_OCL
|
||||
#define OCL_DEFAULT_VENDOR "generic"
|
||||
#endif
|
||||
|
||||
#ifdef INTEL_OCL
|
||||
#define OCL_DEFAULT_VENDOR "intel"
|
||||
#endif
|
||||
|
||||
#ifdef PHI_OCL
|
||||
#define OCL_DEFAULT_VENDOR "phi"
|
||||
#endif
|
||||
|
||||
#ifndef OCL_DEFAULT_VENDOR
|
||||
#define OCL_DEFAULT_VENDOR "none"
|
||||
#endif
|
||||
|
||||
// default to 32-bit smallint and other ints, 64-bit bigint: same as defined in src/lmptype.h
|
||||
#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && !defined(LAMMPS_SMALLBIG)
|
||||
// default to 32-bit smallint and other ints, 64-bit bigint:
|
||||
// same as defined in src/lmptype.h
|
||||
#if !defined(LAMMPS_SMALLSMALL) && !defined(LAMMPS_BIGBIG) && \
|
||||
!defined(LAMMPS_SMALLBIG)
|
||||
#define LAMMPS_SMALLBIG
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user