/
redgpu
/
ispc
Обзор
Документация
Войти
/
redgpu
/
ispc
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
test
tests/2150.ispc
29 строк
620 B
Dmitry Babokin
Fix #2150: safety check for unary expressions
02 сен 2021, 03:38
02 сен 2021, 03:38
db7b147
Код
Авторство
О чём код?
#include "../test_static.isph" task void f_f(uniform float RET[], uniform float aFOO[]) { uniform int errorCount1 = 0; uniform int errorCount2 = 0; // uniform computation under varying condition should not be executed, as // none of the lanes compare as "false". if (aFOO[programIndex] < -1) { errorCount1++; } if (aFOO[programIndex] < -2) { ++errorCount1; } if (aFOO[programIndex] < -3) { errorCount2--; } if (aFOO[programIndex] < -4) { --errorCount2; } RET[programIndex] = errorCount1 - errorCount2; } task void result(uniform float RET[]) { RET[programIndex] = 0; }