[Issue 10445] New: min and max attributes for SIMD registers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 22 07:40:23 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10445
Summary: min and max attributes for SIMD registers
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-06-22 07:40:22 PDT ---
This SIMD code compiles, but it's not handy:
import core.simd;
void main() {
enum U = ubyte.max;
ubyte16 m = [U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U];
}
So maybe it's worth adding the ".max" and ".min" attributes to simd registers,
to allow:
import core.simd;
void main() {
auto a = ubyte16.max; // All initialized to ubyte.max.
auto b = int4.min; // All initizialized to int.min.
}
This also allows to write simd code that looks more like regular code.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list