13 #ifndef QMCPLUSPLUS_STDLIB_PORT_H 14 #define QMCPLUSPLUS_STDLIB_PORT_H 17 #include <type_traits> 18 #if defined(HAVE_AMD_LIBM) 21 #if defined(HAVE_MASS) 29 #if defined(__APPLE__) 31 inline void sincos(
double a,
double* restrict
s,
double* restrict c) { ::__sincos(a,
s, c); }
33 inline void sincos(
float a,
float* restrict
s,
float* restrict c) { ::__sincosf(a,
s, c); }
35 #elif defined(HAVE_AMD_LIBM) 37 inline void sincos(
double a,
double* restrict
s,
double* restrict c) { ::amd_sincos(a,
s, c); }
39 inline void sincos(
float a,
float* restrict
s,
float* restrict c) { ::amd_sincosf(a,
s, c); }
41 #elif defined(HAVE_SINCOS) 43 inline void sincos(
double a,
double* restrict
s,
double* restrict c) {
::sincos(a,
s, c); }
45 inline void sincos(
float a,
float* restrict
s,
float* restrict c)
47 #if defined(HAVE_MASS) 62 inline void sincos(T a, T* restrict
s, T* restrict c)
74 inline int pow(
int i,
int n) {
return static_cast<int>(
std::pow(static_cast<double>(i),
n)); }
76 template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>::type>
79 return std::fpclassify(a) == FP_ZERO;
helper functions for EinsplineSetBuilder
MakeReturn< UnaryNode< FnSin, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t sin(const Vector< T1, C1 > &l)
int pow(int i, int n)
return i^n
bool isfinite(float a)
return true if the value is finite.
MakeReturn< BinaryNode< FnPow, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t, typename CreateLeaf< Vector< T2, C2 > >::Leaf_t > >::Expression_t pow(const Vector< T1, C1 > &l, const Vector< T2, C2 > &r)
MakeReturn< UnaryNode< FnCos, typename CreateLeaf< Vector< T1, C1 > >::Leaf_t > >::Expression_t cos(const Vector< T1, C1 > &l)
void sincos(T a, T *restrict s, T *restrict c)
sincos function wrapper
bool isinf(float a)
return true if the value is Inf.
bool isnan(float a)
return true if the value is NaN.