Search results

  1. J

    Fast Neon 3-Term Cross Product

    Well, if you're building a vector math library for 2D/3D geometry and your primary aim is performance, it appears best to make your vector types just typedefs of the NEON intrinsic vector types found in arm_neon.h (float32x4_t, int32x4_t, etc.), make sure all of your basic functions are inlined...
  2. J

    Fast Neon 3-Term Cross Product

    I just noticed the cross product implementation in the math-neon library here, and I wanted to run it through the same benchmark as my other routines. For reference, here's the link: math-neon homepage. I tried out two different versions of it, the first without inlining as is the case in the...
  3. J

    Fast Neon 3-Term Cross Product

    Well, I think I've answered my own questions through some hard work. But if anyone is interested, here's what I arrived at. I rewrote my original version (using vrev/vdup to order terms) in inline assembly to test it, and it was a bit faster than the C version. I also came up a with a better...
  4. J

    Fast Neon 3-Term Cross Product

    So, I'm trying to come up with a fast 3D cross product using NEON instructions, and this is currently what I have: // cross3(v1, v2) = [ y1*z2 - y2*z1 , z1*x2 - z2*x1 , x1*y2 - x2*y1 ] float32x4_t cross3(float32x4_t v1, float32x4_t v2) { static uint32x4_t const cross3_mask = { 0x00000000...
Back
Top