|
cyqlone
develop
Fast, parallel and vectorized solver for linear systems with optimal control structure.
|
Linear algebra utilities (mostly vector operations).
Topics | |
| FLOP counts | |
Single-batch operations | |
| template<simdifiable Vx> | |
| norms< simdified_value_t< Vx > >::result | cyqlone::linalg::norms_all (Vx &&x) |
| Compute the norms (max, 1-norm, and 2-norm) of a vector. | |
| template<simdifiable Vx> | |
| simdified_value_t< Vx > | cyqlone::linalg::norm_inf (Vx &&x) |
| Compute the infinity norm of a vector. | |
| template<simdifiable Vx> | |
| simdified_value_t< Vx > | cyqlone::linalg::norm_1 (Vx &&x) |
| Compute the 1-norm of a vector. | |
| template<simdifiable Vx> | |
| simdified_value_t< Vx > | cyqlone::linalg::norm_2_squared (Vx &&x) |
| Compute the squared 2-norm of a vector. | |
| template<simdifiable Vx> | |
| simdified_value_t< Vx > | cyqlone::linalg::norm_2 (Vx &&x) |
| Compute the 2-norm of a vector. | |
| template<simdifiable Vx, simdifiable Vy> | |
| simdified_value_t< Vx > | cyqlone::linalg::dot (Vx &&x, Vy &&y) |
| Compute the dot product of two vectors. | |
| template<simdifiable Vx, simdifiable Vz, std::convertible_to< simdified_value_t< Vx > > T> | |
| void | cyqlone::linalg::scale (T alpha, Vx &&x, Vz &&z) |
| Multiply a vector by a scalar z = αx. | |
| template<simdifiable Vx, std::convertible_to< simdified_value_t< Vx > > T> | |
| void | cyqlone::linalg::scale (T alpha, Vx &&x) |
| Multiply a vector by a scalar x = αx. | |
| template<simdifiable Vx, simdifiable Vy, simdifiable Vz> | |
| void | cyqlone::linalg::hadamard (Vx &&x, Vy &&y, Vz &&z) |
| Compute the Hadamard (elementwise) product of two vectors z = x ⊙ y. | |
| template<simdifiable Vx, simdifiable Vy> | |
| void | cyqlone::linalg::hadamard (Vx &&x, Vy &&y) |
| Compute the Hadamard (elementwise) product of two vectors x = x ⊙ y. | |
| template<simdifiable Vx, simdifiable Vlo, simdifiable Vhi, simdifiable Vz> | |
| void | cyqlone::linalg::clamp (Vx &&x, Vlo &&lo, Vhi &&hi, Vz &&z) |
| Elementwise clamping z = max(lo, min(x, hi)). | |
| template<simdifiable Vx, simdifiable Vlo, simdifiable Vhi, simdifiable Vz> | |
| void | cyqlone::linalg::clamp_resid (Vx &&x, Vlo &&lo, Vhi &&hi, Vz &&z) |
| Elementwise clamping residual z = x - max(lo, min(x, hi)). | |
| template<simdifiable Vx, simdifiable Vy, simdifiable Vz, std::convertible_to< simdified_value_t< Vx > > Ta, std::convertible_to< simdified_value_t< Vx > > Tb> | |
| void | cyqlone::linalg::axpby (Ta alpha, Vx &&x, Tb beta, Vy &&y, Vz &&z) |
| Add scaled vector z = αx + βy. | |
| template<simdifiable Vx, simdifiable Vy, std::convertible_to< simdified_value_t< Vx > > Ta, std::convertible_to< simdified_value_t< Vx > > Tb> | |
| void | cyqlone::linalg::axpby (Ta alpha, Vx &&x, Tb beta, Vy &&y) |
| Add scaled vector y = αx + βy. | |
| template<auto Beta = 1, simdifiable Vy, simdifiable... Vx> | |
| void | cyqlone::linalg::axpy (Vy &&y, const std::array< simdified_value_t< Vy >, sizeof...(Vx)> &alphas, Vx &&...x) |
| Add scaled vector y = ∑ᵢ αᵢxᵢ + βy. | |
| template<simdifiable Vx, simdifiable Vy, simdifiable Vz, std::convertible_to< simdified_value_t< Vx > > Ta> | |
| void | cyqlone::linalg::axpy (Ta alpha, Vx &&x, Vy &&y, Vz &&z) |
| Add scaled vector z = αx + y. | |
| template<auto Beta = 1, simdifiable Vx, simdifiable Vy, std::convertible_to< simdified_value_t< Vx > > Ta> | |
| void | cyqlone::linalg::axpy (Ta alpha, Vx &&x, Vy &&y) |
| Add scaled vector y = αx + βy (where β is a compile-time constant). | |
| template<simdifiable VA, simdifiable VB, int Rotate = 0> | |
| void | cyqlone::linalg::negate (VA &&A, VB &&B, with_rotate_t< Rotate >={}) |
| Negate a matrix or vector B = -A. | |
| template<simdifiable VA, int Rotate = 0> | |
| void | cyqlone::linalg::negate (VA &&A, with_rotate_t< Rotate >={}) |
| Negate a matrix or vector A = -A. | |
| template<simdifiable VA, simdifiable VB, simdifiable VC, int Rotate = 0> | |
| void | cyqlone::linalg::sub (VA &&A, VB &&B, VC &&C, with_rotate_t< Rotate >={}) |
| Subtract two matrices or vectors C = A - B. Rotate affects B. | |
| template<simdifiable VA, simdifiable VB, int Rotate = 0> | |
| void | cyqlone::linalg::sub (VA &&A, VB &&B, with_rotate_t< Rotate >={}) |
| Subtract two matrices or vectors A = A - B. Rotate affects B. | |
| template<simdifiable VA, simdifiable VB, simdifiable VC, int Rotate = 0> | |
| void | cyqlone::linalg::add (VA &&A, VB &&B, VC &&C, with_rotate_t< Rotate >={}) |
| Add two matrices or vectors C = A + B. Rotate affects B. | |
| template<simdifiable VA, simdifiable VB, int Rotate = 0> | |
| void | cyqlone::linalg::add (VA &&A, VB &&B, with_rotate_t< Rotate >={}) |
| Add two matrices or vectors A = A + B. Rotate affects B. | |
| template<class F, simdifiable VA, simdifiable... VAs> | |
| void | cyqlone::linalg::for_each_elementwise (F &&fun, VA &&A, VAs &&...As) |
| Apply a function to all elements of the given matrices or vectors. | |
| template<class F, simdifiable VA, simdifiable... VAs> | |
| void | cyqlone::linalg::transform_elementwise (F &&fun, VA &&A, VAs &&...As) |
| Apply a function to all elements of the given matrices or vectors, storing the result in the first argument. | |
| template<class F, simdifiable VA, simdifiable VB, simdifiable... VAs> | |
| void | cyqlone::linalg::transform2_elementwise (F &&fun, VA &&A, VB &&B, VAs &&...As) |
| Apply a function to all elements of the given matrices or vectors, storing the results in the first two arguments. | |
| template<class F, simdifiable... VAs, simdifiable... VBs> | |
| void | cyqlone::linalg::transform_n_elementwise (F &&fun, std::tuple< VAs... > As, VBs &&...Bs) |
| Apply a function to all elements of the given matrices or vectors, storing the results in the tuple of matrices given as the first argument. | |
Multi-batch operations | |
| template<simdifiable_multi Vx> | |
| norms< simdified_value_t< Vx > >::result | cyqlone::linalg::multi::norms_all (Vx &&x) |
| Compute the norms (max, 1-norm, and 2-norm) of a vector. | |
| template<simdifiable_multi Vx> | |
| simdified_value_t< Vx > | cyqlone::linalg::multi::norm_inf (Vx &&x) |
| Compute the infinity norm of a vector. | |
| template<simdifiable_multi Vx> | |
| simdified_value_t< Vx > | cyqlone::linalg::multi::norm_1 (Vx &&x) |
| Compute the 1-norm of a vector. | |
| template<simdifiable_multi Vx> | |
| simdified_value_t< Vx > | cyqlone::linalg::multi::norm_2_squared (Vx &&x) |
| Compute the squared 2-norm of a vector. | |
| template<simdifiable_multi Vx> | |
| simdified_value_t< Vx > | cyqlone::linalg::multi::norm_2 (Vx &&x) |
| Compute the 2-norm of a vector. | |
| template<simdifiable_multi Vx, simdifiable_multi Vy> | |
| simdified_value_t< Vx > | cyqlone::linalg::multi::dot (Vx &&x, Vy &&y) |
| Compute the dot product of two vectors. | |
| template<simdifiable_multi Vx, simdifiable_multi Vz, std::convertible_to< simdified_value_t< Vx > > T> | |
| void | cyqlone::linalg::multi::scale (T alpha, Vx &&x, Vz &&z) |
| Multiply a vector by a scalar z = αx. | |
| template<simdifiable_multi Vx, std::convertible_to< simdified_value_t< Vx > > T> | |
| void | cyqlone::linalg::multi::scale (T alpha, Vx &&x) |
| Multiply a vector by a scalar x = αx. | |
| template<simdifiable_multi Vx, simdifiable_multi Vy, simdifiable_multi Vz> | |
| void | cyqlone::linalg::multi::hadamard (Vx &&x, Vy &&y, Vz &&z) |
| Compute the Hadamard (elementwise) product of two vectors z = x ⊙ y. | |
| template<simdifiable_multi Vx, simdifiable_multi Vy> | |
| void | cyqlone::linalg::multi::hadamard (Vx &&x, Vy &&y) |
| Compute the Hadamard (elementwise) product of two vectors x = x ⊙ y. | |
| template<simdifiable_multi Vx, simdifiable_multi Vlo, simdifiable_multi Vhi, simdifiable_multi Vz> | |
| void | cyqlone::linalg::multi::clamp (Vx &&x, Vlo &&lo, Vhi &&hi, Vz &&z) |
| Elementwise clamping z = max(lo, min(x, hi)). | |
| template<simdifiable_multi Vx, simdifiable_multi Vlo, simdifiable_multi Vhi, simdifiable_multi Vz> | |
| void | cyqlone::linalg::multi::clamp_resid (Vx &&x, Vlo &&lo, Vhi &&hi, Vz &&z) |
| Elementwise clamping residual z = x - max(lo, min(x, hi)). | |
| template<simdifiable_multi Vx, simdifiable_multi Vy, simdifiable_multi Vz, std::convertible_to< simdified_value_t< Vx > > Ta, std::convertible_to< simdified_value_t< Vx > > Tb> | |
| void | cyqlone::linalg::multi::axpby (Ta alpha, Vx &&x, Tb beta, Vy &&y, Vz &&z) |
| Add scaled vector z = αx + βy. | |
| template<simdifiable_multi Vx, simdifiable_multi Vy, std::convertible_to< simdified_value_t< Vx > > Ta, std::convertible_to< simdified_value_t< Vx > > Tb> | |
| void | cyqlone::linalg::multi::axpby (Ta alpha, Vx &&x, Tb beta, Vy &&y) |
| Add scaled vector y = αx + βy. | |
| template<auto Beta = 1, simdifiable_multi Vy, simdifiable_multi... Vx> | |
| void | cyqlone::linalg::multi::axpy (Vy &&y, const std::array< simdified_value_t< Vy >, sizeof...(Vx)> &alphas, Vx &&...x) |
| Add scaled vector y = ∑ᵢ αᵢxᵢ + βy. | |
| template<simdifiable_multi Vx, simdifiable_multi Vy, simdifiable_multi Vz, std::convertible_to< simdified_value_t< Vx > > Ta> | |
| void | cyqlone::linalg::multi::axpy (Ta alpha, Vx &&x, Vy &&y, Vz &&z) |
| Add scaled vector z = αx + y. | |
| template<auto Beta = 1, simdifiable_multi Vx, simdifiable_multi Vy, std::convertible_to< simdified_value_t< Vx > > Ta> | |
| void | cyqlone::linalg::multi::axpy (Ta alpha, Vx &&x, Vy &&y) |
| Add scaled vector y = αx + βy (where β is a compile-time constant). | |
| template<simdifiable_multi VA, simdifiable_multi VB, int Rotate = 0> | |
| void | cyqlone::linalg::multi::negate (VA &&A, VB &&B, with_rotate_t< Rotate > rot={}) |
| Negate a matrix or vector B = -A. | |
| template<simdifiable_multi VA, int Rotate = 0> | |
| void | cyqlone::linalg::multi::negate (VA &&A, with_rotate_t< Rotate > rot={}) |
| Negate a matrix or vector A = -A. | |
| template<simdifiable_multi VA, simdifiable_multi VB, simdifiable_multi VC, int Rotate = 0> | |
| void | cyqlone::linalg::multi::sub (VA &&A, VB &&B, VC &&C, with_rotate_t< Rotate > rot={}) |
| Subtract two matrices or vectors C = A - B. Rotate affects B. | |
| template<simdifiable_multi VA, simdifiable_multi VB, int Rotate = 0> | |
| void | cyqlone::linalg::multi::sub (VA &&A, VB &&B, with_rotate_t< Rotate > rot={}) |
| Subtract two matrices or vectors A = A - B. Rotate affects B. | |
| template<simdifiable_multi VA, simdifiable_multi VB, simdifiable_multi VC, int Rotate = 0> | |
| void | cyqlone::linalg::multi::add (VA &&A, VB &&B, VC &&C, with_rotate_t< Rotate > rot={}) |
| Add two matrices or vectors C = A + B. Rotate affects B. | |
| template<simdifiable_multi VA, simdifiable_multi VB, int Rotate = 0> | |
| void | cyqlone::linalg::multi::add (VA &&A, VB &&B, with_rotate_t< Rotate > rot={}) |
| Add two matrices or vectors A = A + B. Rotate affects B. | |
| template<class F, simdifiable_multi VA, simdifiable_multi... VAs> | |
| void | cyqlone::linalg::multi::for_each_elementwise (F &&fun, VA &&A, VAs &&...As) |
| Apply a function to all elements of the given matrices or vectors. | |
| template<class F, simdifiable_multi VA, simdifiable_multi... VAs> | |
| void | cyqlone::linalg::multi::transform_elementwise (F &&fun, VA &&A, VAs &&...As) |
| Apply a function to all elements of the given matrices or vectors, storing the result in the first argument. | |
| template<class F, simdifiable_multi VA, simdifiable_multi VB, simdifiable_multi... VAs> | |
| void | cyqlone::linalg::multi::transform2_elementwise (F &&fun, VA &&A, VB &&B, VAs &&...As) |
| Apply a function to all elements of the given matrices or vectors, storing the results in the first two arguments. | |
| template<class F, simdifiable_multi... VAs, simdifiable_multi... VBs> | |
| void | cyqlone::linalg::multi::transform_n_elementwise (F &&fun, std::tuple< VAs... > As, VBs &&...Bs) |
| Apply a function to all elements of the given matrices or vectors, storing the results in the tuple of matrices given as the first argument. | |
| template<simdifiable_multi VA, simdifiable_multi VB, batmat::linalg::rotate_opt... Opts> | |
| void | cyqlone::linalg::multi::copy (VA &&A, VB &&B, Opts... opts) |
| Copy a matrix or vector B = A. | |
| template<MatrixStructure S, simdifiable_multi VA, simdifiable_multi VB, batmat::linalg::rotate_opt... Opts> | |
| void | cyqlone::linalg::multi::copy (Structured< VA, S > A, Structured< VB, S > B, Opts... opts) |
| Copy a matrix or vector B = A. | |
Packing and unpacking | |
| template<simdifiable VA, class VB> | |
| void | cyqlone::linalg::unpack (VA &&A, VB &&B) |
Copy a compact batch of matrices A to multiple scalar matrices B. | |
| template<class VA, simdifiable VB> | |
| void | cyqlone::linalg::pack (VA &&A, VB &&B) |
Copy multiple scalar matrices A to a compact batch of matrices B. | |
Enumerations | |
| enum | PackingSelector { batmat::linalg::PackingSelector::Never , batmat::linalg::PackingSelector::Always , batmat::linalg::PackingSelector::Transpose } |
| enum | MatrixStructure { batmat::linalg::MatrixStructure::General , batmat::linalg::MatrixStructure::LowerTriangular , batmat::linalg::MatrixStructure::UpperTriangular } |
Functions | |
| index_t | batmat::linalg::compress_masks (VA &&Ain, VS &&Sin, VAo &&Aout, VSo &&Sout) |
| index_t | batmat::linalg::compress_masks_count (VS &&Sin) |
| index_t | batmat::linalg::compress_masks_sqrt (VA &&Ain, VS &&Sin, VAo &&Aout) |
| index_t | batmat::linalg::compress_masks_sqrt (VA &&Ain, VS &&Sin, VAo &&Aout, VSo &&Sout) |
| void | batmat::linalg::copy (VA &&A, VB &&B, Opts... opts) |
| void | batmat::linalg::copy (Structured< VA, S > A, Structured< VB, S > B, Opts... opts) |
| void | batmat::linalg::fill (simdified_value_t< VB > a, VB &&B) |
| void | batmat::linalg::fill (simdified_value_t< VB > a, Structured< VB, S > B) |
| void | batmat::linalg::gemm_diag (VA &&A, VB &&B, VD &&D, Vd &&d, Opts... opts) |
| void | batmat::linalg::gemm_diag_add (VA &&A, VB &&B, VC &&C, VD &&D, Vd &&d, Opts... opts) |
| void | batmat::linalg::gemm_diag_add (VA &&A, VB &&B, VD &&D, Vd &&d, Opts... opts) |
| void | batmat::linalg::syrk_diag_add (VA &&A, Structured< VC, SC > C, Structured< VD, SC > D, Vd &&d, Opts... opts) |
| void | batmat::linalg::syrk_diag_add (VA &&A, Structured< VD, SC > D, Vd &&d, Opts... opts) |
| void | batmat::linalg::gemm (VA &&A, VB &&B, VD &&D, TilingOptions packing={}, Opts... opts) |
| void | batmat::linalg::gemm_neg (VA &&A, VB &&B, VD &&D, TilingOptions packing={}, Opts... opts) |
| void | batmat::linalg::gemm_add (VA &&A, VB &&B, VC &&C, VD &&D, TilingOptions packing={}, Opts... opts) |
| void | batmat::linalg::gemm_add (VA &&A, VB &&B, VD &&D, TilingOptions packing={}, Opts... opts) |
| void | batmat::linalg::gemm_sub (VA &&A, VB &&B, VC &&C, VD &&D, TilingOptions packing={}, Opts... opts) |
| void | batmat::linalg::gemm_sub (VA &&A, VB &&B, VD &&D, TilingOptions packing={}, Opts... opts) |
| void | batmat::linalg::syrk (Structured< VA, SA > A, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::syrk (TA &&A, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::syrk (Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::syrk_neg (Structured< VA, SA > A, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::syrk_neg (TA &&A, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::syrk_neg (Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::syrk_add (VA &&A, Structured< VC, SD > C, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::syrk_add (VA &&A, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::syrk_sub (VA &&A, Structured< VC, SD > C, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::syrk_sub (VA &&A, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::trmm (Structured< VA, SA > A, Structured< VB, SB > B, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::trmm (TA &&A, TB &&B, TD &&D, Opts... opts) |
| void | batmat::linalg::trmm (Structured< VA, SA > A, VD &&D, Opts... opts) |
| void | batmat::linalg::trmm (VD &&D, Structured< VB, SB > B, Opts... opts) |
| void | batmat::linalg::trmm_neg (Structured< VA, SA > A, Structured< VB, SB > B, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::trmm_neg (TA &&A, TB &&B, TD &&D, Opts... opts) |
| void | batmat::linalg::trmm_add (Structured< VA, SA > A, Structured< VB, SB > B, Structured< VC, SD > C, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::trmm_add (TA &&A, TB &&B, TC &&C, TD &&D, Opts... opts) |
| void | batmat::linalg::trmm_sub (Structured< VA, SA > A, Structured< VB, SB > B, Structured< VC, SD > C, Structured< VD, SD > D, Opts... opts) |
| void | batmat::linalg::trmm_sub (TA &&A, TB &&B, TC &&C, TD &&D, Opts... opts) |
| void | batmat::linalg::gemv (VA &&A, VB &&B, VD &&D, Opts... opts) |
| void | batmat::linalg::gemv_neg (VA &&A, VB &&B, VD &&D, Opts... opts) |
| void | batmat::linalg::gemv_add (VA &&A, VB &&B, VC &&C, VD &&D, Opts... opts) |
| void | batmat::linalg::gemv_add (VA &&A, VB &&B, VD &&D, Opts... opts) |
| void | batmat::linalg::gemv_sub (VA &&A, VB &&B, VC &&C, VD &&D, Opts... opts) |
| void | batmat::linalg::gemv_sub (VA &&A, VB &&B, VD &&D, Opts... opts) |
| void | batmat::linalg::hyhound_diag (Structured< VL, SL > L, VA &&A, Vd &&d) |
| void | batmat::linalg::hyhound_diag (Structured< VL, SL > L, VA &&A, Vd &&d, VW &&W) |
| auto | batmat::linalg::hyhound_size_W (Structured< VL, SL > L) |
| void | batmat::linalg::hyhound_diag_apply (VL &&L, VA &&A, VD &&D, VB &&B, Vd &&d, VW &&W, index_t kA_in_offset=0) |
| void | batmat::linalg::hyhound_diag_apply (VL &&L, VA &&A, VB &&B, Vd &&d, VW &&W) |
| void | batmat::linalg::hyhound_sign (Structured< VL, SL > L, VA &&A, Vd &&d) |
| void | batmat::linalg::hyhound_diag_2 (Structured< VL1, SL > L1, VA1 &&A1, VL2 &&L2, VA2 &&A2, Vd &&d) |
| void | batmat::linalg::hyhound_diag_cyclic (Structured< VL11, SL > L11, VA1 &&A1, VL21 &&L21, VA2 &&A22, VA2o &&A2_out, VU &&L31, VA3 &&A31, VA3o &&A3_out, Vd &&d) |
| void | batmat::linalg::hyhound_diag_riccati (Structured< VL11, SL > L11, VA1 &&A1, VL21 &&L21, VA2 &&A2, VA2o &&A2_out, VLu1 &&Lu1, VAuo &&Au_out, Vd &&d, bool shift_A_out=false) |
| void | batmat::linalg::syrk_add_potrf (VA &&A, Structured< VC, SC > C, Structured< VD, SC > D, simdified_value_t< VA > regularization=0) |
| void | batmat::linalg::syrk_add_potrf (VA &&A, Structured< VD, SC > D) |
| void | batmat::linalg::syrk_sub_potrf (VA &&A, Structured< VC, SC > C, Structured< VD, SC > D, simdified_value_t< VA > regularization=0) |
| void | batmat::linalg::syrk_sub_potrf (VA &&A, Structured< VD, SC > D, simdified_value_t< VA > regularization=0) |
| void | batmat::linalg::syrk_diag_add_potrf (VA &&A, Structured< VC, SC > C, Structured< VD, SC > D, Vd &&d, simdified_value_t< VA > regularization=0) |
| void | batmat::linalg::syrk_diag_add_potrf (VA &&A, Structured< VD, SC > D, Vd &&d) |
| void | batmat::linalg::potrf (Structured< VC, SC > C, Structured< VD, SC > D, simdified_value_t< VC > regularization=0) |
| void | batmat::linalg::potrf (Structured< VD, SD > D, simdified_value_t< VD > regularization=0) |
| void | batmat::linalg::symm_add (Structured< VA, SA > A, VB &&B, VC &&C, VD &&D) |
| void | batmat::linalg::symm_add (Structured< VA, SA > A, VB &&B, VD &&D) |
| void | batmat::linalg::symv (Structured< VA, SA > A, VB &&B, VD &&D) |
| void | batmat::linalg::symv_neg (Structured< VA, SA > A, VB &&B, VD &&D) |
| void | batmat::linalg::symv_add (Structured< VA, SA > A, VB &&B, VC &&C, VD &&D) |
| void | batmat::linalg::symv_add (Structured< VA, SA > A, VB &&B, VD &&D) |
| void | batmat::linalg::symv_sub (Structured< VA, SA > A, VB &&B, VC &&C, VD &&D) |
| void | batmat::linalg::symv_sub (Structured< VA, SA > A, VB &&B, VD &&D) |
| void | batmat::linalg::syomv (Structured< VA, SA > A, VB &&B, VD &&D) |
| void | batmat::linalg::syomv_neg (Structured< VA, SA > A, VB &&B, VD &&D) |
| constexpr auto | batmat::linalg::tril (M &&m) |
| constexpr auto | batmat::linalg::triu (M &&m) |
| constexpr auto | batmat::linalg::make_structured (M &&m) |
| void | batmat::linalg::trsm (Structured< VA, SA > A, VB &&B, VD &&D, with_rotate_B_t< RotB >={}) |
| void | batmat::linalg::trsm (Structured< VA, SA > A, VD &&D, with_rotate_B_t< RotB > shift={}) |
| void | batmat::linalg::trsm (VA &&A, Structured< VB, SB > B, VD &&D, with_rotate_A_t< RotA >={}) |
| void | batmat::linalg::trsm (VD &&D, Structured< VB, SB > B, with_rotate_A_t< RotA > shift={}) |
| void | batmat::linalg::trtri (Structured< VA, MatrixStructure::LowerTriangular > A, Structured< VD, MatrixStructure::LowerTriangular > D) |
| void | batmat::linalg::trtri (Structured< VA, MatrixStructure::UpperTriangular > A, Structured< VD, MatrixStructure::UpperTriangular > D) |
| void | batmat::linalg::trtri (Structured< VD, MatrixStructure::LowerTriangular > D) |
| void | batmat::linalg::trtri (Structured< VD, MatrixStructure::UpperTriangular > D) |
| constexpr MatrixStructure | batmat::linalg::transpose (MatrixStructure s) |
| batmat::linalg::Structured (M &&) -> Structured< M > | |
| norms< simdified_value_t< Vx > >::result cyqlone::linalg::norms_all | ( | Vx && | x | ) |
#include <cyqlone/linalg.hpp>
Compute the norms (max, 1-norm, and 2-norm) of a vector.
Definition at line 254 of file linalg.hpp.
| simdified_value_t< Vx > cyqlone::linalg::norm_inf | ( | Vx && | x | ) |
#include <cyqlone/linalg.hpp>
Compute the infinity norm of a vector.
Definition at line 260 of file linalg.hpp.
| simdified_value_t< Vx > cyqlone::linalg::norm_1 | ( | Vx && | x | ) |
#include <cyqlone/linalg.hpp>
Compute the 1-norm of a vector.
Definition at line 266 of file linalg.hpp.
| simdified_value_t< Vx > cyqlone::linalg::norm_2_squared | ( | Vx && | x | ) |
#include <cyqlone/linalg.hpp>
Compute the squared 2-norm of a vector.
Definition at line 272 of file linalg.hpp.
| simdified_value_t< Vx > cyqlone::linalg::norm_2 | ( | Vx && | x | ) |
#include <cyqlone/linalg.hpp>
Compute the 2-norm of a vector.
Definition at line 278 of file linalg.hpp.
| simdified_value_t< Vx > cyqlone::linalg::dot | ( | Vx && | x, |
| Vy && | y ) |
#include <cyqlone/linalg.hpp>
Compute the dot product of two vectors.
Definition at line 286 of file linalg.hpp.
| void cyqlone::linalg::scale | ( | T | alpha, |
| Vx && | x, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Multiply a vector by a scalar z = αx.
Definition at line 294 of file linalg.hpp.
| void cyqlone::linalg::scale | ( | T | alpha, |
| Vx && | x ) |
#include <cyqlone/linalg.hpp>
Multiply a vector by a scalar x = αx.
Definition at line 301 of file linalg.hpp.
| void cyqlone::linalg::hadamard | ( | Vx && | x, |
| Vy && | y, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Compute the Hadamard (elementwise) product of two vectors z = x ⊙ y.
Definition at line 309 of file linalg.hpp.
| void cyqlone::linalg::hadamard | ( | Vx && | x, |
| Vy && | y ) |
#include <cyqlone/linalg.hpp>
Compute the Hadamard (elementwise) product of two vectors x = x ⊙ y.
Definition at line 317 of file linalg.hpp.
| void cyqlone::linalg::clamp | ( | Vx && | x, |
| Vlo && | lo, | ||
| Vhi && | hi, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Elementwise clamping z = max(lo, min(x, hi)).
Definition at line 325 of file linalg.hpp.
| void cyqlone::linalg::clamp_resid | ( | Vx && | x, |
| Vlo && | lo, | ||
| Vhi && | hi, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Elementwise clamping residual z = x - max(lo, min(x, hi)).
Definition at line 333 of file linalg.hpp.
| void cyqlone::linalg::axpby | ( | Ta | alpha, |
| Vx && | x, | ||
| Tb | beta, | ||
| Vy && | y, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Add scaled vector z = αx + βy.
Definition at line 343 of file linalg.hpp.
| void cyqlone::linalg::axpby | ( | Ta | alpha, |
| Vx && | x, | ||
| Tb | beta, | ||
| Vy && | y ) |
#include <cyqlone/linalg.hpp>
Add scaled vector y = αx + βy.
Definition at line 353 of file linalg.hpp.
| void cyqlone::linalg::axpy | ( | Vy && | y, |
| const std::array< simdified_value_t< Vy >, sizeof...(Vx)> & | alphas, | ||
| Vx &&... | x ) |
#include <cyqlone/linalg.hpp>
Add scaled vector y = ∑ᵢ αᵢxᵢ + βy.
Definition at line 361 of file linalg.hpp.
| void cyqlone::linalg::axpy | ( | Ta | alpha, |
| Vx && | x, | ||
| Vy && | y, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Add scaled vector z = αx + y.
Definition at line 370 of file linalg.hpp.
| void cyqlone::linalg::axpy | ( | Ta | alpha, |
| Vx && | x, | ||
| Vy && | y ) |
#include <cyqlone/linalg.hpp>
Add scaled vector y = αx + βy (where β is a compile-time constant).
Definition at line 378 of file linalg.hpp.
| void cyqlone::linalg::negate | ( | VA && | A, |
| VB && | B, | ||
| with_rotate_t< Rotate > | = {} ) |
#include <cyqlone/linalg.hpp>
Negate a matrix or vector B = -A.
Definition at line 386 of file linalg.hpp.
| void cyqlone::linalg::negate | ( | VA && | A, |
| with_rotate_t< Rotate > | = {} ) |
#include <cyqlone/linalg.hpp>
Negate a matrix or vector A = -A.
Definition at line 393 of file linalg.hpp.
| void cyqlone::linalg::sub | ( | VA && | A, |
| VB && | B, | ||
| VC && | C, | ||
| with_rotate_t< Rotate > | = {} ) |
#include <cyqlone/linalg.hpp>
Subtract two matrices or vectors C = A - B. Rotate affects B.
Definition at line 401 of file linalg.hpp.
| void cyqlone::linalg::sub | ( | VA && | A, |
| VB && | B, | ||
| with_rotate_t< Rotate > | = {} ) |
#include <cyqlone/linalg.hpp>
Subtract two matrices or vectors A = A - B. Rotate affects B.
Definition at line 409 of file linalg.hpp.
| void cyqlone::linalg::add | ( | VA && | A, |
| VB && | B, | ||
| VC && | C, | ||
| with_rotate_t< Rotate > | = {} ) |
#include <cyqlone/linalg.hpp>
Add two matrices or vectors C = A + B. Rotate affects B.
Definition at line 417 of file linalg.hpp.
| void cyqlone::linalg::add | ( | VA && | A, |
| VB && | B, | ||
| with_rotate_t< Rotate > | = {} ) |
#include <cyqlone/linalg.hpp>
Add two matrices or vectors A = A + B. Rotate affects B.
Definition at line 425 of file linalg.hpp.
| void cyqlone::linalg::for_each_elementwise | ( | F && | fun, |
| VA && | A, | ||
| VAs &&... | As ) |
#include <cyqlone/linalg.hpp>
Apply a function to all elements of the given matrices or vectors.
Definition at line 433 of file linalg.hpp.
| void cyqlone::linalg::transform_elementwise | ( | F && | fun, |
| VA && | A, | ||
| VAs &&... | As ) |
#include <cyqlone/linalg.hpp>
Apply a function to all elements of the given matrices or vectors, storing the result in the first argument.
Definition at line 443 of file linalg.hpp.
| void cyqlone::linalg::transform2_elementwise | ( | F && | fun, |
| VA && | A, | ||
| VB && | B, | ||
| VAs &&... | As ) |
#include <cyqlone/linalg.hpp>
Apply a function to all elements of the given matrices or vectors, storing the results in the first two arguments.
Definition at line 453 of file linalg.hpp.
| void cyqlone::linalg::transform_n_elementwise | ( | F && | fun, |
| std::tuple< VAs... > | As, | ||
| VBs &&... | Bs ) |
#include <cyqlone/linalg.hpp>
Apply a function to all elements of the given matrices or vectors, storing the results in the tuple of matrices given as the first argument.
Definition at line 463 of file linalg.hpp.
| norms< simdified_value_t< Vx > >::result cyqlone::linalg::multi::norms_all | ( | Vx && | x | ) |
#include <cyqlone/linalg.hpp>
Compute the norms (max, 1-norm, and 2-norm) of a vector.
Definition at line 488 of file linalg.hpp.
| simdified_value_t< Vx > cyqlone::linalg::multi::norm_inf | ( | Vx && | x | ) |
#include <cyqlone/linalg.hpp>
Compute the infinity norm of a vector.
Definition at line 497 of file linalg.hpp.
| simdified_value_t< Vx > cyqlone::linalg::multi::norm_1 | ( | Vx && | x | ) |
#include <cyqlone/linalg.hpp>
Compute the 1-norm of a vector.
Definition at line 503 of file linalg.hpp.
| simdified_value_t< Vx > cyqlone::linalg::multi::norm_2_squared | ( | Vx && | x | ) |
#include <cyqlone/linalg.hpp>
Compute the squared 2-norm of a vector.
Definition at line 509 of file linalg.hpp.
| simdified_value_t< Vx > cyqlone::linalg::multi::norm_2 | ( | Vx && | x | ) |
#include <cyqlone/linalg.hpp>
Compute the 2-norm of a vector.
Definition at line 518 of file linalg.hpp.
| simdified_value_t< Vx > cyqlone::linalg::multi::dot | ( | Vx && | x, |
| Vy && | y ) |
#include <cyqlone/linalg.hpp>
Compute the dot product of two vectors.
Definition at line 526 of file linalg.hpp.
| void cyqlone::linalg::multi::scale | ( | T | alpha, |
| Vx && | x, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Multiply a vector by a scalar z = αx.
Definition at line 537 of file linalg.hpp.
| void cyqlone::linalg::multi::scale | ( | T | alpha, |
| Vx && | x ) |
#include <cyqlone/linalg.hpp>
Multiply a vector by a scalar x = αx.
Definition at line 545 of file linalg.hpp.
| void cyqlone::linalg::multi::hadamard | ( | Vx && | x, |
| Vy && | y, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Compute the Hadamard (elementwise) product of two vectors z = x ⊙ y.
Definition at line 553 of file linalg.hpp.
| void cyqlone::linalg::multi::hadamard | ( | Vx && | x, |
| Vy && | y ) |
#include <cyqlone/linalg.hpp>
Compute the Hadamard (elementwise) product of two vectors x = x ⊙ y.
Definition at line 563 of file linalg.hpp.
| void cyqlone::linalg::multi::clamp | ( | Vx && | x, |
| Vlo && | lo, | ||
| Vhi && | hi, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Elementwise clamping z = max(lo, min(x, hi)).
Definition at line 572 of file linalg.hpp.
| void cyqlone::linalg::multi::clamp_resid | ( | Vx && | x, |
| Vlo && | lo, | ||
| Vhi && | hi, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Elementwise clamping residual z = x - max(lo, min(x, hi)).
Definition at line 583 of file linalg.hpp.
| void cyqlone::linalg::multi::axpby | ( | Ta | alpha, |
| Vx && | x, | ||
| Tb | beta, | ||
| Vy && | y, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Add scaled vector z = αx + βy.
Definition at line 596 of file linalg.hpp.
| void cyqlone::linalg::multi::axpby | ( | Ta | alpha, |
| Vx && | x, | ||
| Tb | beta, | ||
| Vy && | y ) |
#include <cyqlone/linalg.hpp>
Add scaled vector y = αx + βy.
Definition at line 608 of file linalg.hpp.
| void cyqlone::linalg::multi::axpy | ( | Vy && | y, |
| const std::array< simdified_value_t< Vy >, sizeof...(Vx)> & | alphas, | ||
| Vx &&... | x ) |
#include <cyqlone/linalg.hpp>
Add scaled vector y = ∑ᵢ αᵢxᵢ + βy.
Definition at line 617 of file linalg.hpp.
| void cyqlone::linalg::multi::axpy | ( | Ta | alpha, |
| Vx && | x, | ||
| Vy && | y, | ||
| Vz && | z ) |
#include <cyqlone/linalg.hpp>
Add scaled vector z = αx + y.
Definition at line 627 of file linalg.hpp.
| void cyqlone::linalg::multi::axpy | ( | Ta | alpha, |
| Vx && | x, | ||
| Vy && | y ) |
#include <cyqlone/linalg.hpp>
Add scaled vector y = αx + βy (where β is a compile-time constant).
Definition at line 635 of file linalg.hpp.
| void cyqlone::linalg::multi::negate | ( | VA && | A, |
| VB && | B, | ||
| with_rotate_t< Rotate > | rot = {} ) |
#include <cyqlone/linalg.hpp>
Negate a matrix or vector B = -A.
Definition at line 644 of file linalg.hpp.
| void cyqlone::linalg::multi::negate | ( | VA && | A, |
| with_rotate_t< Rotate > | rot = {} ) |
#include <cyqlone/linalg.hpp>
Negate a matrix or vector A = -A.
Definition at line 652 of file linalg.hpp.
| void cyqlone::linalg::multi::sub | ( | VA && | A, |
| VB && | B, | ||
| VC && | C, | ||
| with_rotate_t< Rotate > | rot = {} ) |
#include <cyqlone/linalg.hpp>
Subtract two matrices or vectors C = A - B. Rotate affects B.
Definition at line 660 of file linalg.hpp.
| void cyqlone::linalg::multi::sub | ( | VA && | A, |
| VB && | B, | ||
| with_rotate_t< Rotate > | rot = {} ) |
#include <cyqlone/linalg.hpp>
Subtract two matrices or vectors A = A - B. Rotate affects B.
Definition at line 670 of file linalg.hpp.
| void cyqlone::linalg::multi::add | ( | VA && | A, |
| VB && | B, | ||
| VC && | C, | ||
| with_rotate_t< Rotate > | rot = {} ) |
#include <cyqlone/linalg.hpp>
Add two matrices or vectors C = A + B. Rotate affects B.
Definition at line 679 of file linalg.hpp.
| void cyqlone::linalg::multi::add | ( | VA && | A, |
| VB && | B, | ||
| with_rotate_t< Rotate > | rot = {} ) |
#include <cyqlone/linalg.hpp>
Add two matrices or vectors A = A + B. Rotate affects B.
Definition at line 689 of file linalg.hpp.
| void cyqlone::linalg::multi::for_each_elementwise | ( | F && | fun, |
| VA && | A, | ||
| VAs &&... | As ) |
#include <cyqlone/linalg.hpp>
Apply a function to all elements of the given matrices or vectors.
Definition at line 698 of file linalg.hpp.
| void cyqlone::linalg::multi::transform_elementwise | ( | F && | fun, |
| VA && | A, | ||
| VAs &&... | As ) |
#include <cyqlone/linalg.hpp>
Apply a function to all elements of the given matrices or vectors, storing the result in the first argument.
Definition at line 708 of file linalg.hpp.
| void cyqlone::linalg::multi::transform2_elementwise | ( | F && | fun, |
| VA && | A, | ||
| VB && | B, | ||
| VAs &&... | As ) |
#include <cyqlone/linalg.hpp>
Apply a function to all elements of the given matrices or vectors, storing the results in the first two arguments.
Definition at line 718 of file linalg.hpp.
| void cyqlone::linalg::multi::transform_n_elementwise | ( | F && | fun, |
| std::tuple< VAs... > | As, | ||
| VBs &&... | Bs ) |
#include <cyqlone/linalg.hpp>
Apply a function to all elements of the given matrices or vectors, storing the results in the tuple of matrices given as the first argument.
Definition at line 729 of file linalg.hpp.
| void cyqlone::linalg::multi::copy | ( | VA && | A, |
| VB && | B, | ||
| Opts... | opts ) |
#include <cyqlone/linalg.hpp>
Copy a matrix or vector B = A.
Definition at line 749 of file linalg.hpp.
| void cyqlone::linalg::multi::copy | ( | Structured< VA, S > | A, |
| Structured< VB, S > | B, | ||
| Opts... | opts ) |
#include <cyqlone/linalg.hpp>
Copy a matrix or vector B = A.
Definition at line 759 of file linalg.hpp.
| void cyqlone::linalg::unpack | ( | VA && | A, |
| VB && | B ) |
#include <cyqlone/packing.hpp>
Copy a compact batch of matrices A to multiple scalar matrices B.
Definition at line 147 of file packing.hpp.
| void cyqlone::linalg::pack | ( | VA && | A, |
| VB && | B ) |
#include <cyqlone/packing.hpp>
Copy multiple scalar matrices A to a compact batch of matrices B.
Definition at line 157 of file packing.hpp.