[Issue 12429] New: SIMD vector type errors are too eager

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 21 05:43:28 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12429

           Summary: SIMD vector type errors are too eager
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: john.loughran.colvin at gmail.com


--- Comment #0 from John Colvin <john.loughran.colvin at gmail.com> 2014-03-21 12:43:27 GMT ---
template MakeVecType(Base, ubyte length)
{
    mixin(`alias MakeVecType = ` ~ Base.stringof ~ length.to!string() ~ `;`);
}

alias BaseT = float;
static if(is(MakeVecType!(BaseT, 8)))
{
    enum vecLength = 8;
}
else static if(is(MakeVecType!(BaseT, 4)))
{
    enum vecLength = 4;
}
else static if(is(MakeVecType!(BaseT, 2)))
{
    enum vecLength = 2;
}
else
{
    static assert(false, "Insufficient SIMD support");
}

fails to compile with the error
Error: AVX vector types not supported


If my understanding is correct, this shouldn't be an error. The first is(...)
should just evaluate to false.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list