These tests all fail with generic-16/c++ output currently; however, the output indicates that it's just small floating-point differences. (Though the question remains, why are those differences popping up?)
24 lines
554 B
Plaintext
24 lines
554 B
Plaintext
|
|
export uniform int width() { return programCount; }
|
|
|
|
export void f_v(uniform float RET[]) {
|
|
int errors = 0;
|
|
|
|
foreach (i = 0 ... 65535) {
|
|
unsigned int16 h = i;
|
|
float f = half_to_float(i);
|
|
h = float_to_half(f);
|
|
|
|
int mismatches = (f == f && i != h);
|
|
if (any(mismatches != 0))
|
|
print("mismatch: orig int16 % -> float % -> half %\n", i, f, h);
|
|
errors += reduce_add(mismatches);
|
|
}
|
|
|
|
RET[programIndex] = errors;
|
|
}
|
|
|
|
export void result(uniform float RET[]) {
|
|
RET[programIndex] = 0;
|
|
}
|