Re: [julia-users] Telling if code is vectorised.

2016-09-14 Thread Yichao Yu
On Wed, Sep 14, 2016 at 10:33 AM, Ben Ward wrote: > Hi, > > I've written a simple function: > > function testfun2() > a = 0 > @inbounds @simd for i in UInt64(1):UInt64(1000) > i = i - ((i >> 1) & 0x) > a += ((i &

[julia-users] Telling if code is vectorised.

2016-09-14 Thread Ben Ward
Hi, I've written a simple function: function testfun2() a = 0 @inbounds @simd for i in UInt64(1):UInt64(1000) i = i - ((i >> 1) & 0x) a += ((i & 0x) + ((i >> 2) & 0x)) end return a end I applies the same set of bit