www.digitalmars.com         C & C++   DMDScript  

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


           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

--- Comment #0 from bearophile_hugs 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: -------
Jun 22 2013