Any usable SIMD implementation?

Johannes Pfau via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 7 03:15:12 PDT 2016


Am Wed, 6 Apr 2016 20:27:31 -0700
schrieb Walter Bright <newshound2 at digitalmars.com>:

> On 4/6/2016 7:43 PM, Manu via Digitalmars-d wrote:
> >> 1. This has been characterized as a blocker, it is not, as it does
> >> not impede writing code that takes advantage of various SIMD code
> >> generation at compile time.  
> >
> > It's sufficiently blocking that I have not felt like working any
> > further without this feature present. I can't feel like it 'works'
> > or it's 'done', until I can demonstrate this functionality.
> > Perhaps we can call it a psychological blocker, and I am personally
> > highly susceptible to those.  
> 
> I can understand that it might be demotivating for you, but that is
> not a blocker. A blocker has no reasonable workaround. This has a
> trivial workaround:
> 
>     gdc -simd=AFX foo.d
> 
> becomes:
> 
>     gdc -simd=AFX -version=AFX foo.d
> 

The problem is that march=x can set more than one
feature flag. So instead of

gdc -march=armv7-a
you have to do
gdc -march=armv7-a -fversion=ARM_FEATURE_CRC32
-fversion=ARM_FEATURE_UNALIGNED ...

Sou have to know exactly which features are supported for a CPU.
Essentially you have to duplicate the CPU<=>feature database already
present in GCC (and likely LLVM too) in your Makefile. And you'll need
-march=armv7-a anyway to make sure the GCC codegen can use these
features as well.

So this issue is not a blocker, but what you propose is a workaround at
best, not a solution.


More information about the Digitalmars-d mailing list