Comment #0 by bearophile_hugs — 2014-06-06T17:19:45Z
I suggest to support simd values from sum, because this is a common operation:
void main() {
import core.simd: int4;
import std.algorithm: sum;
int4 x = [1, 2, 3, 4];
int total = x.sum;
}
A workaround is to use this, that is not efficient:
void main() {
import core.simd: int4;
import std.algorithm: sum;
int4 x = [1, 2, 3, 4];
int total = x.array[].sum;
}
Comment #1 by robert.schadek — 2024-12-01T16:21:24Z