diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-01-21 18:49:44 -0500 |
|---|---|---|
| committer | Tim Foley <tfoleyNV@users.noreply.github.com> | 2020-01-21 15:49:44 -0800 |
| commit | 5988ce80f580d57ce6718a61c86da6296caf0845 (patch) | |
| tree | 5549f197d437c578556bb25d65d57ff213bbb55b /prelude | |
| parent | 47392bc72b826b4ad427b703391a77e697735a65 (diff) | |
HLSL intrinsic coverage (#1169)
* Added hlsl-intrinsic test folder.
Enabled ceil as works across targets.
* log10 support.
* Fix float % on CPU/CUDA to match HLSL which is fmod (not fremainder).
* Added log10 tests back to scalar-float.slang
* Don't add the ( for $Sx - it's clearer what's going on without it.
Diffstat (limited to 'prelude')
| -rw-r--r-- | prelude/slang-cpp-scalar-intrinsics.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/prelude/slang-cpp-scalar-intrinsics.h b/prelude/slang-cpp-scalar-intrinsics.h index e89338186..63fe9c926 100644 --- a/prelude/slang-cpp-scalar-intrinsics.h +++ b/prelude/slang-cpp-scalar-intrinsics.h @@ -49,6 +49,7 @@ SLANG_FORCE_INLINE float F32_acos(float f) { return ::acosf(f); } SLANG_FORCE_INLINE float F32_atan(float f) { return ::atanf(f); } SLANG_FORCE_INLINE float F32_log2(float f) { return ::log2f(f); } SLANG_FORCE_INLINE float F32_log(float f) { return ::logf(f); } +SLANG_FORCE_INLINE float F32_log10(float f) { return ::log10f(f); } SLANG_FORCE_INLINE float F32_exp2(float f) { return ::exp2f(f); } SLANG_FORCE_INLINE float F32_exp(float f) { return ::expf(f); } SLANG_FORCE_INLINE float F32_abs(float f) { return ::fabsf(f); } @@ -106,6 +107,7 @@ SLANG_FORCE_INLINE double F64_acos(double f) { return ::acos(f); } SLANG_FORCE_INLINE double F64_atan(double f) { return ::atan(f); } SLANG_FORCE_INLINE double F64_log2(double f) { return ::log2(f); } SLANG_FORCE_INLINE double F64_log(double f) { return ::log(f); } +SLANG_FORCE_INLINE double F64_log10(float f) { return ::log10(f); } SLANG_FORCE_INLINE double F64_exp2(double f) { return ::exp2(f); } SLANG_FORCE_INLINE double F64_exp(double f) { return ::exp(f); } SLANG_FORCE_INLINE double F64_abs(double f) { return ::fabs(f); } |
