diff options
author | Andrzej Janik <[email protected]> | 2020-11-05 22:10:06 +0100 |
---|---|---|
committer | Andrzej Janik <[email protected]> | 2020-11-05 22:10:06 +0100 |
commit | d7bf1acf84faa8f6cb1d5edb6c4d9eb0f05a5ae0 (patch) | |
tree | d94194f088fe2f57fef27cb5062f88cb2dbec99b /ptx/src/test/spirv_run/mod.rs | |
parent | 8e409254b3f30577a840885f6d7a56b27f4c2611 (diff) | |
download | ZLUDA-d7bf1acf84faa8f6cb1d5edb6c4d9eb0f05a5ae0.tar.gz ZLUDA-d7bf1acf84faa8f6cb1d5edb6c4d9eb0f05a5ae0.zip |
Implement instructions clz, brev, popc
Diffstat (limited to 'ptx/src/test/spirv_run/mod.rs')
-rw-r--r-- | ptx/src/test/spirv_run/mod.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ptx/src/test/spirv_run/mod.rs b/ptx/src/test/spirv_run/mod.rs index 163caac..a7ef75b 100644 --- a/ptx/src/test/spirv_run/mod.rs +++ b/ptx/src/test/spirv_run/mod.rs @@ -104,11 +104,18 @@ test_ptx!(div_approx, [1f32, 2f32], [0.5f32]); test_ptx!(sqrt, [0.25f32], [0.5f32]);
test_ptx!(rsqrt, [0.25f64], [2f64]);
test_ptx!(neg, [181i32], [-181i32]);
-test_ptx!(sin, [std::f32::consts::PI/2f32], [1f32]);
+test_ptx!(sin, [std::f32::consts::PI / 2f32], [1f32]);
test_ptx!(cos, [std::f32::consts::PI], [-1f32]);
test_ptx!(lg2, [512f32], [9f32]);
test_ptx!(ex2, [10f32], [1024f32]);
test_ptx!(cvt_rni, [9.5f32, 10.5f32], [10f32, 10f32]);
+test_ptx!(clz, [0b00000101_00101101_00010011_10101011u32], [5u32]);
+test_ptx!(popc, [0b10111100_10010010_01001001_10001010u32], [14u32]);
+test_ptx!(
+ brev,
+ [0b11000111_01011100_10101110_11111011u32],
+ [0b11011111_01110101_00111010_11100011u32]
+);
struct DisplayError<T: Debug> {
err: T,
|