Finish support for 64-bit types in stdlib. Fixes issue #14.
Add much more suppport for doubles and in64 types in the standard library, basically supporting everything for them that are supported for floats and int32s. (The notable exceptions being the approximate rcp() and rsqrt() functions, which don't really have sensible analogs for doubles (or at least not built-in instructions).)
This commit is contained in:
22
tests/reduce-add-int64-1.ispc
Normal file
22
tests/reduce-add-int64-1.ispc
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
|
||||
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
||||
float v = aFOO[programIndex];
|
||||
uniform float m;
|
||||
int64 iv = (int64)v;
|
||||
if (iv & 1)
|
||||
m = reduce_add(iv);
|
||||
RET[programIndex] = m;
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
uniform int x = -1234;
|
||||
if (programCount == 4) x = 4;
|
||||
else if (programCount == 8) x = 16;
|
||||
else if (programCount == 16) x = 64;
|
||||
RET[programIndex] = x;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user