/
redgpu
/
ispc
Обзор
Документация
Войти
/
redgpu
/
ispc
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
test
tests_errors/reference-deref.ispc
10 строк
314 B
Matt Pharr
Distinguish between dereferencing pointers and references.
22 мар 2012, 17:48
22 мар 2012, 17:48
20044f5
Код
Авторство
О чём код?
// Illegal to dereference non-pointer type "uniform float &". export void simple_reduction(uniform float vin[], uniform int w, uniform float & result) { float sum = 0; foreach (i = 0 ... w) { sum += vin[i]; } *result = reduce_add(sum); // << I would expect this to produce a compiler error }