20 lines
473 B
Plaintext
20 lines
473 B
Plaintext
#include "../test_static.isph"
|
|
task void f_v(uniform float RET[]) {
|
|
float sum = 0;
|
|
int errors = 0;
|
|
for (uniform int i = 0; i <= 0xffff; ++i) {
|
|
unsigned int16 h = i;
|
|
float f = half_to_float(i);
|
|
h = float_to_half(f);
|
|
|
|
// may return a different value back for NaNs..
|
|
if (!isnan(f) && i != h)
|
|
++errors;
|
|
}
|
|
RET[programIndex] = errors;
|
|
}
|
|
|
|
task void result(uniform float RET[]) {
|
|
RET[programIndex] = 0;
|
|
}
|