diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-02-06 18:16:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-06 15:16:36 -0800 |
| commit | 7981da51debc66aa78cda72a4b0be3fc3a74d634 (patch) | |
| tree | b5b4372530c1413f1d23f207c1936d93e4049ac9 /tools | |
| parent | d3331fba6eaab44646010b556106da38925d43e0 (diff) | |
Float matrix intrinsic test/fixes (#1203)
* Fix CPP construct when matrix type.
* Test intrinsics on float matrices.
* Fix typo in _areNearlyEqual test. Increased default sensitivity.
Added matrix-float test.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/slang-test/slang-test-main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index e703ed26c..165f7a322 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -2026,7 +2026,7 @@ static bool _areNearlyEqual(double a, double b, double epsilon) // https://en.wikipedia.org/wiki/Double_precision_floating-point_format // - const double minNormal = 2.2250738585072014e10-308; + const double minNormal = 2.2250738585072014e-308; // Either a or b are very close to being zero, so doing relative comparison isn't really appropriate if (a == 0.0 || b == 0.0 || (absA + absB < minNormal)) @@ -2058,7 +2058,7 @@ static void _calcLines(const UnownedStringSlice& slice, List<UnownedStringSlice> } } -static SlangResult _compareWithType(const UnownedStringSlice& actual, const UnownedStringSlice& ref, double differenceThreshold = 0.001) +static SlangResult _compareWithType(const UnownedStringSlice& actual, const UnownedStringSlice& ref, double differenceThreshold = 0.0001) { typedef slang::TypeReflection::ScalarType ScalarType; |
