How to use the multiply and accumulate intrinsics in ARM Cortex-a8?

后端 未结 3 1286
长发绾君心
长发绾君心 2021-02-05 14:51

how to use the Multiply-Accumulate intrinsics provided by GCC?

float32x4_t vmlaq_f32 (float32x4_t , float32x4_t , float32x4_t);

Can anyone expl

3条回答
  •  别跟我提以往
    2021-02-05 15:01

    Google'd for vmlaq_f32, turned up the reference for the RVCT compiler tools. Here's what it says:

    Vector multiply accumulate: vmla -> Vr[i] := Va[i] + Vb[i] * Vc[i]
    ...
    float32x4_t vmlaq_f32 (float32x4_t a, float32x4_t b, float32x4_t c);
    

    AND

    The following types are defined to represent vectors. NEON vector data types are named according to the following pattern: x_t For example, int16x4_t is a vector containing four lanes each containing a signed 16-bit integer. Table E.1 lists the vector data types.

    IOW, the return value from the function will be a vector containing 4 32-bit floats, and each element of the vector is calculated by multiplying the corresponding elements of b and c, and adding the contents of a.

    HTH

提交回复
热议问题