PeterJensen
PeterJensen
Hi acterhd, Thank you for your interest in using the SIMD operations. The SIMD operations are added to make it possible to extract performance from architectures that support SIMD instructions....
ARM has them too: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491g/CIHJCAII.html We should include those, IMO
I think 2) above makes the most sense. Throwing a TypeError when the value cannot be coerced to a Number seems like the right thing to do, and there's precedence...
So you want one uint8x16 turned into four uint32x4 like this: input (uint8x16): rgba,rgba,rgba,rgba (r, g, b, and a are each 8 bits) output 0 (uint32x4): r,r,r,r (each r is...
Maybe something like this will do the trick: ``` function to4xUint32x4(src, dst) { var zerox16 = SIMD.Uint8x16.splat(0); var res0 = SIMD.Uint8x16.shuffle(src, zerox16, 0, 16, 16, 16, 4, 16, 16, 16,...
The reverse operation could be done like this: ``` function toUint8x16(src) { var res; var src0 = SIMD.Uint8x16.fromUint32x4Bits(SIMD.Uint32x4.load(src, 0)); var src1 = SIMD.Uint8x16.fromUint32x4Bits(SIMD.Uint32x4.load(src, 4)); var src2 = SIMD.Uint8x16.fromUint32x4Bits(SIMD.Uint32x4.load(src, 8)); var...
Thanks @juj much better! The code can be simplified a bit more (fewer conversions), if the input values (srcx) are kept as Uint32x4 values. The complete function now looks like...
We had previously decided to introduce 'unsigned' int operations for when signedness matters (division, shift, and compares). This is how LLVM does it too. However, it's not a nice symmetrical...
The amount of extra functions that will need to be added is substantial. On Int32x4 there's around 30 or so sign-agnostic operations (arithmetic, logical, shift, load, store, initializers, compares). Assuming...
Also worth keeping in mind: When increasing the size of the API by ~50% we also need 50% more unit tests.