www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10445] New: min and max attributes for SIMD registers

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 puremagic.com
        ReportedBy: bearophile_hugs eml.cc



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: -------
Jun 22 2013