June 06, 2014
https://issues.dlang.org/show_bug.cgi?id=12869

          Issue ID: 12869
           Summary: std.algorithm.sum for core.simd too
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody@puremagic.com
          Reporter: bearophile_hugs@eml.cc

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;
}

--