|
| template<simdifiable Vx, simdifiable Vz, std::convertible_to< simdified_simd_t< Vx > > T> |
| void | batmat::linalg::scale (T alpha, Vx &&x, Vz &&z) |
| | Multiply a vector by a scalar z = αx.
|
| template<simdifiable Vx, std::convertible_to< simdified_simd_t< Vx > > T> |
| void | batmat::linalg::scale (T alpha, Vx &&x) |
| | Multiply a vector by a scalar x = αx.
|
| template<simdifiable Vx, simdifiable Vy, simdifiable Vz> |
| void | batmat::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 | batmat::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 | batmat::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 | batmat::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 Vz> |
| void | batmat::linalg::clamp (Vx &&x, simdified_simd_t< Vx > lo, simdified_simd_t< Vx > hi, Vz &&z) |
| | Elementwise clamping z = max(lo, min(x, hi)), with scalar lo and hi.
|
| template<simdifiable Vx, simdifiable Vy, simdifiable Vz, std::convertible_to< simdified_simd_t< Vx > > Ta, std::convertible_to< simdified_simd_t< Vx > > Tb> |
| void | batmat::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_simd_t< Vx > > Ta, std::convertible_to< simdified_simd_t< Vx > > Tb> |
| void | batmat::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 | batmat::linalg::axpy (Vy &&y, const std::array< simdified_simd_t< Vy >, sizeof...(Vx)> &alphas, Vx &&...x) |
| | Add scaled vector y = ∑ᵢ αᵢxᵢ + βy.
|
| template<simdifiable Vx, simdifiable Vy, simdifiable Vz, std::convertible_to< simdified_simd_t< Vx > > Ta> |
| void | batmat::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_simd_t< Vx > > Ta> |
| void | batmat::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 | batmat::linalg::negate (VA &&A, VB &&B, with_rotate_t< Rotate >={}) |
| | Negate a matrix or vector B = -A.
|
| template<simdifiable VA, int Rotate = 0> |
| void | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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.
|
| template<class F, simdifiable... VAs, simdifiable... VBs> |
| void | batmat::linalg::transform_n_diag (F &&fun, std::tuple< VAs... > As, VBs &&...Bs) |
| | Apply a function to all elements of the given vectors and the diagonal elements of the given square matrices, storing the results in the tuple of vectors or matrices given as the first argument.
|
| template<class F, simdifiable VA, simdifiable VB> |
| void | batmat::linalg::copy_diag (VA &&A, VB &&B) |
| | Copy the diagonal elements of a matrix.
|
| template<simdifiable VA, simdifiable VB, simdifiable VC> |
| void | batmat::linalg::add_diag (VA &&A, VB &&b, VC &&C) |
| | C = A + diag(b).
|
| template<simdifiable VA, simdifiable VB> |
| void | batmat::linalg::add_diag (VA &&A, VB &&b) |
| | A += diag(b).
|
|
| template<simdifiable_multi Vx, simdifiable_multi Vz, std::convertible_to< simdified_simd_t< Vx > > T> |
| void | batmat::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_simd_t< Vx > > T> |
| void | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 Vz> |
| void | batmat::linalg::multi::clamp (Vx &&x, simdified_simd_t< Vx > lo, simdified_simd_t< Vx > hi, Vz &&z) |
| | Elementwise clamping z = max(lo, min(x, hi)), with scalar lo and hi.
|
| template<simdifiable_multi Vx, simdifiable_multi Vy, simdifiable_multi Vz, std::convertible_to< simdified_simd_t< Vx > > Ta, std::convertible_to< simdified_simd_t< Vx > > Tb> |
| void | batmat::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_simd_t< Vx > > Ta, std::convertible_to< simdified_simd_t< Vx > > Tb> |
| void | batmat::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 | batmat::linalg::multi::axpy (Vy &&y, const std::array< simdified_simd_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_simd_t< Vx > > Ta> |
| void | batmat::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_simd_t< Vx > > Ta> |
| void | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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 | batmat::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.
|