Bug 12869 – std.algorithm.sum for core.simd too

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-06-06T17:19:45Z
Last change time
2024-12-01T16:21:24Z
Keywords
SIMD
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: phobos#10060 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10060 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB