SIMD ISAReturn TypeNameArgumentsInstruction Group
Neonint32x2_tvrsra_n_s32(int32x2_t a, int32x2_t b, const int n)Shift / Right / Vector rounding shift right and accumulate
Description
Signed Rounding Shift Right and Accumulate (immediate). This instruction reads each vector element in the source SIMD&FP register, right shifts each result by an immediate value, and accumulates the final results with the vector elements of the destination SIMD&FP register. All the values in this instruction are signed integer values. The results are rounded. For truncated results, see SSRA.
Results
Vd.2S result
This intrinsic compiles to the following instructions:

SRSRA Vd.2S,Vn.2S,#n

Argument Preparation
a register: Vd.2Sb register: Vn.2Sn minimum: 1; maximum: 32
Architectures
v7, A32, A64

Operation

CheckFPAdvSIMDEnabled64();
bits(datasize) operand  = V[n];
bits(datasize) operand2;
bits(datasize) result;
integer round_const = if round then (1 << (shift - 1)) else 0;
integer element;

operand2 = if accumulate then V[d] else Zeros();
for e = 0 to elements-1
    element = (Int(Elem[operand, e, esize], unsigned) + round_const) >> shift;
    Elem[result, e, esize] = Elem[operand2, e, esize] + element<esize-1:0>;

V[d] = result;