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 30th September 2011 at http://forums.arm.com


    One option would be do what a compiler normally does for ARM; use fixed point domain VRECPE to calculate 1/v1, etc, and then multiply out rather than divide, and then renormalize.


    Yes.
    That's exaclty what I'm looking for.

    I'd like to know how to use
    VRECPE.U32

    I don't understand what is the estimation of 1 / 1234  when I'm using U32 data type !

    I've found this code


    vrecpe.f32             d1, d5
    vrecps.f32             d2, d1, d5
    vmul.f32               d1, d1, d2
    vrecps.f32             d2, d1, d5
    vmul.f32               d5, d1, d2


    and it's work correctly with float operation.
    I'm looking for the same code using unsigned integer !
Reply
  • Note: This was originally posted on 30th September 2011 at http://forums.arm.com


    One option would be do what a compiler normally does for ARM; use fixed point domain VRECPE to calculate 1/v1, etc, and then multiply out rather than divide, and then renormalize.


    Yes.
    That's exaclty what I'm looking for.

    I'd like to know how to use
    VRECPE.U32

    I don't understand what is the estimation of 1 / 1234  when I'm using U32 data type !

    I've found this code


    vrecpe.f32             d1, d5
    vrecps.f32             d2, d1, d5
    vmul.f32               d1, d1, d2
    vrecps.f32             d2, d1, d5
    vmul.f32               d5, d1, d2


    and it's work correctly with float operation.
    I'm looking for the same code using unsigned integer !
Children
No data