[Interest] SIMD accelerated wrappers for relevant Qt container classes (QVector, ...) or QByteArray?
Allan Sandfeld Jensen
kde at carewolf.com
Tue May 9 22:49:53 CEST 2017
On Tuesday 09 May 2017, René J. V. Bertin wrote:
> Thiago Macieira wrote:
> > QString is already SIMD accelearated and has been since Qt 4.5.
>
> I'm perverse but not to the point that I'd consider using QString for math
> operations :)
>
> > If you want any inline operations to become SIMD accelerated, compile
> > your code with -O3.
>
> That'd only be as good as the compiler's auto-vectorisation, which rarely
> has a significant impact on anything but the simpler operations.
Anything you can write with SIMD arrays is simple enough that the compiler can
also auto-vectorize it as well. Just pretend the arrays you have are SIMD
arrays and write small simple loops that does the individual operations on
them, and they will be auto-vectorized
> Also, to get SIMD support and auto-vectorisation you need the correct
> -march CPU flag, no?
>
You would need that too with any SIMD-library. But at least on x64 SSE2 comes
for free, so some vectorization is always enabled. (same with amd64 and neon)
Best regards
`Allan
More information about the Interest
mailing list