diff --git a/libclc/amdgpu/lib/SOURCES b/libclc/amdgpu/lib/SOURCES index ce5fe66f123e..8cbe1d425629 100644 --- a/libclc/amdgpu/lib/SOURCES +++ b/libclc/amdgpu/lib/SOURCES @@ -1,2 +1,3 @@ +math/native_log.cl math/nextafter.cl math/sqrt.cl diff --git a/libclc/amdgpu/lib/math/native_log.cl b/libclc/amdgpu/lib/math/native_log.cl new file mode 100644 index 000000000000..3c5592f602c3 --- /dev/null +++ b/libclc/amdgpu/lib/math/native_log.cl @@ -0,0 +1,5 @@ +#include + +#define __CLC_BODY +#define __FLOAT_ONLY +#include diff --git a/libclc/amdgpu/lib/math/native_log.inc b/libclc/amdgpu/lib/math/native_log.inc new file mode 100644 index 000000000000..e6818dc13261 --- /dev/null +++ b/libclc/amdgpu/lib/math/native_log.inc @@ -0,0 +1,3 @@ +_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE native_log(__CLC_GENTYPE val) { + return native_log2(val) * (1.0f / M_LOG2E_F); +}