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
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/186dba1320fa1874bbfb71da1fa3f00ae07304d7 fix Issue 7411 - Deduce base type from vector types in templates