/
redgpu
/
ispc
Обзор
Документация
Войти
/
redgpu
/
ispc
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
test
tests/half-3.ispc
19 строк
419 B
Dmitry Babokin
Remove debug prints under ISPC_TARGET_GENX from tests, they were not working anyway
31 авг 2021, 02:47
31 авг 2021, 02:47
ec21285
Код
Авторство
О чём код?
#include "../test_static.isph" task 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 = (!isnan(f) && i != h); errors += reduce_add(mismatches); } RET[programIndex] = errors; } task void result(uniform float RET[]) { RET[programIndex] = 0; }