Bug 7411 – Deduce base type from vector types in templates
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-31T10:30:00Z
Last change time
2012-02-28T19:28:56Z
Keywords
SIMD
Assigned to
nobody
Creator
turkeyman
Comments
Comment #0 by turkeyman — 2012-01-31T10:30:19Z
Something like this (Not sure if I have the syntax quite right):
template BaseTypeOfVector(T : __vector(T[N]), size_t N)
{
T is the type of the vector
N is the number of elements
}
It's important to be able to know the type and width of vectors at compile time to generate appropriate code.
Comment #1 by github-bugzilla — 2012-02-28T19:27:48Z