Saturation arithmetic (sub and add) was added for int32/int64.
This commit is contained in:
21
tests/paddus_vi64.ispc
Normal file
21
tests/paddus_vi64.ispc
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
||||
varying unsigned int64 a_max = 18446744073709551615, a_min = 0; // max and min unsigned int64
|
||||
if (programIndex % 2 == 0) {
|
||||
RET[programIndex] = saturating_add(a_max, b);
|
||||
}
|
||||
else {
|
||||
RET[programIndex] = saturating_add(a_min, b);
|
||||
}
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
if (programIndex % 2 == 0) {
|
||||
RET[programIndex] = (varying unsigned int64) 18446744073709551615;
|
||||
}
|
||||
else {
|
||||
RET[programIndex] = (varying unsigned int64) 5;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user