ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
libxc_host.h
Go to the documentation of this file.
1#ifndef LIBXC_HOST_H
2#define LIBXC_HOST_H
3
4#include <xc.h>
5
6#if defined(ABACUS_LIBXC_REQUIRES_HOST_FLAG) && !defined(XC_FLAGS_ON_HOST)
7#error "CMake found CUDA Libxc >= 7.1.0 but xc.h lacks host/device selection. Check the compiler include path."
8#endif
9
11{
12// A CUDA-enabled Libxc defaults to device pointers. Keep host callers explicit.
13inline int init_func_host(xc_func_type* func, const int id, const int spin)
14{
15#ifdef XC_FLAGS_ON_HOST
16 return xc_func_init_flags(func, id, spin, XC_FLAGS_ON_HOST);
17#else
18 return xc_func_init(func, id, spin);
19#endif
20}
21} // namespace XC_Functional_Libxc
22
23#endif
Definition libxc_host.h:11
int init_func_host(xc_func_type *func, const int id, const int spin)
Definition libxc_host.h:13
double func(const Vec3 &r, const std::vector< Vec3 > &R, const std::vector< double > &a, const std::vector< double > &n)
Definition test_partition.cpp:50