[FFmpeg-cvslog] compat/cuda: add __expf() implementation

Timo Rothenpieler git at videolan.org
Sat Aug 14 16:10:43 EEST 2021


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Sat Aug 14 15:04:49 2021 +0200| [acd3c101ef4b84aac9c608bfe6ab22431529c48f] | committer: Timo Rothenpieler

compat/cuda: add __expf() implementation

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=acd3c101ef4b84aac9c608bfe6ab22431529c48f
---

 compat/cuda/cuda_runtime.h | 1 +
 1 file changed, 1 insertion(+)

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 */



More information about the ffmpeg-cvslog mailing list