zeros

create new CPU array filled with zero

zeros
(
T
)
(
size_t n
)
if (
isArray!T
)

Examples

float[] h = [1f, 2f, 3f];
h.zero_();
assert(h == [0f, 0f, 0f]);
assert(zeros!(HostStorage!float)(3) == [0f, 0f, 0f]);

Meta