summaryrefslogtreecommitdiff
path: root/compat/cuda/cuda_runtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'compat/cuda/cuda_runtime.h')
-rw-r--r--compat/cuda/cuda_runtime.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/compat/cuda/cuda_runtime.h b/compat/cuda/cuda_runtime.h
index c5450b2542..30cd085e48 100644
--- a/compat/cuda/cuda_runtime.h
+++ b/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 */