[Issue 16703] New: Support indexing of SIMD vector types
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Nov 19 17:13:37 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16703
Issue ID: 16703
Summary: Support indexing of SIMD vector types
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
Indexing should work, at least on lvalues:
import core.simd;
float foo(float4 f4) {
// This should work
return f4[2];
// This currently does work
return (*cast(float[4]*)&f4)[2];
}
Slicing should also work:
float[4] foo(float4 f4) {
return f4[];
}
--
More information about the Digitalmars-d-bugs
mailing list