_gr_vec_apply_2x2, _gr_vec_apply_2x2_generic
#include <flint/gr_vec.h>int _gr_vec_apply_2x2_generic(gr_ptr u, gr_ptr v, slong stride, slong len, gr_srcptr M, gr_ctx_t ctx)sourceApplies the matrix , given row by row as a vector of length 4, to the pairs of elements of u and v: for , where = len and , are the elements at offset for = stride (in elements). With a plane rotation this is the rot operation of the BLAS, the building block of the QR algorithm (Numerical eigenvalues); the general form also serves Schur reordering. The vectors must not overlap and must not alias them.
This is the ring method GR_METHOD_VEC_APPLY_2X2. Since each new pair depends on both old elements, the generic version computes each pair into temporaries with two dot products of length 2 and does not rely on _gr_vec_dot allowing its output to overlap its inputs. The plain complex dfloat rings override it with a SIMD kernel (_d2c_vec_apply_2x2 and so on), which drops the products by the parts of that are exactly zero.
The FLINT team, “_gr_vec_apply_2x2, _gr_vec_apply_2x2_generic (gr_vec.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_vec/_gr_vec_apply_2x2.html (generated 2026-11-07).
@misc{flint-doc-gr-vec-gr-vec-apply-2x2,
author = {{The FLINT team}},
title = {{\_gr\_vec\_apply\_2x2, \_gr\_vec\_apply\_2x2\_generic (gr\_vec.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_vec/_gr_vec_apply_2x2.html},
note = {Generated 2026-11-07}
}