/
redgpu
/
ispc
Обзор
Документация
Войти
/
redgpu
/
ispc
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/cpu/simple_jit/simple.ispc
24 строки
628 B
Arina Neshlyaeva
Add simple_jit example
08 авг 2025, 21:42
08 авг 2025, 21:42
a996681
Код
Авторство
О чём код?
/* Copyright (c) 2025, Intel Corporation SPDX-License-Identifier: BSD-3-Clause */ export void simple(uniform float vin[], uniform float vout[], uniform int count) { foreach (index = 0 ... count) { // Load the appropriate input value for this program instance. float v = vin[index]; // Do an arbitrary little computation, but at least make the // computation dependent on the value being processed if (v < 3.) v = v * v; else v = sqrt(v); // And write the result to the output array. vout[index] = v; } }