Any usable SIMD implementation?
jmh530 via Digitalmars-d
digitalmars-d at puremagic.com
Fri Apr 15 11:54:12 PDT 2016
On Tuesday, 12 April 2016 at 10:55:18 UTC, xenon325 wrote:
>
> Have you seen how GCC's function multiversioning [1] ?
>
I've been thinking about the gcc multiversioning since you
mentioned it previously.
I keep thinking about how the optimal algorithm for something
like matrix multiplication depends on the size of the matrices.
For instance, you might do something for very small matrices that
just relies on one processor, then you add in SIMD as the size
grows, then you add in multiple CPUs, then you add in the GPU (or
maybe you add before CPUs), then you add in multiple computers.
I don't know how some of those choices would get made at compile
time for dynamic arrays. Would need some kind of run-time
approach. At least for static arrays, you could do multiple
versions of the function and then use template constraints to
call whichever function. Some tuning would be necessary.
More information about the Digitalmars-d
mailing list