sum

test sum

version(grain_cuda)
float
sum
(
S
)
(
ref S a
)

Examples

example to fill value

auto d = CuPtr!float(3);
d.zero_();
auto h = d.toHost();
assert(h == [0, 0, 0]);
// assert(zeros!(CuPtr!float)(3).toHost() == [0, 0, 0]);
assert(d.fill_(3).toHost() == [3, 3, 3]);

Meta