This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Division with NEON

Note: This was originally posted on 30th September 2011 at http://forums.arm.com

Hi.

I have 4 unsigned 16bit values into a Dn register (or 8 into a Qn register)

[v1] [v2] [v3] [v4]

I'm looking for the code to finaly have

[65536 / v1] [65536 / v2] [65536 / v3] [65536 / v4]

into another (or the same) Dn (or Qn) register...
Thank's

Etienne
Parents
  • Note: This was originally posted on 4th October 2011 at http://forums.arm.com

    Thank you for this explanation !!!!

    I've check the precision of the divide approxiamtion. You're right it is near to 8 bit!
    that enough for me. so finaly, the code I used is this one



    vcvt.f32.u32  q0, q0
    vrecpe.f32        q0, q0
    vmul.f32    q0, q0, q1   @ q1 = 65536
    vcvt.u32.f32  q0, q0


    precision is enough for my colour traitment !
    speed is quite correct !
Reply
  • Note: This was originally posted on 4th October 2011 at http://forums.arm.com

    Thank you for this explanation !!!!

    I've check the precision of the divide approxiamtion. You're right it is near to 8 bit!
    that enough for me. so finaly, the code I used is this one



    vcvt.f32.u32  q0, q0
    vrecpe.f32        q0, q0
    vmul.f32    q0, q0, q1   @ q1 = 65536
    vcvt.u32.f32  q0, q0


    precision is enough for my colour traitment !
    speed is quite correct !
Children
No data