On Thursday, 3 November 2016 01:40:29 UTC, Nigel Tao wrote:
>
>
> Another ignorant question from me, but what do you mean exactly by 
> universal binary? 
>

Apologies for the confusing and nonsensical term. What I meant was a binary 
that works for a number of CPUs within an architecture, with or without 
SSE[n], AVX[n] etc.

>
> FWIW, the golang.org/x/image/vector package is portable, in that it 
> has an pure Go implementation. If compiled on GOARCH=amd64, it has 
> SIMD optimizations, guarded at runtime by a very cheap check (look for 
> haveFixedAccumulateSIMD). But that check is made once per e.g. 
> accumulate call (a higher level function composed of many SIMD ops), 
> not once per e.g. 128-bit add. 
>

That's the sort of cheap checks that I had mind in the very first post when 
I talked about "I envisaged a call to CPUID and then some bool tests along 
the way to utilise SSE[2-4]/AVX[2] (or NEON on ARM) if available. All in a 
static, portable package." Thanks for a good example of that.

O.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to