1#ifndef MODULE_DEVICE_H_
2#define MODULE_DEVICE_H_
24template <
typename Device>
50 const std::string& basis_type);
61int stringCmp(
const void* a,
const void* b);
65int set_device_by_rank(
const MPI_Comm mpi_comm = MPI_COMM_WORLD);
70template <
typename Device>
76template <
typename Device>
89#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 600 && !defined(__CUDA_ON_DCU)
90static __inline__ __device__
double atomicAdd(
double* address,
double val)
92 unsigned long long int* address_as_ull = (
unsigned long long int*)address;
93 unsigned long long int old = *address_as_ull, assumed;
97 old = atomicCAS(address_as_ull, assumed, __double_as_longlong(val + __longlong_as_double(assumed)));
100 }
while (assumed != old);
101 return __longlong_as_double(old);
#define T
Definition exp.cpp:237
base_device::AbacusDevice_t get_device_type(const Device *dev)
std::string get_current_precision(const float *var)
Definition device.cpp:36
AbacusDevice_t
Definition types.h:12
string device_flag
Definition pw_test.cpp:13