Any usable SIMD implementation?
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Mon Apr 4 15:16:07 PDT 2016
On 4/4/2016 2:11 PM, jmh530 wrote:
> version(D_SIMD) will tell you when SIMD is implemented, but not what type of
> SIMD.
The first SIMD level.
> For instance, if I am on a machine that can use AVX2 instructions, then
> code in a version(D_SIMD) block will execute, but it should also execute if the
> processor only supports SSE4. What if the writer of an SIMD library wants to
> have code execute differently if SSE4 is detected instead of AVX2?
Use a runtime switch (see core.cpuid).
More information about the Digitalmars-d
mailing list