Rivoreo Source Code Repositories
src.rivoreo.one
/
compiler-explorer
/
dc9c20a92203c5eb29ad5b5e1e91085b74d79c06
/
.
/
examples
/
ispc
/
Sum_array.ispc
blob: 7e1f3a555e22475889e9878775acc4f7a0a3a0ea [
file
] [
log
] [
blame
] [
raw
]
uniform
int
sumArray
(
uniform
int
input
[],
uniform
int
length
)
{
varying
int
sum
=
0
;
foreach
(
i
=
0
...
length
)
{
sum
+=
input
[
i
];
}
return
reduce_add
(
sum
);
}