compat/cuda: add __expf() implementation

pull/364/head
Timo Rothenpieler 3 years ago
parent 1c42fd9323
commit acd3c101ef
  1. 1
      compat/cuda/cuda_runtime.h

@ -184,5 +184,6 @@ static inline __device__ double fabs(double a) { return __builtin_fabs(a); }
static inline __device__ float __sinf(float a) { return __nvvm_sin_approx_f(a); }
static inline __device__ float __cosf(float a) { return __nvvm_cos_approx_f(a); }
static inline __device__ float __expf(float a) { return __nvvm_ex2_approx_f(a * (float)__builtin_log2(__builtin_exp(1))); }
#endif /* COMPAT_CUDA_CUDA_RUNTIME_H */

Loading…
Cancel
Save