diff options
| author | Jan Vesely <jan.vesely@rutgers.edu> | 2017-10-25 16:49:17 +0000 |
|---|---|---|
| committer | Jan Vesely <jan.vesely@rutgers.edu> | 2017-10-25 16:49:17 +0000 |
| commit | 9fedbb9d8e0c43cead1dbb5ae5877ee02a18ea3d (patch) | |
| tree | e9a72418ddd0a8321585f47c1d5bba1b52950001 /libclc/amdgpu/lib/math/native_log.inc | |
| parent | 538612c885159da10b8e788c3c14a13d28912dc0 (diff) | |
| download | bcm5719-llvm-9fedbb9d8e0c43cead1dbb5ae5877ee02a18ea3d.tar.gz bcm5719-llvm-9fedbb9d8e0c43cead1dbb5ae5877ee02a18ea3d.zip | |
amdgpu/math: Don't use llvm instrinsic for native_log
AMDGPU targets don't have insturction for it,
so it'll be expanded to C * log2 anyway.
v2: use native_log2 instead of the more precise sw implementation
v3: move to amdgpu
v4: drop old AMD copyright
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 316587
Diffstat (limited to 'libclc/amdgpu/lib/math/native_log.inc')
| -rw-r--r-- | libclc/amdgpu/lib/math/native_log.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libclc/amdgpu/lib/math/native_log.inc b/libclc/amdgpu/lib/math/native_log.inc new file mode 100644 index 00000000000..e6818dc1326 --- /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); +} |

