Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Namespaces | Classes | Concepts | Typedefs | Enumerations | Functions | Variables
uni20::linalg Namespace Reference

Namespaces

namespace  backends
 
namespace  blas
 
namespace  condition_detail
 
namespace  cpu
 
namespace  cublas
 
namespace  dispatch_diagnostics
 
namespace  lapack_detail
 
namespace  least_squares_detail
 
namespace  mpfr_detail
 
namespace  mplapack_binary80_detail
 
namespace  packed_detail
 
namespace  partitioned_buffer_detail
 
namespace  reduction_detail
 
namespace  refinement_detail
 

Classes

struct  add
 Return the sum of two element values. More...
 
struct  add_scaled
 Add one retained scalar multiple to an existing element value. More...
 
struct  assign_product_op
 Replaceable-output dense matrix product operation tag. More...
 
struct  backend_list
 Ordered list of backend values tried by the dispatch walk. More...
 
struct  backend_selector_default
 Uni20-owned operation-specific default for a storage policy. More...
 
struct  backend_selector_default< contract_op< LhsRank, RhsRank, ContractedRank >, StoragePolicy >
 Install GEMM contraction strategies around a storage execution selector. More...
 
struct  backend_selector_default< tensor_network::rabc_contract_op, StoragePolicy >
 Install the storage-domain right-first R/A/B/C strategy around a block storage selector. More...
 
struct  backend_selector_override
 Optional global backend-selector override for an operation and storage policy. More...
 
struct  BlasBackend
 Backend family for BLAS dense linalg kernels, including MPLAPACK scalar adapters. More...
 
struct  conjugate_inplace_op
 Accessor-respecting in-place scalar conjugation operation tag. More...
 
struct  constant
 Nullary elementwise function that returns one retained value. More...
 
struct  contract_op
 Fixed-output pairwise tensor contraction operation. More...
 
struct  ContractionAxes
 Canonical contracted and surviving axes for two fixed-rank operands. More...
 
struct  ContractionMatrixProjection
 Extents and strides for one rank-two projection of a contraction operand. More...
 
struct  ContractionStrideGroups
 M, N, and K stride groups for a normalized pairwise contraction. More...
 
struct  copy_op
 Accessor-respecting element copy operation tag. More...
 
struct  CpuReferenceBackend
 Backend value for the reference host CPU dense linalg oracle. More...
 
struct  CublasBackend
 Backend value for cuBLAS dense linalg kernels. More...
 
struct  CudaReferenceBackend
 Backend value for generic CUDA runtime kernels and transfers. More...
 
struct  CusolverBackend
 Backend value for cuSOLVER dense factorization kernels. More...
 
struct  DirectContractionGemmPlan
 Handle-independent projection of a contraction to one GEMM. More...
 
struct  DirectGemmContractionBackend
 Contract directly through one GEMM selected from a retained execution selector. More...
 
struct  divide
 Return the quotient of two element values. More...
 
struct  gemm_op
 Fixed-output dense matrix multiplication operation tag. More...
 
struct  gemv_op
 Dense matrix-vector multiplication operation tag. More...
 
struct  hessenberg_schur_op
 Schur decomposition of an already upper-Hessenberg real matrix. More...
 
struct  inner_product_op
 Conjugate-linear-left tensor inner-product operation tag. More...
 
struct  is_backend_list
 
struct  is_backend_list< backend_list< Backends... > >
 
struct  KernelBackendAttempt
 Describe one backend's role in a failed dispatch walk. More...
 
class  KernelDispatchError
 Exception carrying structured information about a failed backend walk. More...
 
class  KernelTaskAttempt
 Runtime backend attempt optionally carrying a deferred kernel task. More...
 
struct  LapackBackend
 Backend family for configured dense LAPACK kernels, including MPLAPACK scalar adapters. More...
 
struct  least_squares_op
 Preserving full-column-rank least squares with fixed solution and diagnostic outputs. More...
 
struct  LeastSquaresInfo
 Completed numerical attempt; success does not certify rank or conditioning. More...
 
struct  LeastSquaresOptions
 Full-rank QR rejection policy, independent of any physical convergence criterion. More...
 
struct  LeastSquaresResult
 Preserving least-squares result; solution and residuals are published only on success. More...
 
struct  linear_solve_op
 Destructive dense general linear-system solve operation tag. More...
 
struct  LogDeterminant
 Determinant represented without multiplying diagonal magnitudes. More...
 
struct  LogDeterminantResult
 Logarithmic determinant with numerical diagnostics. More...
 
struct  LoopedContractionGemmPlan
 One residual M or N loop around a rank-two GEMM projection. More...
 
struct  LoopedGemmContractionBackend
 Contract through a loop of GEMMs selected from one retained execution selector. More...
 
struct  lq_op
 Reduced dense real LQ factorization operation tag. More...
 
struct  LqResult
 Owning reduced factors returned by lq. More...
 
struct  lu_factor_op
 Fixed-output packed LU factorization with zero-based row-swap pivots. More...
 
struct  lu_rcond_op
 Reciprocal condition estimate from successful packed LU and an original matrix norm. More...
 
struct  lu_solve_op
 Solve using read-only packed LU factors, overwriting an existing RHS. More...
 
struct  LuConditionResult
 Reciprocal condition estimate, present only on numerical success. More...
 
class  LuFactorization
 Immutable owning packed factors satisfying P A = L U. More...
 
struct  LuFactorizationResult
 Completed factorization attempt; factor is present exactly on success. More...
 
struct  LuNorms
 Original matrix norms after conversion to factor precision. More...
 
struct  LuOptions
 LU pivot policy and optional capture of original matrix norms. More...
 
struct  LuRefinementPrecision
 Scalar families and explicit precisions for three-precision LU refinement. More...
 
struct  LuRefinementResult
 Refinement outcome, retaining the last finite, diagnosed iterate on later failure. More...
 
struct  matrix_exponential_op
 Dense matrix exponential operation tag. More...
 
struct  matrix_norm_op
 Dense rank-two matrix norm operation tag. More...
 
struct  matrix_set_op
 Structured dense matrix initialization operation tag. More...
 
struct  multiply
 Return the product of two element values. More...
 
struct  negate
 Return the additive inverse of one element value. More...
 
struct  nonsymmetric_eigen_op
 Dense nonsymmetric eigensystem operation tag. More...
 
struct  norm_op
 Euclidean tensor norm operation tag. More...
 
struct  qr_op
 Reduced dense real QR factorization operation tag. More...
 
struct  QrResult
 Owning reduced factors returned by qr. More...
 
struct  reciprocal
 Return the multiplicative inverse of one element value. More...
 
struct  ReductionAxes
 Normalized axes for reducing a fixed-rank input. More...
 
struct  RefinementColumn
 Diagnostics of the published iterate for one RHS. More...
 
struct  RefinementInfo
 Outer-loop outcome and, on a factor/solve failure, the provider's numerical diagnostics. More...
 
struct  RefinementOptions
 Stopping policy; tolerance is expressed in the residual real scalar. More...
 
struct  scale
 Multiply one element value by a retained scalar factor. More...
 
struct  schur_op
 Dense Schur decomposition operation tag. More...
 
struct  schur_reorder_op
 Move one Schur block or entry to a requested position. More...
 
struct  self_adjoint_eigh_op
 Dense symmetric or Hermitian eigensystem operation tag. More...
 
struct  SelfAdjointEighOptions
 Options for a dense symmetric or Hermitian eigensystem. More...
 
struct  SelfAdjointEighResult
 Owning eigenvalues and eigenvectors returned by eigh. More...
 
struct  singular_values_op
 Exact dense singular-values-only operation tag. More...
 
struct  SolveDiagnosticsResult
 Recomputed residual and per-RHS diagnostics, published together only on success. More...
 
struct  SolveError
 Residual and backward-error estimates for one RHS, at residual precision. More...
 
struct  SolveInfo
 Diagnostics written by a completed numerical attempt, independent of dispatch. More...
 
struct  SolveOptions
 Real-scalar pivot policy for a square linear solve. More...
 
struct  square
 Return the product of one element value with itself. More...
 
struct  subtract
 Return the difference of two element values. More...
 
struct  sum_reduction_op
 Sum reduction over one or more fixed-rank input axes. More...
 
struct  svd_least_squares_op
 Preserving minimum-norm SVD least squares with explicit rank diagnostics. More...
 
struct  svd_left_op
 Exact dense left singular-vector operation tag. More...
 
struct  svd_op
 Exact dense singular value decomposition operation tag. More...
 
struct  svd_right_op
 Exact dense right singular-vector operation tag. More...
 
struct  SvdLeastSquaresDiagnostics
 Rank diagnostics for a successful truncated-SVD solution. More...
 
struct  SvdLeastSquaresOptions
 Singular-value truncation policy for minimum-norm least squares. More...
 
struct  SvdLeastSquaresResult
 Preserving least-squares result; solution and residuals are published only on success. More...
 
struct  SvdLeftResult
 Owning left singular vectors and singular values returned by svd_left. More...
 
struct  SvdOptions
 Output-shape options for an exact singular value decomposition. More...
 
struct  SvdResult
 Owning factors returned by svd. More...
 
struct  SvdRightResult
 Owning singular values and right singular vectors returned by svd_right. More...
 
struct  SvdTruncationInfo
 Statistics describing a completed SVD truncation. More...
 
struct  SvdTruncationPolicy
 Rank-selection policy for a truncated singular value decomposition. More...
 
struct  symmetric_tridiagonal_eigen_op
 Symmetric tridiagonal eigensystem operation tag. More...
 
struct  transform_inplace_op
 Callable-carrying elementwise update operation. More...
 
struct  transform_op
 Callable-carrying elementwise overwrite operation. More...
 
struct  TruncatedSvdResult
 Owning factors and statistics returned by truncated_svd. More...
 

Concepts

concept  AsyncOperationScalar
 Scalar argument that an async wrapper can await and convert.
 
concept  KernelBackend
 Named backend value accepted as one dispatch candidate.
 
concept  KernelBackendSelector
 Single named backend or ordered backend list accepted by dispatch front ends.
 
concept  RankedContractionMdspecLike
 Ranked mdspec usable by contraction stride grouping.
 
concept  MutableRankedContractionMdspecLike
 Mutable ranked mdspec usable as a contraction output.
 
concept  OperationScalar
 Numeric argument that an operation can convert to its scalar type.
 
concept  ReductionAxis
 Integral runtime axis accepted by reduction front ends.
 

Typedefs

template<uni20::MdspanLike Mdspan>
using contraction_matrix_mdspan_t = stdex::mdspan< typename std::remove_cvref_t< Mdspan >::element_type, stdex::dextents< typename std::remove_cvref_t< Mdspan >::index_type, 2 >, stdex::layout_stride, typename std::remove_cvref_t< Mdspan >::accessor_type >
 Rank-two layout_stride mdspan type retaining a resolved operand accessor.
 
template<uni20::MdspecLike Mdspec>
using contraction_matrix_mdspec_t = typename detail::contraction_strides::ContractionMatrixMdspec< std::remove_cvref_t< Mdspec > >::type
 Rank-two strided metadata type retaining an operand descriptor or immediate handle.
 
template<class BackendSelector , class Op , class... Args>
using kernel_type_candidates_t = typename detail::KernelTypeCandidates< detail::normalized_backend_selector_t< BackendSelector >, std::remove_cvref_t< Op >, Args... >::type
 Ordered backend-list type whose entries accept the operation argument types.
 
template<KernelTypeAcceptance Value>
using KernelAcceptance = std::integral_constant< KernelTypeAcceptance, Value >
 Type-level result returned by kernel_accepts_types customizations.
 
template<uni20::MdspecLike Mdspec>
using offset_contraction_matrix_mdspec_t = typename detail::contraction_strides::OffsetContractionMatrixMdspec< std::remove_cvref_t< Mdspec > >::type
 Rank-two strided metadata type whose storage origin may be advanced.
 

Enumerations

enum class  KernelAttempt {
  success , unsupported_instance , unsupported_shape , unsupported_layout ,
  unsupported_accessor , unsupported_transform , incompatible_devices , unavailable ,
  insufficient_resources
}
 Result of one runtime kernel backend attempt. More...
 
enum class  KernelDispatchFailure { no_eligible_backend , all_candidates_declined }
 Classify why an ordered kernel-dispatch walk failed. More...
 
enum class  KernelTypeAcceptance { no , maybe , yes }
 Type-level backend eligibility for an operation and argument set. More...
 
enum class  LeastSquaresStatus {
  success , zero_diagonal , small_diagonal , nonfinite_input ,
  nonfinite_result , nonconvergence
}
 Numerical outcome of QR or SVD least squares. More...
 
enum class  MatrixNorm { MaxAbs , One , Infinity , Frobenius }
 Matrix norm selected by matrix_norm_op. More...
 
enum class  MatrixRegion { All , Upper , Lower }
 Matrix region selected by structured initialization operations. More...
 
enum class  MatrixTriangle { Upper , Lower }
 Triangle of a symmetric or Hermitian matrix supplied to an operation. More...
 
enum class  RefinementStatus {
  converged , stagnated , iteration_limit , factorization_failed ,
  correction_failed , nonfinite_input , nonfinite_result
}
 Refinement termination, distinct from the outcome of an individual LU solve. More...
 
enum class  SolveStatus {
  success , singular , small_pivot , nonfinite_input ,
  nonfinite_result
}
 Numerical outcome of a square solve, LU factorization, condition estimate or log-determinant. More...
 
enum class  SvdOverwrite { None , Left , Right }
 Input allocation overwritten by a singular-vector factor. More...
 
enum class  SvdVectorExtent { Reduced , Full }
 Extent policy for one side of an exact singular value decomposition. More...
 

Functions

template<uni20::AsyncTensorOutput Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void add_product (async::Async< Output > &output, async::Async< A > const &a, async::Async< B > const &b, std::optional< Precision > p={})
 Schedule a unit-coefficient accumulation using storage-selected backends.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha = uni20::tensor_element_t<OutputTensor>>
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>>
void add_product (async::Async< OutputTensor > &output, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, Alpha &&alpha, std::optional< Precision > p={})
 Schedule output += alpha * lhs * rhs using the static Tensor selector.
 
template<class BackendSelector , uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha = uni20::tensor_element_t<OutputTensor>>
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>>
void add_product (BackendSelector selector, async::Async< OutputTensor > &output, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, Alpha &&alpha, std::optional< Precision > p={})
 Schedule output += alpha * lhs * rhs with an explicit backend selector.
 
template<MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B, class Alpha >
requires detail::CompatibleMatrixProductTensors<Output, A, B> && OperationScalar<Alpha, tensor_element_t<Output>>
void add_product (Output &&output, A const &a, B const &b, Alpha const &alpha, std::optional< Precision > p={})
 Apply add_product using the storage-selected backend.
 
template<MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void add_product (Output &&output, A const &a, B const &b, std::optional< Precision > p={})
 Apply unit-coefficient add_product using storage-selected backends.
 
template<KernelBackendSelector Selector, MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B, class Alpha >
requires detail::CompatibleMatrixProductTensors<Output, A, B> && OperationScalar<Alpha, tensor_element_t<Output>>
void add_product (Selector &&selector, Output &&output, A const &a, B const &b, Alpha const &alpha, std::optional< Precision > requested={})
 Accumulate alpha * a * b into an existing fixed-shape output.
 
template<KernelBackendSelector Selector, MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void add_product (Selector &&selector, Output &&output, A const &a, B const &b, std::optional< Precision > p={})
 Apply add_product with an exact unit coefficient and optional precision.
 
template<KernelBackendSelector Selector, uni20::AsyncTensorOutput Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void add_product (Selector selector, async::Async< Output > &output, async::Async< A > const &a, async::Async< B > const &b, std::optional< Precision > p={})
 Schedule a unit-coefficient accumulation at inferred or explicit precision.
 
template<class Factor >
 add_scaled (Factor) -> add_scaled< std::decay_t< Factor > >
 Deduce an add-scaled operation that owns a decayed factor value.
 
template<std::size_t InputRank>
constexpr auto all_reduction_axes () -> ReductionAxes< InputRank, InputRank >
 Construct the full-reduction descriptor for a fixed input rank.
 
template<uni20::AsyncTensorOutput Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void assign_product (async::Async< Output > &output, async::Async< A > const &a, async::Async< B > const &b, std::optional< Precision > p={})
 Schedule a unit-coefficient product using storage-selected backends.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha = uni20::tensor_element_t<OutputTensor>>
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>>
void assign_product (async::Async< OutputTensor > &output, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, Alpha &&alpha, std::optional< Precision > p={})
 Schedule output = alpha * lhs * rhs using the static Tensor selector.
 
template<class BackendSelector , uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha = uni20::tensor_element_t<OutputTensor>>
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>>
void assign_product (BackendSelector selector, async::Async< OutputTensor > &output, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, Alpha &&alpha, std::optional< Precision > p={})
 Schedule output = alpha * lhs * rhs with an explicit backend selector.
 
template<MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B, class Alpha >
requires detail::CompatibleMatrixProductTensors<Output, A, B> && OperationScalar<Alpha, tensor_element_t<Output>>
void assign_product (Output &&output, A const &a, B const &b, Alpha const &alpha, std::optional< Precision > p={})
 Apply assign_product using the storage-selected backend.
 
template<MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void assign_product (Output &&output, A const &a, B const &b, std::optional< Precision > p={})
 Apply unit-coefficient assign_product using storage-selected backends.
 
template<KernelBackendSelector Selector, MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B, class Alpha >
requires detail::CompatibleMatrixProductTensors<Output, A, B> && OperationScalar<Alpha, tensor_element_t<Output>>
void assign_product (Selector &&selector, Output &&output, A const &a, B const &b, Alpha const &alpha, std::optional< Precision > requested={})
 Overwrite a resizable or already-compatible output with alpha * a * b.
 
template<KernelBackendSelector Selector, MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void assign_product (Selector &&selector, Output &&output, A const &a, B const &b, std::optional< Precision > p={})
 Apply assign_product with an exact unit coefficient and optional precision.
 
template<KernelBackendSelector Selector, uni20::AsyncTensorOutput Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void assign_product (Selector selector, async::Async< Output > &output, async::Async< A > const &a, async::Async< B > const &b, std::optional< Precision > p={})
 Schedule a unit-coefficient product at inferred or explicit precision.
 
template<class... Backends>
 backend_list (Backends...) -> backend_list< std::remove_cvref_t< Backends >... >
 
template<class BackendSelector , class Op , class... Args>
requires detail::KernelDispatchTypesAccepted<detail::normalized_backend_selector_t<BackendSelector>, Op, Args&...>
async::AsyncTask co_dispatch_kernel (BackendSelector selector, Op op, Args &... args)
 Dispatch a kernel from a coroutine without requiring coroutine wrappers for blocking backends.
 
template<class Value >
 constant (Value) -> constant< std::decay_t< Value > >
 
template<uni20::AsyncTensorOutput OutputTensor, uni20::TensorView LhsTensor, uni20::TensorView RhsTensor, class Alpha , class Beta , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && uni20::MutableRankedTensorView<OutputTensor, ContractionAxes<LhsRank, RhsRank, ContractedRank>::output_rank> && uni20::RankedTensorView<LhsTensor, LhsRank> && uni20::RankedTensorView<RhsTensor, RhsRank> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void contract (async::Async< OutputTensor > &output, Alpha &&alpha, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, ContractionAxes< LhsRank, RhsRank, ContractedRank > axes, Beta &&beta)
 Schedule a fixed-output pairwise contraction using static Tensor policy.
 
template<uni20::AsyncTensorOutput OutputTensor, uni20::TensorView LhsTensor, uni20::TensorView RhsTensor, class Alpha , class Beta , std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && (ContractedRank <= uni20::tensor_mdspec_t<LhsTensor>::rank()) && (ContractedRank <= uni20::tensor_mdspec_t<RhsTensor>::rank()) && (uni20::tensor_mdspec_t<OutputTensor>::rank() == uni20::tensor_mdspec_t<LhsTensor>::rank() + uni20::tensor_mdspec_t<RhsTensor>::rank() - 2 * ContractedRank) && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void contract (async::Async< OutputTensor > &output, Alpha &&alpha, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, std::array< std::pair< std::size_t, std::size_t >, ContractedRank > requested_axes, Beta &&beta)
 Schedule a fixed-output pairwise contraction from raw axis pairs using static Tensor policy.
 
template<class BackendSelector , class OutputTensor , class LhsTensor , class RhsTensor , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && uni20::MutableRankedTensorView<OutputTensor, ContractionAxes<LhsRank, RhsRank, ContractedRank>::output_rank> && uni20::RankedTensorView<LhsTensor, LhsRank> && uni20::RankedTensorView<RhsTensor, RhsRank>
void contract (BackendSelector &&selector, OutputTensor &&output, uni20::tensor_element_t< OutputTensor > alpha, LhsTensor const &lhs, RhsTensor const &rhs, ContractionAxes< LhsRank, RhsRank, ContractedRank > axes, uni20::tensor_element_t< OutputTensor > beta)
 Contract two tensors into an existing fixed-storage output.
 
template<class BackendSelector , class OutputTensor , class LhsTensor , class RhsTensor , std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && (ContractedRank <= uni20::tensor_mdspec_t<LhsTensor>::rank()) && (ContractedRank <= uni20::tensor_mdspec_t<RhsTensor>::rank()) && (uni20::tensor_mdspec_t<OutputTensor>::rank() == uni20::tensor_mdspec_t<LhsTensor>::rank() + uni20::tensor_mdspec_t<RhsTensor>::rank() - 2 * ContractedRank)
void contract (BackendSelector &&selector, OutputTensor &&output, uni20::tensor_element_t< OutputTensor > alpha, LhsTensor const &lhs, RhsTensor const &rhs, std::array< std::pair< std::size_t, std::size_t >, ContractedRank > requested_axes, uni20::tensor_element_t< OutputTensor > beta)
 Contract two tensors using an explicit selector and raw axis pairs.
 
template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput OutputTensor, uni20::TensorView LhsTensor, uni20::TensorView RhsTensor, class Alpha , class Beta , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && uni20::MutableRankedTensorView<OutputTensor, ContractionAxes<LhsRank, RhsRank, ContractedRank>::output_rank> && uni20::RankedTensorView<LhsTensor, LhsRank> && uni20::RankedTensorView<RhsTensor, RhsRank> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void contract (BackendSelector selector, async::Async< OutputTensor > &output, Alpha &&alpha, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, ContractionAxes< LhsRank, RhsRank, ContractedRank > axes, Beta &&beta)
 Schedule a fixed-output pairwise contraction through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput OutputTensor, uni20::TensorView LhsTensor, uni20::TensorView RhsTensor, class Alpha , class Beta , std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && (ContractedRank <= uni20::tensor_mdspec_t<LhsTensor>::rank()) && (ContractedRank <= uni20::tensor_mdspec_t<RhsTensor>::rank()) && (uni20::tensor_mdspec_t<OutputTensor>::rank() == uni20::tensor_mdspec_t<LhsTensor>::rank() + uni20::tensor_mdspec_t<RhsTensor>::rank() - 2 * ContractedRank) && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void contract (BackendSelector selector, async::Async< OutputTensor > &output, Alpha &&alpha, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, std::array< std::pair< std::size_t, std::size_t >, ContractedRank > requested_axes, Beta &&beta)
 Schedule a fixed-output pairwise contraction from raw axis pairs through an explicit selector.
 
template<class OutputTensor , class LhsTensor , class RhsTensor , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && uni20::MutableRankedTensorView<OutputTensor, ContractionAxes<LhsRank, RhsRank, ContractedRank>::output_rank> && uni20::RankedTensorView<LhsTensor, LhsRank> && uni20::RankedTensorView<RhsTensor, RhsRank>
void contract (OutputTensor &&output, uni20::tensor_element_t< OutputTensor > alpha, LhsTensor const &lhs, RhsTensor const &rhs, ContractionAxes< LhsRank, RhsRank, ContractedRank > axes, uni20::tensor_element_t< OutputTensor > beta)
 Contract two tensors using their default backend selector.
 
template<class OutputTensor , class LhsTensor , class RhsTensor , std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && (ContractedRank <= uni20::tensor_mdspec_t<LhsTensor>::rank()) && (ContractedRank <= uni20::tensor_mdspec_t<RhsTensor>::rank()) && (uni20::tensor_mdspec_t<OutputTensor>::rank() == uni20::tensor_mdspec_t<LhsTensor>::rank() + uni20::tensor_mdspec_t<RhsTensor>::rank() - 2 * ContractedRank)
void contract (OutputTensor &&output, uni20::tensor_element_t< OutputTensor > alpha, LhsTensor const &lhs, RhsTensor const &rhs, std::array< std::pair< std::size_t, std::size_t >, ContractedRank > requested_axes, uni20::tensor_element_t< OutputTensor > beta)
 Contract two tensors using storage policy and raw axis pairs.
 
template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
constexpr bool contraction_axes_are_valid (ContractionAxes< LhsRank, RhsRank, ContractedRank > const &axes) noexcept
 Return whether contraction axes form canonical partitions of both inputs.
 
template<class Lhs , class Rhs , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
auto contraction_output_extents (Lhs const &lhs, Rhs const &rhs, ContractionAxes< LhsRank, RhsRank, ContractedRank > const &axes) -> stdex::dextents< uni20::index_type, ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank >
 Validate paired extents and return the canonical contraction output shape.
 
template<class Scalar , class Factor >
requires cuda_partitioned_scale_scalars<Scalar, Factor>
void cuda_partitioned_assign_scale (cuda::PartitionedCudaBuffer< Scalar > &output, Factor factor, cuda::PartitionedCudaBuffer< Scalar > const &input)
 Overwrite one partitioned CUDA allocation with a scaled peer allocation.
 
template<class Scalar , class Factor >
requires cuda_partitioned_scale_scalars<Scalar, Factor>
void cuda_partitioned_axpy (cuda::PartitionedCudaBuffer< Scalar > &output, Factor factor, cuda::PartitionedCudaBuffer< Scalar > const &input)
 Add a scaled partitioned CUDA allocation to another in place.
 
template<class Scalar , class Factor >
requires cuda_partitioned_scale_scalars<Scalar, Factor>
void cuda_partitioned_scale (cuda::PartitionedCudaBuffer< Scalar > &output, Factor factor)
 Scale a complete partitioned CUDA allocation in place.
 
template<class Scalar >
requires cuda_partitioned_fill_scalar<Scalar>
void cuda_partitioned_set_zero (cuda::PartitionedCudaBuffer< Scalar > &output)
 Set a complete partitioned CUDA allocation to numerical zero.
 
presentation::report_builder diagnostic_report (dispatch_diagnostics::event const &diagnostic)
 Build a presentation report for one opt-in kernel-dispatch diagnostic event.
 
presentation::report_builder diagnostic_report (KernelDispatchError const &error)
 Build a presentation report for a structured kernel-dispatch error.
 
template<class GemmSelector >
 DirectGemmContractionBackend (GemmSelector) -> DirectGemmContractionBackend< std::remove_cvref_t< GemmSelector > >
 
template<class BackendSelector , class Op , class... Args>
requires detail::KernelDispatchTypesAccepted<detail::normalized_backend_selector_t<BackendSelector>, Op, Args...>
void dispatch_kernel (BackendSelector &&selector, Op op, Args &&... args)
 Normalize a selector and dispatch or report that every eligible backend declined.
 
template<class BackendSelector , class Op , class... Args>
void dynamic_dispatch_kernel (BackendSelector &&selector, Op op, Args &&... args)
 Dynamically dispatch an operation, raising even type-level rejection at runtime.
 
template<RankedTensorView< 2 > Matrix>
auto eigh (async::Async< Matrix > &&matrix, Precision p, MatrixTriangle triangle=MatrixTriangle::Upper)
 Compute a self-adjoint eigensystem at explicit working precision with optional output settings.
 
template<RankedTensorView< 2 > Matrix>
auto eigh (async::Async< Matrix > const &matrix, Precision p, MatrixTriangle triangle=MatrixTriangle::Upper)
 Compute a self-adjoint eigensystem at explicit working precision with optional output settings.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto eigh (async::Async< MatrixTensor > &&matrix, MatrixTriangle triangle=MatrixTriangle::Upper, std::optional< Precision > requested={})
 Schedule a consuming self-adjoint eigensystem using the static Tensor selector.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto eigh (async::Async< MatrixTensor > const &matrix, MatrixTriangle triangle=MatrixTriangle::Upper, std::optional< Precision > requested={})
 Schedule a preserving self-adjoint eigensystem using the static Tensor selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto eigh (BackendSelector &&selector, MatrixTensor &&matrix, MatrixTriangle triangle=MatrixTriangle::Upper, std::optional< Precision > requested={})
 Consume an owning matrix and return its complete self-adjoint eigensystem through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto eigh (BackendSelector &&selector, MatrixTensor const &matrix, MatrixTriangle triangle=MatrixTriangle::Upper, std::optional< Precision > requested={})
 Preserve a matrix and return its complete self-adjoint eigensystem through an explicit selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto eigh (BackendSelector selector, async::Async< MatrixTensor > &&matrix, MatrixTriangle triangle=MatrixTriangle::Upper, std::optional< Precision > requested={})
 Schedule a consuming self-adjoint eigensystem through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto eigh (BackendSelector selector, async::Async< MatrixTensor > const &matrix, MatrixTriangle triangle=MatrixTriangle::Upper, std::optional< Precision > requested={})
 Schedule a preserving self-adjoint eigensystem through an explicit selector.
 
template<RankedTensorView< 2 > Matrix>
auto eigh (Matrix &&matrix, Precision p, MatrixTriangle triangle=MatrixTriangle::Upper)
 Compute a self-adjoint eigensystem at explicit working precision with optional output settings.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto eigh (MatrixTensor &&matrix, MatrixTriangle triangle=MatrixTriangle::Upper, std::optional< Precision > requested={})
 Consume an owning matrix and return its complete self-adjoint eigensystem.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto eigh (MatrixTensor const &matrix, MatrixTriangle triangle=MatrixTriangle::Upper, std::optional< Precision > requested={})
 Preserve a matrix and return its complete self-adjoint eigensystem.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto eigh (Selector &&selector, async::Async< Matrix > &&matrix, Precision p, MatrixTriangle triangle=MatrixTriangle::Upper)
 Compute a self-adjoint eigensystem at explicit working precision with optional output settings.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto eigh (Selector &&selector, async::Async< Matrix > const &matrix, Precision p, MatrixTriangle triangle=MatrixTriangle::Upper)
 Compute a self-adjoint eigensystem at explicit working precision with optional output settings.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto eigh (Selector &&selector, Matrix &&matrix, Precision p, MatrixTriangle triangle=MatrixTriangle::Upper)
 Compute a self-adjoint eigensystem at explicit working precision with optional output settings.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha , class Beta >
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void gemm (async::Async< OutputTensor > &output, Alpha &&alpha, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, Beta &&beta, std::optional< Precision > p={})
 Schedule fixed-output GEMM using the static Tensor selector.
 
template<class BackendSelector , uni20::MutableRankedTensorView< 2 > OutputTensor, class Alpha , class Beta , uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires (OperationScalar<Alpha, tensor_element_t<OutputTensor>> && OperationScalar<Beta, tensor_element_t<OutputTensor>>)
void gemm (BackendSelector &&selector, OutputTensor &&output, Alpha alpha, LhsTensor const &lhs, RhsTensor const &rhs, Beta beta, std::optional< Precision > requested={})
 Update a fixed-size matrix as output = alpha * lhs * rhs + beta * output.
 
template<class BackendSelector , uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha , class Beta >
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void gemm (BackendSelector selector, async::Async< OutputTensor > &output, Alpha &&alpha, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs, Beta &&beta, std::optional< Precision > p={})
 Schedule fixed-output GEMM with an explicit backend selector.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, class Alpha , class Beta , uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires (OperationScalar<Alpha, tensor_element_t<OutputTensor>> && OperationScalar<Beta, tensor_element_t<OutputTensor>>)
void gemm (OutputTensor &&output, Alpha alpha, LhsTensor const &lhs, RhsTensor const &rhs, Beta beta, std::optional< Precision > p={})
 Apply the fixed-storage gemm contract using the operands' default backend selector.
 
template<uni20::AsyncTensorOutput OutputTensor, class Alpha , uni20::RankedTensorView< 2 > MatrixTensor, uni20::RankedTensorView< 1 > InputTensor, class Beta >
requires uni20::MutableRankedTensorView<OutputTensor, 1> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void gemv (async::Async< OutputTensor > &output, Alpha &&alpha, async::Async< MatrixTensor > const &matrix, async::Async< InputTensor > const &input, Beta &&beta)
 Schedule fixed-output GEMV using static Tensor policy.
 
template<class BackendSelector , uni20::MutableRankedTensorView< 1 > OutputTensor, class Scalar , uni20::RankedTensorView< 2 > MatrixTensor, uni20::RankedTensorView< 1 > InputTensor>
void gemv (BackendSelector &&selector, OutputTensor &&output, Scalar alpha, MatrixTensor const &matrix, InputTensor const &input, Scalar beta)
 Update a fixed-size vector as output = alpha * matrix * input + beta * output.
 
template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput OutputTensor, class Alpha , uni20::RankedTensorView< 2 > MatrixTensor, uni20::RankedTensorView< 1 > InputTensor, class Beta >
requires uni20::MutableRankedTensorView<OutputTensor, 1> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void gemv (BackendSelector selector, async::Async< OutputTensor > &output, Alpha &&alpha, async::Async< MatrixTensor > const &matrix, async::Async< InputTensor > const &input, Beta &&beta)
 Schedule fixed-output GEMV through an explicit backend selector.
 
template<uni20::MutableRankedTensorView< 1 > OutputTensor, class Scalar , uni20::RankedTensorView< 2 > MatrixTensor, uni20::RankedTensorView< 1 > InputTensor>
void gemv (OutputTensor &&output, Scalar alpha, MatrixTensor const &matrix, InputTensor const &input, Scalar beta)
 Apply the fixed-storage gemv contract using the operands' default backend selector.
 
template<class BackendSelector , uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void hessenberg_schur (BackendSelector &&selector, MatrixTensor &&matrix_work, std::span< EigenScalar > eigenvalues, SchurVectorTensor &&schur_vectors, bool compute_vectors)
 Replace a real upper-Hessenberg matrix by its real Schur form.
 
template<uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void hessenberg_schur (MatrixTensor &&matrix_work, std::span< EigenScalar > eigenvalues, SchurVectorTensor &&schur_vectors, bool compute_vectors)
 Apply the destructive hessenberg_schur contract using tensor storage policy.
 
template<uni20::MutableRankedMdspecLike< 1 > OutputMdspan, class Scalar , uni20::RankedMdspecLike< 2 > MatrixMdspan, uni20::RankedMdspecLike< 1 > InputMdspan>
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<MatrixMdspan> && uni20::HostReadableMdspec<InputMdspan>
consteval auto kernel_accepts_types (BlasBackend const &, gemv_op const &, OutputMdspan &, Scalar const &, MatrixMdspan &, InputMdspan &, Scalar const &)
 Report eligibility for host-accessible mdspec BLAS GEMV.
 
template<MutableRankedTensorView< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<mutable_tensor_mdspec_t<C>> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<tensor_element_t<C>, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
consteval auto kernel_accepts_types (BlasBackend, assign_product_op const &, async::shared_storage< C > &, S const &, A &, B &)
 Accept deferred host binary80 matrix-product outputs.
 
template<MutableRankedTensorView< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<mutable_tensor_mdspec_t<C>> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<tensor_element_t<C>, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
consteval auto kernel_accepts_types (BlasBackend, assign_product_op const &, C &, S const &, A &, B &)
 Accept replaceable binary80 host outputs for matrix-product assignment.
 
template<MutableRankedMdspecLike< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<C> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<typename C::value_type, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
consteval auto kernel_accepts_types (BlasBackend, gemm_op const &, C &, S const &, A &, B &, S const &)
 Accept host-readable native binary80 operands, including transforming accessors.
 
template<MutableRankedMdspecLike< 2 > C, mpfr_detail::RuntimeScalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<C> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<typename C::value_type, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
consteval auto kernel_accepts_types (BlasBackend, gemm_op const &, C &, S const &, A &, B &, S const &, Precision)
 Accept host-readable runtime-precision operands, including transforming accessors.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostAssignProductAccess<OutputTensor, LhsMdspan, RhsMdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, assign_product_op const &, async::shared_storage< OutputTensor > &, Scalar const &, LhsMdspan &, RhsMdspan &)
 Report eligibility for a deferred host Tensor matrix-product output.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostAssignProductAccess<OutputTensor, LhsMdspan, RhsMdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, assign_product_op const &, OutputTensor &, Scalar const &, LhsMdspan &, RhsMdspan &)
 Report eligibility for replaceable-output host tensor matrix products.
 
template<uni20::MutableMdspecLike Mdspan>
requires uni20::HostWritableMdspec<Mdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, conjugate_inplace_op const &, Mdspan &)
 Report eligibility for host-accessible mdspec in-place conjugation.
 
template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, uni20::MutableRankedMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, uni20::RankedMdspecLike< LhsRank > LhsMdspec, uni20::RankedMdspecLike< RhsRank > RhsMdspec>
requires detail::cpu_contract_backend::HostContractionAccess<OutputMdspec, LhsMdspec, RhsMdspec>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, contract_op< LhsRank, RhsRank, ContractedRank > const &, OutputMdspec &, Scalar const &, LhsMdspec &, RhsMdspec &, Scalar const &)
 Report eligibility for host-accessible pairwise contraction operands.
 
template<uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike InputMdspan>
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<InputMdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, copy_op const &, OutputMdspan &, InputMdspan &)
 Report eligibility for a host-accessible mdspec element copy.
 
template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostGemmMdspanAccess<OutputMdspan, LhsMdspan, RhsMdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, gemm_op const &, OutputMdspan &, Scalar const &, LhsMdspan &, RhsMdspan &, Scalar const &)
 Report eligibility for host-accessible mdspec CPU GEMM.
 
template<uni20::MutableRankedMdspecLike< 1 > OutputMdspan, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > MatrixMdspan, uni20::RankedMdspecLike< 1 > InputMdspan>
requires detail::HostGemvMdspanAccess<OutputMdspan, MatrixMdspan, InputMdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, gemv_op const &, OutputMdspan &, Scalar const &, MatrixMdspan &, InputMdspan &, Scalar const &)
 Report eligibility for host-accessible mdspec CPU GEMV.
 
template<class Output , uni20::MdspecLike LhsMdspan, uni20::MdspecLike RhsMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<LhsMdspan> && uni20::HostReadableMdspec<RhsMdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, inner_product_op const &, Output &, LhsMdspan &, RhsMdspan &)
 Report eligibility for a host-accessible mdspec inner product.
 
template<uni20::MutableRankedMdspecLike< 2 > CoefficientMdspec, uni20::MutableRankedMdspecLike< 2 > RhsMdspec>
requires uni20::HostWritableMdspec<CoefficientMdspec> && uni20::HostWritableMdspec<RhsMdspec>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, linear_solve_op const &, CoefficientMdspec &, RhsMdspec &, SolveInfo &, SolveOptions< uni20::make_real_t< typename CoefficientMdspec::value_type > > const &)
 Report eligibility for a host-accessible dense general solve.
 
template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, uni20::RankedMdspecLike< 2 > InputMdspan, class TimeScalar >
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<InputMdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, matrix_exponential_op const &, OutputMdspan &, InputMdspan &, TimeScalar const &)
 Report eligibility for host-accessible mdspec matrix exponentiation.
 
template<class Output , uni20::RankedMdspecLike< 2 > MatrixMdspec>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<MatrixMdspec>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, matrix_norm_op const &, Output &, MatrixMdspec &)
 Report eligibility for a host-accessible matrix norm.
 
template<uni20::MutableRankedMdspecLike< 2 > MatrixMdspan, uni20::Scalar Scalar>
requires uni20::HostWritableMdspec<MatrixMdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, matrix_set_op const &, MatrixMdspan &, Scalar const &, Scalar const &)
 Report eligibility for host-accessible mdspec matrix initialization.
 
template<class Output , uni20::MdspecLike InputMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<InputMdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, norm_op const &, Output &, InputMdspan &)
 Report eligibility for a host-accessible mdspec norm.
 
template<class Output , std::size_t InputRank, std::size_t ReducedRank, uni20::MdspecLike InputMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<InputMdspan>
consteval auto kernel_accepts_types (CpuReferenceBackend const &, sum_reduction_op< InputRank, ReducedRank > const &, Output &, InputMdspan &)
 Report eligibility for a host-accessible mdspec sum reduction.
 
template<class Function , uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike... InputMdspans>
requires uni20::HostWritableMdspec<OutputMdspan> && (uni20::HostReadableMdspec<InputMdspans> && ...)
consteval auto kernel_accepts_types (CpuReferenceBackend const &, transform_inplace_op< Function > const &, OutputMdspan &, InputMdspans &...)
 Report eligibility for host-accessible mdspec update transforms.
 
template<class Function , uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike... InputMdspans>
requires uni20::HostWritableMdspec<OutputMdspan> && (uni20::HostReadableMdspec<InputMdspans> && ...)
consteval auto kernel_accepts_types (CpuReferenceBackend const &, transform_op< Function > const &, OutputMdspan &, InputMdspans &...)
 Report eligibility for host-accessible mdspec overwrite transforms.
 
template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...>
consteval auto kernel_accepts_types (CpuReferenceBackend, least_squares_op const &, X &, A &, B &, std::span< make_real_t< typename A::value_type > >, LeastSquaresInfo &, LeastSquaresOptions< make_real_t< typename A::value_type > > const &, P...)
 Accept matching host matrices for finite-precision reference QR least squares.
 
template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && RealOrComplex<typename A::value_type> && has_runtime_precision_v<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
consteval auto kernel_accepts_types (CpuReferenceBackend, linear_solve_op const &, A &, B &, SolveInfo &, SolveOptions< make_real_t< typename A::value_type > > const &, Precision)
 Accept runtime-precision host solves with an explicit finite working precision.
 
template<MutableRankedMdspecLike< 2 > A, class... P>
requires HostWritableMdspec<A> && RealOrComplex<typename A::value_type> && detail::cpu_reference::LuPrecisionArgs<typename A::value_type, P...>
consteval auto kernel_accepts_types (CpuReferenceBackend, lu_factor_op const &, A &, std::span< std::size_t >, LuNorms< make_real_t< typename A::value_type > > *, SolveInfo &, SolveOptions< make_real_t< typename A::value_type > > const &, P...)
 Accept real/complex LU on mutable logical host elements.
 
template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B, class... P>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && RealOrComplex<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type> && detail::cpu_reference::LuPrecisionArgs<typename A::value_type, P...>
consteval auto kernel_accepts_types (CpuReferenceBackend, lu_solve_op const &, A &, std::span< std::size_t const >, B &, SolveInfo &, P...)
 Accept host solves from read-only factors at their working precision.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires requires(async::shared_storage<OutputTensor>& storage, detail::matrix_product_extents const& shape, uni20::cuda::Device device) { uni20::prepare_output(storage, shape, device); }
consteval auto kernel_accepts_types (CublasBackend const &, assign_product_op const &, async::shared_storage< OutputTensor > &, Scalar const &, LhsMdspan &, RhsMdspan &)
 Report cuBLAS eligibility for a deferred Tensor matrix-product output.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
consteval auto kernel_accepts_types (CublasBackend const &, assign_product_op const &, OutputTensor &, Scalar const &, LhsMdspan &, RhsMdspan &)
 Report cuBLAS eligibility for replaceable-output matrix products.
 
template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
consteval auto kernel_accepts_types (CublasBackend const &, gemm_op const &, OutputMdspan &, Scalar const &, LhsMdspan &, RhsMdspan &, Scalar const &)
 Report cuBLAS eligibility for normalized mdspec GEMM operands.
 
template<class Output , uni20::MdspecLike LhsMdspec, uni20::MdspecLike RhsMdspec>
consteval auto kernel_accepts_types (CublasBackend const &, inner_product_op const &, Output &, LhsMdspec &, RhsMdspec &)
 Report cuBLAS eligibility for a full CUDA inner product returning a host scalar.
 
template<class Output , uni20::MdspecLike InputMdspec>
consteval auto kernel_accepts_types (CublasBackend const &, norm_op const &, Output &, InputMdspec &)
 Report cuBLAS eligibility for a full CUDA norm returning a host scalar.
 
template<uni20::MutableMdspecLike Mdspec>
consteval auto kernel_accepts_types (CudaReferenceBackend const &, conjugate_inplace_op const &, Mdspec &)
 Report CUDA in-place conjugation eligibility for a normalized mdspec.
 
template<uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike InputMdspan>
consteval auto kernel_accepts_types (CudaReferenceBackend const &, copy_op const &, OutputMdspan &, InputMdspan &)
 Report CUDA copy eligibility for normalized mdspecs.
 
template<class Factor , uni20::MutableMdspecLike OutputMdspec, uni20::MdspecLike InputMdspec>
consteval auto kernel_accepts_types (CudaReferenceBackend const &, transform_inplace_op< add_scaled< Factor > > const &, OutputMdspec &, InputMdspec &)
 Report CUDA eligibility for an in-place add-scaled transform.
 
template<detail::cuda_reference::RegisteredStatelessBinary Function, uni20::MutableMdspecLike OutputMdspec, uni20::MdspecLike InputMdspec>
consteval auto kernel_accepts_types (CudaReferenceBackend const &, transform_inplace_op< Function > const &, OutputMdspec &, InputMdspec &)
 Report CUDA eligibility for a registered in-place binary transform.
 
template<class Factor , uni20::MutableMdspecLike OutputMdspec>
consteval auto kernel_accepts_types (CudaReferenceBackend const &, transform_inplace_op< scale< Factor > > const &, OutputMdspec &)
 Report CUDA eligibility for in-place scaling.
 
template<class Value , uni20::MutableMdspecLike OutputMdspec>
consteval auto kernel_accepts_types (CudaReferenceBackend const &, transform_op< constant< Value > > const &, OutputMdspec &)
 Report CUDA eligibility for a retained-value fill transform.
 
template<detail::cuda_reference::RegisteredStatelessUnary Function, uni20::MutableMdspecLike OutputMdspec, uni20::MdspecLike InputMdspec>
consteval auto kernel_accepts_types (CudaReferenceBackend const &, transform_op< Function > const &, OutputMdspec &, InputMdspec &)
 Report CUDA eligibility for a registered stateless unary transform.
 
template<detail::cuda_reference::RegisteredStatelessBinary Function, uni20::MutableMdspecLike OutputMdspec, uni20::MdspecLike LhsMdspec, uni20::MdspecLike RhsMdspec>
consteval auto kernel_accepts_types (CudaReferenceBackend const &, transform_op< Function > const &, OutputMdspec &, LhsMdspec &, RhsMdspec &)
 Report CUDA eligibility for a registered stateless binary transform.
 
template<class Factor , uni20::MutableMdspecLike OutputMdspec, uni20::MdspecLike InputMdspec>
consteval auto kernel_accepts_types (CudaReferenceBackend const &, transform_op< scale< Factor > > const &, OutputMdspec &, InputMdspec &)
 Report CUDA eligibility for a registered unary scale transform.
 
template<uni20::MutableRankedStridedMdspecLike< 1 > Values, uni20::MutableRankedStridedMdspecLike< 2 > Left, uni20::MutableRankedStridedMdspecLike< 2 > Right, uni20::MutableRankedStridedMdspecLike< 2 > Matrix>
consteval auto kernel_accepts_types (CusolverBackend const &, svd_op const &, Values &, Left &, Right &, Matrix &)
 Report cuSOLVER eligibility for a CUDA-buffer exact SVD.
 
template<class GemmSelector , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
consteval auto kernel_accepts_types (DirectGemmContractionBackend< GemmSelector > const &, contract_op< LhsRank, RhsRank, ContractedRank > const &, OutputMdspec &, Scalar const &, LhsMdspec &, RhsMdspec &, Scalar const &)
 Report direct-GEMM contraction eligibility for the retained GEMM selector.
 
template<uni20::MutableRankedStridedMdspecLike< 2 > CoefficientMdspec, uni20::MutableRankedStridedMdspecLike< 2 > RhsMdspec>
requires LapackScalar<typename CoefficientMdspec::value_type> && uni20::HostWritableMdspec<CoefficientMdspec> && uni20::HostWritableMdspec<RhsMdspec>
consteval auto kernel_accepts_types (LapackBackend const &, linear_solve_op const &, CoefficientMdspec &, RhsMdspec &, SolveInfo &, SolveOptions< uni20::make_real_t< typename CoefficientMdspec::value_type > > const &)
 Report eligibility for a host-accessible LAPACK general solve.
 
template<uni20::MutableRankedMdspecLike< 2 > LMdspec, uni20::MutableRankedMdspecLike< 2 > QMdspec, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspec>
requires LapackScalar<typename MatrixMdspec::value_type> && uni20::HostWritableMdspec<LMdspec> && uni20::HostWritableMdspec<QMdspec> && uni20::HostWritableMdspec<MatrixMdspec>
consteval auto kernel_accepts_types (LapackBackend const &, lq_op const &, LMdspec &, QMdspec &, MatrixMdspec &)
 Report eligibility for a host-accessible reduced real or complex LQ factorization.
 
template<class Output , uni20::RankedStridedMdspecLike< 2 > MatrixMdspec>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<MatrixMdspec>
consteval auto kernel_accepts_types (LapackBackend const &, matrix_norm_op const &, Output &, MatrixMdspec &)
 Report eligibility for a host-accessible LAPACK matrix norm.
 
template<uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan, class EigenScalar , uni20::MutableRankedMdspecLike< 2 > RightEigenvectorMdspan>
requires LapackScalar<typename MatrixMdspan::value_type> && uni20::HostWritableMdspec<MatrixMdspan> && uni20::HostWritableMdspec<RightEigenvectorMdspan>
consteval auto kernel_accepts_types (LapackBackend const &, nonsymmetric_eigen_op const &, MatrixMdspan &, std::span< EigenScalar > &, RightEigenvectorMdspan &)
 Report eligibility for host-accessible mdspec nonsymmetric eigenanalysis.
 
template<class Operation , uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan, class EigenScalar , uni20::MutableRankedStridedMdspecLike< 2 > SchurVectorMdspan>
requires (std::same_as<Operation, schur_op> || std::same_as<Operation, hessenberg_schur_op>) && uni20::HostWritableMdspec<MatrixMdspan> && uni20::HostWritableMdspec<SchurVectorMdspan>
consteval auto kernel_accepts_types (LapackBackend const &, Operation const &, MatrixMdspan &, std::span< EigenScalar > &, SchurVectorMdspan &)
 Report eligibility for host-accessible mdspec Schur decomposition.
 
template<lapack_detail::SvdOperation Operation, uni20::MutableStridedMdspecLike... Mdspans>
requires (LapackScalar<typename Mdspans::value_type> && ...) && (uni20::HostWritableMdspec<Mdspans> && ...) && requires { lapack_detail::svd_acceptance(Operation{}, std::type_identity<uni20::host_write_mdspan_t<Mdspans>>{}...); }
consteval auto kernel_accepts_types (LapackBackend const &, Operation const &, Mdspans &...)
 Report eligibility for host-accessible mdspec SVD operands.
 
template<uni20::MutableRankedMdspecLike< 2 > QMdspec, uni20::MutableRankedMdspecLike< 2 > RMdspec, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspec>
requires LapackScalar<typename MatrixMdspec::value_type> && uni20::HostWritableMdspec<QMdspec> && uni20::HostWritableMdspec<RMdspec> && uni20::HostWritableMdspec<MatrixMdspec>
consteval auto kernel_accepts_types (LapackBackend const &, qr_op const &, QMdspec &, RMdspec &, MatrixMdspec &)
 Report eligibility for a host-accessible reduced real or complex QR factorization.
 
template<uni20::MutableRankedStridedMdspecLike< 2 > SchurFormMdspan, uni20::MutableRankedStridedMdspecLike< 2 > SchurVectorMdspan>
requires uni20::HostWritableMdspec<SchurFormMdspan> && uni20::HostWritableMdspec<SchurVectorMdspan>
consteval auto kernel_accepts_types (LapackBackend const &, schur_reorder_op const &, SchurFormMdspan &, SchurVectorMdspan &)
 Report eligibility for host-accessible mdspec Schur reordering.
 
template<uni20::MutableRankedStridedMdspecLike< 1 > EigenvalueMdspan, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan>
requires LapackScalar<typename MatrixMdspan::value_type> && uni20::HostWritableMdspec<EigenvalueMdspan> && uni20::HostWritableMdspec<MatrixMdspan>
consteval auto kernel_accepts_types (LapackBackend const &, self_adjoint_eigh_op const &, EigenvalueMdspan &, MatrixMdspan &)
 Report eligibility for host-accessible mdspec self-adjoint eigenanalysis.
 
template<uni20::LapackReal Scalar, uni20::MutableRankedStridedMdspecLike< 2 > EigenvectorMdspan>
requires uni20::HostWritableMdspec<EigenvectorMdspan>
consteval auto kernel_accepts_types (LapackBackend const &, symmetric_tridiagonal_eigen_op const &, std::span< Scalar > &, std::span< Scalar > &, EigenvectorMdspan &)
 Report eligibility for a host-accessible mdspec tridiagonal eigensystem.
 
template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...> && (least_squares_detail::qr_acceptance<typename A::value_type, P...>() != KernelTypeAcceptance::no)
consteval auto kernel_accepts_types (LapackBackend, least_squares_op const &, X &, A &, B &, std::span< make_real_t< typename A::value_type > >, LeastSquaresInfo &, LeastSquaresOptions< make_real_t< typename A::value_type > > const &, P...)
 Accept precisely those scalar families supported by the configured LAPACK QR kernel.
 
template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
consteval auto kernel_accepts_types (LapackBackend, linear_solve_op const &, A &, B &, SolveInfo &, SolveOptions< float80 > const &)
 Accept mutable host operands for a binary80 LU solve.
 
template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && mpfr_detail::RuntimeScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
consteval auto kernel_accepts_types (LapackBackend, linear_solve_op const &, A &, B &, SolveInfo &, SolveOptions< mpreal > const &, Precision)
 Accept mutable host operands for an arbitrary-precision LU solve.
 
template<packed_detail::DecompositionMatrix A, class X , class Y , class... P>
requires packed_detail::SameMatrixScalar<A, X> && packed_detail::SameMatrixScalar<A, Y> && packed_detail::LqScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
consteval auto kernel_accepts_types (LapackBackend, lq_op const &, X &, Y &, A &, P... precision)
 Accept real or complex host matrices for reduced LQ at explicit precision.
 
template<MutableRankedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type>
consteval auto kernel_accepts_types (LapackBackend, lu_factor_op const &, A &, std::span< std::size_t >, LuNorms< float80 > *, SolveInfo &, SolveOptions< float80 > const &)
 Accept logical host workspaces for native binary80 LU.
 
template<MutableRankedStridedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && LapackScalar<typename A::value_type> && DefaultAccessorMdspanLike<host_write_mdspan_t<A>>
consteval auto kernel_accepts_types (LapackBackend, lu_factor_op const &, A &, std::span< std::size_t >, LuNorms< make_real_t< typename A::value_type > > *, SolveInfo &, SolveOptions< make_real_t< typename A::value_type > > const &)
 Accept directly addressable native LAPACK LU workspaces.
 
template<MutableRankedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && mpfr_detail::RuntimeScalar<typename A::value_type>
consteval auto kernel_accepts_types (LapackBackend, lu_factor_op const &, A &, std::span< std::size_t >, LuNorms< mpreal > *, SolveInfo &, SolveOptions< mpreal > const &, Precision)
 Accept logical host workspaces for finite-precision MPFR/MPC LU.
 
template<RankedMdspecLike< 2 > A, class... P>
requires HostReadableMdspec<A> && condition_detail::PrecisionArgs<typename A::value_type, P...> && (LapackScalar<typename A::value_type> || condition_detail::PackedGecon<typename A::value_type>)
consteval auto kernel_accepts_types (LapackBackend, lu_rcond_op const &, make_real_t< typename A::value_type > &, A &, make_real_t< typename A::value_type > const &, SolveInfo &, P...)
 Accept configured GECON providers for read-only successful LU factors.
 
template<RankedStridedMdspecLike< 2 > A, MutableRankedStridedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && LapackScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type> && DefaultAccessorMdspanLike<host_read_mdspan_t<A>> && DefaultAccessorMdspanLike<host_write_mdspan_t<B>>
consteval auto kernel_accepts_types (LapackBackend, lu_solve_op const &, A &, std::span< std::size_t const >, B &, SolveInfo &)
 Accept directly addressable read-only factors and a writable RHS.
 
template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
consteval auto kernel_accepts_types (LapackBackend, lu_solve_op const &, A &, std::span< std::size_t const >, B &, SolveInfo &)
 Accept read-only binary80 factors and logical host RHS elements.
 
template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && mpfr_detail::RuntimeScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
consteval auto kernel_accepts_types (LapackBackend, lu_solve_op const &, A &, std::span< std::size_t const >, B &, SolveInfo &, Precision)
 Accept read-only runtime-precision factors and logical host RHS elements.
 
template<packed_detail::DecompositionMatrix A, packed_detail::DecompositionMatrix R, class... P>
requires std::same_as<typename R::value_type, complex<make_real_t<typename A::value_type>>> && packed_detail::EigenScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
consteval auto kernel_accepts_types (LapackBackend, nonsymmetric_eigen_op const &, A &, std::span< typename R::value_type >, R &, P... precision)
 Accept real or complex input and actual complex eigenvalue/vector outputs.
 
template<packed_detail::DecompositionMatrix A, class X , class Y , class... P>
requires packed_detail::SameMatrixScalar<A, X> && packed_detail::SameMatrixScalar<A, Y> && packed_detail::QrScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
consteval auto kernel_accepts_types (LapackBackend, qr_op const &, X &, Y &, A &, P... precision)
 Accept real or complex host matrices for reduced QR at explicit precision.
 
template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::EighScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto kernel_accepts_types (LapackBackend, self_adjoint_eigh_op const &, V &, A &, P... precision)
 Accept matching real eigenvalues and real or complex host matrix storage.
 
template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto kernel_accepts_types (LapackBackend, singular_values_op const &op, V &v, A &a, P... precision)
 Accept explicit-precision SVD with the requested output structure.
 
template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...> && (LapackScalar<typename A::value_type> || least_squares_detail::PackedGelss<typename A::value_type>)
consteval auto kernel_accepts_types (LapackBackend, svd_least_squares_op const &, X &, A &, B &, std::span< make_real_t< typename A::value_type > >, LeastSquaresInfo &, SvdLeastSquaresDiagnostics< make_real_t< typename A::value_type > > &, SvdLeastSquaresOptions< make_real_t< typename A::value_type > > const &, P...)
 Accept configured real/complex GELSS providers; runtime scalars require explicit precision.
 
template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto kernel_accepts_types (LapackBackend, svd_left_op const &op, V &v, A &a, P... precision)
 Accept explicit-precision SVD with the requested output structure.
 
template<class V , packed_detail::DecompositionMatrix A, class L , class... P>
requires packed_detail::SameMatrixScalar<A, L> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto kernel_accepts_types (LapackBackend, svd_left_op const &op, V &v, L &l, A &a, P... precision)
 Accept explicit-precision SVD with the requested output structure.
 
template<class V , packed_detail::DecompositionMatrix A, class F , class... P>
requires packed_detail::SameMatrixScalar<A, F> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto kernel_accepts_types (LapackBackend, svd_op const &op, V &v, F &f, A &a, P... precision)
 Accept explicit-precision SVD with the requested output structure.
 
template<class V , packed_detail::DecompositionMatrix A, class L , class R , class... P>
requires packed_detail::SameMatrixScalar<A, L> && packed_detail::SameMatrixScalar<A, R> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto kernel_accepts_types (LapackBackend, svd_op const &op, V &v, L &l, R &r, A &a, P... precision)
 Accept explicit-precision SVD with the requested output structure.
 
template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto kernel_accepts_types (LapackBackend, svd_right_op const &op, V &v, A &a, P... precision)
 Accept explicit-precision SVD with the requested output structure.
 
template<class V , packed_detail::DecompositionMatrix A, class R , class... P>
requires packed_detail::SameMatrixScalar<A, R> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto kernel_accepts_types (LapackBackend, svd_right_op const &op, V &v, R &r, A &a, P... precision)
 Accept explicit-precision SVD with the requested output structure.
 
template<class GemmSelector , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
consteval auto kernel_accepts_types (LoopedGemmContractionBackend< GemmSelector > const &, contract_op< LhsRank, RhsRank, ContractedRank > const &, OutputMdspec &, Scalar const &, LhsMdspec &, RhsMdspec &, Scalar const &)
 Report looped-GEMM contraction eligibility for the retained GEMM selector.
 
constexpr std::string_view kernel_attempt_name (KernelAttempt attempt) noexcept
 Return a stable human-readable kernel-attempt result name.
 
constexpr bool kernel_attempt_succeeded (KernelAttempt attempt) noexcept
 Return whether a backend performed the operation.
 
template<class BackendSelector , class Op , class... Args>
constexpr auto kernel_type_candidates (BackendSelector &&selector, Op const &, Args &&...)
 Filter a backend selector to candidates accepting the call's argument types.
 
template<class... Args>
requires requires(Args&&... args) { least_squares_with_info(std::forward<Args>(args)...); }
auto least_squares (Args &&... args)
 Return a preserving least-squares solution; numerical failure uses the ordinary terminal error policy.
 
template<RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto least_squares_with_info (A const &a, B const &b, LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Infer precision and select the ordinary host-result backends.
 
template<RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto least_squares_with_info (A const &a, B const &b, Precision p, LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Use the ordinary backend selector for the owning host result.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto least_squares_with_info (Backend &&backend, A const &a, B const &b, LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Infer working precision from input defaults, requiring matching finite defaults when both exist.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto least_squares_with_info (Backend &&backend, A const &a, B const &b, Precision p, LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Minimize each column's Euclidean residual for m-by-n A with m >= n.
 
template<class GemmSelector >
 LoopedGemmContractionBackend (GemmSelector) -> LoopedGemmContractionBackend< std::remove_cvref_t< GemmSelector > >
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto lq (async::Async< MatrixTensor > &&matrix, std::optional< Precision > requested={})
 Schedule a consuming reduced real or complex LQ factorization using the static Tensor selector.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto lq (async::Async< MatrixTensor > const &matrix, std::optional< Precision > requested={})
 Schedule a preserving reduced real or complex LQ factorization using the static Tensor selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto lq (BackendSelector &&selector, MatrixTensor &&matrix, std::optional< Precision > requested={})
 Consume an owning real or complex matrix and return its reduced LQ factorization through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto lq (BackendSelector &&selector, MatrixTensor const &matrix, std::optional< Precision > requested={})
 Preserve a real or complex matrix and return its reduced LQ factorization through an explicit selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto lq (BackendSelector selector, async::Async< MatrixTensor > &&matrix, std::optional< Precision > requested={})
 Schedule a consuming reduced real or complex LQ factorization through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto lq (BackendSelector selector, async::Async< MatrixTensor > const &matrix, std::optional< Precision > requested={})
 Schedule a preserving reduced real or complex LQ factorization through an explicit selector.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto lq (MatrixTensor &&matrix, std::optional< Precision > requested={})
 Consume an owning real or complex matrix and return its reduced LQ factorization.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto lq (MatrixTensor const &matrix, std::optional< Precision > requested={})
 Preserve a real or complex matrix and return its reduced LQ factorization.
 
template<KernelBackendSelector BackendSelector, class LTensor , class QTensor , class MatrixTensor >
requires detail::CompatibleLqTensors<LTensor, QTensor, MatrixTensor>
void lq_factorization (BackendSelector &&selector, LTensor &&l, QTensor &&q, MatrixTensor &&matrix_work, std::optional< Precision > requested={})
 Compute reduced LQ in a destructive input workspace through an explicit selector.
 
template<class LTensor , class QTensor , class MatrixTensor >
requires detail::CompatibleLqTensors<LTensor, QTensor, MatrixTensor>
void lq_factorization (LTensor &&l, QTensor &&q, MatrixTensor &&matrix_work, std::optional< Precision > requested={})
 Compute reduced LQ in a destructive workspace using tensor storage policy.
 
template<class... Args>
requires requires(Args&&... args) { lu_factor_with_info(std::forward<Args>(args)...); }
auto lu_factor (Args &&... args)
 Return completed owning factors; numerical failure uses the terminal error policy.
 
template<RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto lu_factor_with_info (A const &a, LuOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Factor with the default backend for the materialized host workspace.
 
template<RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto lu_factor_with_info (A const &a, Precision p, LuOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Factor at explicit precision with the default host backend.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto lu_factor_with_info (Backend &&backend, A const &a, LuOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Factor at native precision or the input tensor's finite construction default.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto lu_factor_with_info (Backend &&backend, A const &a, Precision p, LuOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Factor at explicit finite precision, preserving input values and defaults.
 
template<class... Args>
requires requires(Args&&... args) { lu_rcond_with_info(std::forward<Args>(args)...); }
auto lu_rcond (Args &&... args)
 Return the reciprocal condition estimate; numerical failure uses the terminal error policy.
 
template<KernelBackendSelector Backend, RealOrComplex S>
auto lu_rcond_with_info (Backend &&backend, LuFactorization< S > const &factor, MatrixNorm norm, make_real_t< S > const &original_norm)
 Estimate conditioning using an explicitly supplied original matrix norm.
 
template<KernelBackendSelector Backend, RealOrComplex S>
auto lu_rcond_with_info (Backend &&backend, LuFactorization< S > const &factor, MatrixNorm norm=MatrixNorm::One)
 Estimate conditioning from retained original norms; missing capture is an ordinary error.
 
template<RealOrComplex S>
auto lu_rcond_with_info (LuFactorization< S > const &factor, MatrixNorm norm, make_real_t< S > const &original_norm)
 Estimate with default dispatch and an explicit original norm.
 
template<RealOrComplex S>
auto lu_rcond_with_info (LuFactorization< S > const &factor, MatrixNorm norm=MatrixNorm::One)
 Estimate with default dispatch and the norms retained during factorization.
 
template<class... Args>
requires requires(Args&&... args) { lu_refine_with_info(std::forward<Args>(args)...); }
auto lu_refine (Args &&... args)
 Return the refined solution only on convergence; other outcomes use the terminal error policy.
 
template<RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto lu_refine_with_info (A const &a, B const &b, LuRefinementPrecision< F, W, R > p, RefinementOptions< make_real_t< R > > const &options={}, LuOptions< make_real_t< F > > const &factor_options={.retain_norms=false})
 Refine with the ordinary host backend selection for the factor scalar.
 
template<KernelBackendSelector Backend, RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto lu_refine_with_info (Backend &&backend, A const &a, B const &b, LuRefinementPrecision< F, W, R > p, RefinementOptions< make_real_t< R > > const &options={}, LuOptions< make_real_t< F > > const &factor_options={.retain_norms=false})
 Factor at p.factor, then solve and refine with independently selected working/residual arithmetic.
 
template<KernelBackendSelector Backend, RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto lu_refine_with_info (Backend &&backend, LuFactorization< F > const &factor, A const &a, B const &b, LuRefinementPrecision< F, W, R > p, RefinementOptions< make_real_t< R > > const &options={})
 Refine a preserving solve using existing LU factors and the original A and B.
 
template<RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto lu_refine_with_info (LuFactorization< F > const &factor, A const &a, B const &b, LuRefinementPrecision< F, W, R > p, RefinementOptions< make_real_t< R > > const &options={})
 Refine from reusable factors with ordinary host solve dispatch.
 
template<KernelBackendSelector Backend, RealOrComplex S, RankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
auto lu_solve (Backend &&backend, LuFactorization< S > const &factor, B const &b)
 Preserve the RHS and return an owning column-major solution at factor precision.
 
template<RealOrComplex S, RankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
auto lu_solve (LuFactorization< S > const &factor, B const &b)
 Preserve the RHS and solve with default host backends.
 
template<class... Args>
requires requires(Args&&... args) { lu_solve_inplace_with_info(std::forward<Args>(args)...); }
void lu_solve_inplace (Args &&... args)
 Strict solve in an existing RHS workspace; numerical failure is terminal.
 
template<KernelBackendSelector Backend, RealOrComplex S, MutableRankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
SolveInfo lu_solve_inplace_with_info (Backend &&backend, LuFactorization< S > const &factor, B &&b)
 Solve in an existing RHS workspace, preserving the factors on every outcome.
 
template<RealOrComplex S, MutableRankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
SolveInfo lu_solve_inplace_with_info (LuFactorization< S > const &factor, B &&b)
 Solve in place using the factors' and RHS storage-selected backends.
 
template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
auto make_contraction_axes (std::array< std::pair< std::size_t, std::size_t >, ContractedRank > requested_axes) -> ContractionAxes< LhsRank, RhsRank, ContractedRank >
 Normalize and validate a fixed-size array of contraction-axis pairs.
 
template<uni20::MdspanLike Mdspan>
auto make_contraction_matrix_mdspan (Mdspan &span, ContractionMatrixProjection const &projection) -> contraction_matrix_mdspan_t< Mdspan >
 Project a resolved mdspan into one rank-two GEMM operand without changing storage.
 
template<uni20::MdspecLike Mdspec>
auto make_contraction_matrix_mdspec (Mdspec &span, ContractionMatrixProjection const &projection) -> contraction_matrix_mdspec_t< Mdspec >
 Project an mdspec into one rank-two GEMM operand without acquiring its handle.
 
template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
auto make_contraction_stride_groups (OutputMdspec const &output, LhsMdspec const &lhs, RhsMdspec const &rhs, ContractionAxes< LhsRank, RhsRank, ContractedRank > const &axes) -> ContractionStrideGroups< LhsRank, RhsRank, ContractedRank >
 Build jointly merged M, N, and K stride groups without acquiring data handles.
 
template<uni20::MdspecLike Mdspec>
requires (detail::contraction_strides::can_offset_contraction_mdspec<Mdspec>())
auto make_offset_contraction_matrix_mdspec (Mdspec &span, ContractionMatrixProjection const &projection, uni20::index_type element_offset) -> offset_contraction_matrix_mdspec_t< Mdspec >
 Project a rank-two mdspec slice at one nonnegative element offset.
 
template<std::size_t InputRank, ReductionAxis... Axes>
auto make_reduction_axes (Axes... requested_axes) -> ReductionAxes< InputRank, sizeof...(Axes)>
 Normalize and validate a runtime reduction-axis pack.
 
template<uni20::AsyncTensorOutput OutputTensor, uni20::RankedTensorView< 2 > InputTensor, class TimeScalar >
requires uni20::MutableRankedTensorView<OutputTensor, 2> && requires(TimeScalar&& time) { async::read(std::forward<TimeScalar>(time)); }
void matrix_exponential (async::Async< OutputTensor > &output, async::Async< InputTensor > const &input, TimeScalar &&time)
 Schedule fixed-output matrix exponentiation using static Tensor policy.
 
template<class BackendSelector , uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > InputTensor, class TimeScalar >
void matrix_exponential (BackendSelector &&selector, OutputTensor &&output, InputTensor const &input, TimeScalar time)
 Overwrite a fixed-size output with the matrix exponential exp(time * input).
 
template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput OutputTensor, uni20::RankedTensorView< 2 > InputTensor, class TimeScalar >
requires uni20::MutableRankedTensorView<OutputTensor, 2> && requires(TimeScalar&& time) { async::read(std::forward<TimeScalar>(time)); }
void matrix_exponential (BackendSelector selector, async::Async< OutputTensor > &output, async::Async< InputTensor > const &input, TimeScalar &&time)
 Schedule fixed-output matrix exponentiation through an explicit selector.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > InputTensor, class TimeScalar >
void matrix_exponential (OutputTensor &&output, InputTensor const &input, TimeScalar time)
 Apply the fixed-output matrix_exponential contract using tensor storage policy.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && requires(MatrixTensor const& matrix) { uni20::norm(matrix); }
auto matrix_norm (async::Async< MatrixTensor > const &matrix, MatrixNorm kind)
 Schedule a storage-preserving dense matrix norm using static Tensor policy.
 
template<uni20::AsyncTensorOutput OutputTensor, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::MutableScalarTensorView<OutputTensor> && uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && std::same_as<uni20::tensor_element_t<OutputTensor>, uni20::make_real_t<uni20::tensor_element_t<MatrixTensor>>>
void matrix_norm (async::Async< OutputTensor > &output, async::Async< MatrixTensor > const &matrix, MatrixNorm kind)
 Schedule a matrix norm into an explicit async scalar Tensor using storage policy.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && requires(MatrixTensor const& matrix) { uni20::norm(matrix); }
auto matrix_norm (BackendSelector &&selector, MatrixTensor const &matrix, MatrixNorm kind)
 Return a storage-preserving rank-zero Tensor matrix norm.
 
template<KernelBackendSelector BackendSelector, uni20::MutableRankedMdspanLike< 0 > OutputMdspan, uni20::RankedMdspanLike< 2 > MatrixMdspan>
requires uni20::RealOrComplex<typename std::remove_cvref_t<MatrixMdspan>::value_type> && std::same_as<typename std::remove_cvref_t<OutputMdspan>::value_type, uni20::make_real_t<typename std::remove_cvref_t<MatrixMdspan>::value_type>>
void matrix_norm (BackendSelector &&selector, OutputMdspan &&output, MatrixMdspan &&matrix, MatrixNorm kind)
 Compute a bare mdspan matrix norm into a rank-zero output.
 
template<KernelBackendSelector BackendSelector, uni20::MutableScalarTensorView OutputTensor, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && std::same_as<uni20::tensor_element_t<OutputTensor>, uni20::make_real_t<uni20::tensor_element_t<MatrixTensor>>>
void matrix_norm (BackendSelector &&selector, OutputTensor &&output, MatrixTensor const &matrix, MatrixNorm kind)
 Compute a Tensor matrix norm into an existing real scalar Tensor.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && requires(MatrixTensor const& matrix) { uni20::norm(matrix); }
auto matrix_norm (BackendSelector selector, async::Async< MatrixTensor > const &matrix, MatrixNorm kind)
 Schedule a storage-preserving dense matrix norm through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput OutputTensor, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::MutableScalarTensorView<OutputTensor> && uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && std::same_as<uni20::tensor_element_t<OutputTensor>, uni20::make_real_t<uni20::tensor_element_t<MatrixTensor>>>
void matrix_norm (BackendSelector selector, async::Async< OutputTensor > &output, async::Async< MatrixTensor > const &matrix, MatrixNorm kind)
 Schedule a matrix norm into an explicit async scalar Tensor.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && requires(MatrixTensor const& matrix) { uni20::norm(matrix); }
auto matrix_norm (MatrixTensor const &matrix, MatrixNorm kind)
 Return a storage-preserving rank-zero Tensor matrix norm using storage policy.
 
template<uni20::MutableScalarTensorView OutputTensor, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && std::same_as<uni20::tensor_element_t<OutputTensor>, uni20::make_real_t<uni20::tensor_element_t<MatrixTensor>>>
void matrix_norm (OutputTensor &&output, MatrixTensor const &matrix, MatrixNorm kind)
 Compute a Tensor matrix norm using the operands' storage policy.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>>
auto matrix_norm_host (async::Async< MatrixTensor > const &matrix, MatrixNorm kind)
 Schedule a dense matrix norm returning a host C++ scalar using static Tensor policy.
 
template<KernelBackendSelector BackendSelector, uni20::RankedMdspanLike< 2 > MatrixMdspan>
requires uni20::RealOrComplex<typename std::remove_cvref_t<MatrixMdspan>::value_type>
auto matrix_norm_host (BackendSelector &&selector, MatrixMdspan &&matrix, MatrixNorm kind) -> uni20::make_real_t< typename std::remove_cvref_t< MatrixMdspan >::value_type >
 Return a bare mdspan matrix norm as a host C++ scalar.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>>
auto matrix_norm_host (BackendSelector &&selector, MatrixTensor const &matrix, MatrixNorm kind) -> uni20::make_real_t< uni20::tensor_element_t< MatrixTensor > >
 Return a Tensor matrix norm as a host C++ scalar through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>>
auto matrix_norm_host (BackendSelector selector, async::Async< MatrixTensor > const &matrix, MatrixNorm kind)
 Schedule a dense matrix norm returning a host C++ scalar through an explicit selector.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>>
auto matrix_norm_host (MatrixTensor const &matrix, MatrixNorm kind) -> uni20::make_real_t< uni20::tensor_element_t< MatrixTensor > >
 Return a Tensor matrix norm as a host C++ scalar using storage policy.
 
template<KernelBackendSelector BackendSelector, uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > RightEigenvectorTensor>
void nonsymmetric_eigen (BackendSelector &&selector, MatrixTensor &&matrix_work, std::span< EigenScalar > eigenvalues, RightEigenvectorTensor &&right_eigenvectors, bool compute_right_vectors, std::optional< Precision > requested={})
 Compute eigenvalues and optional right eigenvectors, destroying the input matrix.
 
template<uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > RightEigenvectorTensor>
void nonsymmetric_eigen (MatrixTensor &&matrix_work, std::span< EigenScalar > eigenvalues, RightEigenvectorTensor &&right_eigenvectors, bool compute_right_vectors, std::optional< Precision > requested={})
 Apply the destructive nonsymmetric_eigen contract using tensor storage policy.
 
template<class Backend >
requires (!is_backend_list_v<Backend>)
constexpr auto normalize_backend_selector (Backend &&backend)
 Treat a single backend value as a one-entry backend list.
 
template<class... Backends>
constexpr auto normalize_backend_selector (backend_list< Backends... > selector) -> backend_list< Backends... >
 Return an explicit backend list unchanged.
 
template<class BackendSelector , class Op , class... Args>
constexpr KernelTypeAcceptance probe_dispatch_kernel (BackendSelector &&, Op const &, Args &&...)
 Probe whether a backend selector can dispatch an operation for the argument types.
 
template<class BackendSelector , class Op , class... Args>
consteval KernelTypeAcceptance probe_dispatch_kernel_types ()
 Probe whether a backend selector type can dispatch operation argument types.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto qr (async::Async< MatrixTensor > &&matrix, std::optional< Precision > requested={})
 Schedule a consuming reduced real or complex QR factorization using the static Tensor selector.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto qr (async::Async< MatrixTensor > const &matrix, std::optional< Precision > requested={})
 Schedule a preserving reduced real or complex QR factorization using the static Tensor selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto qr (BackendSelector &&selector, MatrixTensor &&matrix, std::optional< Precision > requested={})
 Consume an owning real or complex matrix and return its reduced QR factorization through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto qr (BackendSelector &&selector, MatrixTensor const &matrix, std::optional< Precision > requested={})
 Preserve a real or complex matrix and return its reduced QR factorization through an explicit selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto qr (BackendSelector selector, async::Async< MatrixTensor > &&matrix, std::optional< Precision > requested={})
 Schedule a consuming reduced real or complex QR factorization through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto qr (BackendSelector selector, async::Async< MatrixTensor > const &matrix, std::optional< Precision > requested={})
 Schedule a preserving reduced real or complex QR factorization through an explicit selector.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto qr (MatrixTensor &&matrix, std::optional< Precision > requested={})
 Consume an owning real or complex matrix and return its reduced QR factorization.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto qr (MatrixTensor const &matrix, std::optional< Precision > requested={})
 Preserve a real or complex matrix and return its reduced QR factorization.
 
template<KernelBackendSelector BackendSelector, class QTensor , class RTensor , class MatrixTensor >
requires detail::CompatibleQrTensors<QTensor, RTensor, MatrixTensor>
void qr_factorization (BackendSelector &&selector, QTensor &&q, RTensor &&r, MatrixTensor &&matrix_work, std::optional< Precision > requested={})
 Compute reduced QR in a destructive input workspace through an explicit selector.
 
template<class QTensor , class RTensor , class MatrixTensor >
requires detail::CompatibleQrTensors<QTensor, RTensor, MatrixTensor>
void qr_factorization (QTensor &&q, RTensor &&r, MatrixTensor &&matrix_work, std::optional< Precision > requested={})
 Compute reduced QR in a destructive workspace using tensor storage policy.
 
template<std::size_t InputRank, std::size_t ReducedRank>
constexpr bool reduction_axes_are_valid (ReductionAxes< InputRank, ReducedRank > const &axes) noexcept
 Return whether a reduction-axis descriptor partitions every input axis.
 
template<class BackendSelector , uni20::MutableRankedTensorView< 2 > SchurFormTensor, uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void reorder_schur (BackendSelector &&selector, SchurFormTensor &&schur_form, SchurVectorTensor &&schur_vectors, std::size_t from, std::size_t to, bool update_vectors)
 Reorder a Schur form in place, optionally updating its Schur vectors.
 
template<uni20::MutableRankedTensorView< 2 > SchurFormTensor, uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void reorder_schur (SchurFormTensor &&schur_form, SchurVectorTensor &&schur_vectors, std::size_t from, std::size_t to, bool update_vectors)
 Apply the in-place reorder_schur contract using tensor storage policy.
 
template<class Factor >
 scale (Factor) -> scale< std::decay_t< Factor > >
 Deduce a scaling operation that owns a decayed factor value.
 
template<class BackendSelector , uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void schur (BackendSelector &&selector, MatrixTensor &&matrix_work, std::span< EigenScalar > eigenvalues, SchurVectorTensor &&schur_vectors, bool compute_vectors)
 Replace a square matrix by its Schur form and optionally return Schur vectors.
 
template<uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void schur (MatrixTensor &&matrix_work, std::span< EigenScalar > eigenvalues, SchurVectorTensor &&schur_vectors, bool compute_vectors)
 Apply the destructive schur contract using tensor storage policy.
 
template<class Operation , class FirstTensor , class... RestTensors>
constexpr auto select_backend (Operation const &operation, FirstTensor const &, RestTensors const &...)
 Select the default backend list for an operation on Tensor operands.
 
template<class FirstTensor , class... RestTensors, class Operation >
constexpr auto select_backend_for (Operation const &operation)
 Resolve the immutable backend selector for Tensor operand types.
 
template<class StoragePolicy , class Operation >
constexpr auto select_backend_for_storage (Operation const &operation)
 Resolve a backend selector directly from one storage policy.
 
template<uni20::Real Real>
auto select_svd_truncation (std::span< Real const > singular_values, SvdTruncationPolicy< Real > const &policy={}) -> SvdTruncationInfo< Real >
 Select a retained prefix from descending singular values.
 
template<KernelBackendSelector BackendSelector, uni20::MutableRankedTensorView< 1 > EigenvalueTensor, uni20::MutableRankedTensorView< 2 > MatrixTensor>
void self_adjoint_eigh (BackendSelector &&selector, EigenvalueTensor &&eigenvalues, MatrixTensor &&matrix_work, SelfAdjointEighOptions options={}, std::optional< Precision > requested={})
 Compute an in-place self-adjoint eigensystem through an explicit selector.
 
template<uni20::MutableRankedTensorView< 1 > EigenvalueTensor, uni20::MutableRankedTensorView< 2 > MatrixTensor>
void self_adjoint_eigh (EigenvalueTensor &&eigenvalues, MatrixTensor &&matrix_work, SelfAdjointEighOptions options={}, std::optional< Precision > requested={})
 Compute an in-place self-adjoint eigensystem using tensor storage policy.
 
template<KernelBackendSelector Selector, MutableRankedTensorView< 1 > V, MutableRankedTensorView< 2 > A>
void self_adjoint_eigh (Selector &&selector, V &&eigenvalues, A &&matrix_work, Precision p, SelfAdjointEighOptions options={})
 Compute a destructive decomposition at explicit precision with optional output settings.
 
template<MutableRankedTensorView< 1 > V, MutableRankedTensorView< 2 > A>
void self_adjoint_eigh (V &&eigenvalues, A &&matrix_work, Precision p, SelfAdjointEighOptions options={})
 Compute a destructive decomposition at explicit precision with optional output settings.
 
template<uni20::AsyncTensorOutput MatrixTensor, class Diagonal , class OffDiagonal >
requires uni20::MutableRankedTensorView<MatrixTensor, 2> && AsyncOperationScalar<Diagonal, uni20::tensor_element_t<MatrixTensor>> && AsyncOperationScalar<OffDiagonal, uni20::tensor_element_t<MatrixTensor>>
void set_matrix (async::Async< MatrixTensor > &matrix, Diagonal &&diagonal, OffDiagonal &&off_diagonal, MatrixRegion region=MatrixRegion::All)
 Schedule structured matrix initialization using static Tensor policy.
 
template<class BackendSelector , uni20::MutableRankedTensorView< 2 > MatrixTensor, class Scalar >
void set_matrix (BackendSelector &&selector, MatrixTensor &&matrix, Scalar diagonal, Scalar off_diagonal, MatrixRegion region=MatrixRegion::All)
 Set diagonal and off-diagonal entries in a selected matrix region.
 
template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput MatrixTensor, class Diagonal , class OffDiagonal >
requires uni20::MutableRankedTensorView<MatrixTensor, 2> && AsyncOperationScalar<Diagonal, uni20::tensor_element_t<MatrixTensor>> && AsyncOperationScalar<OffDiagonal, uni20::tensor_element_t<MatrixTensor>>
void set_matrix (BackendSelector selector, async::Async< MatrixTensor > &matrix, Diagonal &&diagonal, OffDiagonal &&off_diagonal, MatrixRegion region=MatrixRegion::All)
 Schedule structured matrix initialization through an explicit selector.
 
template<uni20::MutableRankedTensorView< 2 > MatrixTensor, class Scalar >
void set_matrix (MatrixTensor &&matrix, Scalar diagonal, Scalar off_diagonal, MatrixRegion region=MatrixRegion::All)
 Apply the set_matrix region contract using the matrix storage's backend selector.
 
template<KernelBackendSelector BackendSelector, uni20::MutableRankedTensorView< 1 > SingularValueTensor, uni20::MutableRankedTensorView< 2 > LeftTensor, uni20::MutableRankedTensorView< 2 > RightAdjointTensor, uni20::MutableRankedTensorView< 2 > MatrixTensor>
void singular_value_decomposition (BackendSelector &&selector, SingularValueTensor &&singular_values, LeftTensor &&left_singular_vectors, RightAdjointTensor &&right_singular_vectors_adjoint, MatrixTensor &&matrix_work, SvdOptions options={}, std::optional< Precision > requested={})
 Compute a destructive exact SVD through an explicit selector.
 
template<KernelBackendSelector Selector, MutableRankedTensorView< 1 > V, MutableRankedTensorView< 2 > L, MutableRankedTensorView< 2 > R, MutableRankedTensorView< 2 > A>
void singular_value_decomposition (Selector &&selector, V &&values, L &&left, R &&right, A &&matrix_work, Precision p, SvdOptions options={})
 Compute a destructive decomposition at explicit precision with optional output settings.
 
template<uni20::MutableRankedTensorView< 1 > SingularValueTensor, uni20::MutableRankedTensorView< 2 > LeftTensor, uni20::MutableRankedTensorView< 2 > RightAdjointTensor, uni20::MutableRankedTensorView< 2 > MatrixTensor>
void singular_value_decomposition (SingularValueTensor &&singular_values, LeftTensor &&left_singular_vectors, RightAdjointTensor &&right_singular_vectors_adjoint, MatrixTensor &&matrix_work, SvdOptions options={}, std::optional< Precision > requested={})
 Compute a destructive exact SVD using tensor storage policy.
 
template<MutableRankedTensorView< 1 > V, MutableRankedTensorView< 2 > L, MutableRankedTensorView< 2 > R, MutableRankedTensorView< 2 > A>
void singular_value_decomposition (V &&values, L &&left, R &&right, A &&matrix_work, Precision p, SvdOptions options={})
 Compute a destructive decomposition at explicit precision with optional output settings.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto singular_values (async::Async< MatrixTensor > &&matrix, std::optional< Precision > requested={})
 Schedule consuming exact singular values using the static Tensor selector.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto singular_values (async::Async< MatrixTensor > const &matrix, std::optional< Precision > requested={})
 Schedule preserving exact singular values using the static Tensor selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto singular_values (BackendSelector &&selector, MatrixTensor &&matrix, std::optional< Precision > requested={})
 Consume an owning matrix and return its exact singular values through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto singular_values (BackendSelector &&selector, MatrixTensor const &matrix, std::optional< Precision > requested={})
 Preserve a matrix and return its exact singular values through an explicit selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto singular_values (BackendSelector selector, async::Async< MatrixTensor > &&matrix, std::optional< Precision > requested={})
 Schedule consuming exact singular values through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto singular_values (BackendSelector selector, async::Async< MatrixTensor > const &matrix, std::optional< Precision > requested={})
 Schedule preserving exact singular values through an explicit selector.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto singular_values (MatrixTensor &&matrix, std::optional< Precision > requested={})
 Consume an owning matrix and return its exact singular values.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto singular_values (MatrixTensor const &matrix, std::optional< Precision > requested={})
 Preserve a matrix and return its exact singular values.
 
template<class... Args>
requires requires(Args&&... args) { slogdet_with_info(std::forward<Args>(args)...); }
auto slogdet (Args &&... args)
 Return the log-determinant, including conventional zero for singular matrices.
 
template<RankedTensorView< 2 > A, class... Options>
requires RealOrComplex<tensor_element_t<A>>
auto slogdet_with_info (A const &a, Options const &... options)
 Factor and reduce with the default backends for the owned host workspace.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto slogdet_with_info (Backend &&backend, A const &a, Precision p, SolveOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Factor once at explicit finite precision and return a recoverable log-determinant.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto slogdet_with_info (Backend &&backend, A const &a, SolveOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Factor once at native or inferred finite precision and reduce its diagonal.
 
template<RealOrComplex S>
LogDeterminantResult< S > slogdet_with_info (LuFactorization< S > const &factor)
 Reduce completed factors in O(n), without refactoring or changing them.
 
template<uni20::RankedTensorView< 2 > CoefficientTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<CoefficientTensor>> && std::same_as<uni20::tensor_element_t<CoefficientTensor>, uni20::tensor_element_t<RhsTensor>>
auto solve (async::Async< CoefficientTensor > const &coefficients, async::Async< RhsTensor > const &right_hand_sides, std::optional< Precision > p={})
 Schedule a preserving dense general solve using static Tensor policy.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > CoefficientTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<CoefficientTensor>> && std::same_as<uni20::tensor_element_t<CoefficientTensor>, uni20::tensor_element_t<RhsTensor>>
auto solve (BackendSelector &&selector, CoefficientTensor const &coefficients, RhsTensor const &right_hand_sides, std::optional< Precision > requested={})
 Preserve inputs and return the dense solution through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > CoefficientTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<CoefficientTensor>> && std::same_as<uni20::tensor_element_t<CoefficientTensor>, uni20::tensor_element_t<RhsTensor>>
auto solve (BackendSelector selector, async::Async< CoefficientTensor > const &coefficients, async::Async< RhsTensor > const &right_hand_sides, std::optional< Precision > p={})
 Schedule a preserving dense general solve through an explicit selector.
 
template<uni20::RankedTensorView< 2 > CoefficientTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<CoefficientTensor>> && std::same_as<uni20::tensor_element_t<CoefficientTensor>, uni20::tensor_element_t<RhsTensor>>
auto solve (CoefficientTensor const &coefficients, RhsTensor const &right_hand_sides, std::optional< Precision > requested={})
 Preserve inputs and return an owning column-major host solution.
 
template<RealOrComplex S, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B, refinement_detail::HostMatrix X>
requires (Complex<S> == Complex<tensor_element_t<A>> && Complex<S> == Complex<tensor_element_t<B>> && Complex<S> == Complex<tensor_element_t<X>>)
SolveDiagnosticsResult< S > solve_diagnostics_with_info (A const &a, B const &b, X const &x, Precision p)
 Evaluate b - A*x and normwise/componentwise backward error in scalar S at p.
 
template<uni20::AsyncTensorOutput CoefficientTensor, uni20::AsyncTensorOutput RhsTensor>
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
void solve_inplace (async::Async< CoefficientTensor > &coefficients, async::Async< RhsTensor > &right_hand_sides, std::optional< Precision > p={})
 Schedule a destructive dense general solve using static Tensor policy.
 
template<KernelBackendSelector BackendSelector, class CoefficientTensor , class RhsTensor >
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
void solve_inplace (BackendSelector &&selector, CoefficientTensor &&coefficients, RhsTensor &&right_hand_sides, std::optional< Precision > requested={})
 Solve a general system in destructive coefficient and RHS workspaces.
 
template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput CoefficientTensor, uni20::AsyncTensorOutput RhsTensor>
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
void solve_inplace (BackendSelector selector, async::Async< CoefficientTensor > &coefficients, async::Async< RhsTensor > &right_hand_sides, std::optional< Precision > p={})
 Schedule a destructive dense general solve through an explicit selector.
 
template<class CoefficientTensor , class RhsTensor >
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
void solve_inplace (CoefficientTensor &&coefficients, RhsTensor &&right_hand_sides, std::optional< Precision > p={})
 Solve a general system in destructive workspaces using storage policy.
 
template<class A , class B >
requires detail::CompatibleLinearSolveTensors<A, B>
SolveInfo solve_inplace_with_info (A &&a, B &&b, Precision p, SolveOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Solve at explicit precision using storage-selected backends.
 
template<KernelBackendSelector BackendSelector, class A , class B >
requires detail::CompatibleLinearSolveTensors<A, B>
SolveInfo solve_inplace_with_info (BackendSelector &&selector, A &&a, B &&b, Precision p, SolveOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Solve in place at an explicit operation precision, independent of workspace defaults.
 
template<KernelBackendSelector BackendSelector, class CoefficientTensor , class RhsTensor >
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
SolveInfo solve_inplace_with_info (BackendSelector &&selector, CoefficientTensor &&coefficients, RhsTensor &&right_hand_sides, SolveOptions< uni20::make_real_t< uni20::tensor_element_t< CoefficientTensor > > > const &options={})
 Solve in destructive workspaces and return numerical diagnostics.
 
template<class CoefficientTensor , class RhsTensor >
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
SolveInfo solve_inplace_with_info (CoefficientTensor &&coefficients, RhsTensor &&right_hand_sides, SolveOptions< uni20::make_real_t< uni20::tensor_element_t< CoefficientTensor > > > const &options={})
 Return numerical solve diagnostics using storage-selected backends.
 
template<RankedTensorView< 2 > Matrix>
auto svd (async::Async< Matrix > &&matrix, Precision p, SvdOptions options={})
 Compute SVD at explicit working precision with optional output settings.
 
template<RankedTensorView< 2 > Matrix>
auto svd (async::Async< Matrix > const &matrix, Precision p, SvdOptions options={})
 Compute SVD at explicit working precision with optional output settings.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto svd (async::Async< MatrixTensor > &&matrix, SvdOptions options={}, std::optional< Precision > requested={})
 Schedule a consuming exact SVD using the static Tensor selector.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto svd (async::Async< MatrixTensor > const &matrix, SvdOptions options={}, std::optional< Precision > requested={})
 Schedule a preserving exact SVD using the static Tensor selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto svd (BackendSelector &&selector, MatrixTensor &&matrix, SvdOptions options={}, std::optional< Precision > requested={})
 Consume an owning matrix and return its exact singular value decomposition.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto svd (BackendSelector &&selector, MatrixTensor const &matrix, SvdOptions options={}, std::optional< Precision > requested={})
 Preserve a matrix and return its exact singular value decomposition through an explicit selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto svd (BackendSelector selector, async::Async< MatrixTensor > &&matrix, SvdOptions options={}, std::optional< Precision > requested={})
 Schedule a consuming exact SVD through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto svd (BackendSelector selector, async::Async< MatrixTensor > const &matrix, SvdOptions options={}, std::optional< Precision > requested={})
 Schedule a preserving exact SVD through an explicit selector.
 
template<RankedTensorView< 2 > Matrix>
auto svd (Matrix &&matrix, Precision p, SvdOptions options={})
 Compute SVD at explicit working precision with optional output settings.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto svd (MatrixTensor &&matrix, SvdOptions options={}, std::optional< Precision > requested={})
 Consume an owning matrix and return its exact singular value decomposition.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto svd (MatrixTensor const &matrix, SvdOptions options={}, std::optional< Precision > requested={})
 Preserve a matrix and return its exact singular value decomposition.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto svd (Selector &&selector, async::Async< Matrix > &&matrix, Precision p, SvdOptions options={})
 Compute SVD at explicit working precision with optional output settings.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto svd (Selector &&selector, async::Async< Matrix > const &matrix, Precision p, SvdOptions options={})
 Compute SVD at explicit working precision with optional output settings.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto svd (Selector &&selector, Matrix &&matrix, Precision p, SvdOptions options={})
 Compute SVD at explicit working precision with optional output settings.
 
template<class... Args>
requires requires(Args&&... args) { svd_least_squares_with_info(std::forward<Args>(args)...); }
auto svd_least_squares (Args &&... args)
 Return a preserving truncated-SVD solution; numerical failure uses the ordinary terminal error policy.
 
template<RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto svd_least_squares_with_info (A const &a, B const &b, Precision p, SvdLeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Use the ordinary backend selector for the owning host result.
 
template<RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto svd_least_squares_with_info (A const &a, B const &b, SvdLeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Infer precision and select the ordinary host-result backends.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto svd_least_squares_with_info (Backend &&backend, A const &a, B const &b, Precision p, SvdLeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Compute a minimum-norm solution after singular-value truncation for rectangular A.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto svd_least_squares_with_info (Backend &&backend, A const &a, B const &b, SvdLeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Infer working precision from input defaults, requiring matching finite defaults when both exist.
 
template<RankedTensorView< 2 > Matrix>
auto svd_left (async::Async< Matrix > &&matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute left SVD factors at explicit working precision with optional output settings.
 
template<RankedTensorView< 2 > Matrix>
auto svd_left (async::Async< Matrix > const &matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute left SVD factors at explicit working precision with optional output settings.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto svd_left (async::Async< MatrixTensor > &&matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Schedule consuming left singular vectors using the static Tensor selector.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto svd_left (async::Async< MatrixTensor > const &matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Schedule preserving left singular vectors using the static Tensor selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto svd_left (BackendSelector &&selector, MatrixTensor &&matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Consume an owning matrix and return exact left singular vectors and singular values.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto svd_left (BackendSelector &&selector, MatrixTensor const &matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Preserve a matrix and return exact left singular vectors and singular values.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto svd_left (BackendSelector selector, async::Async< MatrixTensor > &&matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Schedule consuming left singular vectors through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto svd_left (BackendSelector selector, async::Async< MatrixTensor > const &matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Schedule preserving left singular vectors through an explicit selector.
 
template<RankedTensorView< 2 > Matrix>
auto svd_left (Matrix &&matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute left SVD factors at explicit working precision with optional output settings.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto svd_left (MatrixTensor &&matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Consume an owning matrix and return exact left singular vectors and singular values.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto svd_left (MatrixTensor const &matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Preserve a matrix and return exact left singular vectors and singular values.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto svd_left (Selector &&selector, async::Async< Matrix > &&matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute left SVD factors at explicit working precision with optional output settings.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto svd_left (Selector &&selector, async::Async< Matrix > const &matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute left SVD factors at explicit working precision with optional output settings.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto svd_left (Selector &&selector, Matrix &&matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute left SVD factors at explicit working precision with optional output settings.
 
template<RankedTensorView< 2 > Matrix>
auto svd_right (async::Async< Matrix > &&matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute right SVD factors at explicit working precision with optional output settings.
 
template<RankedTensorView< 2 > Matrix>
auto svd_right (async::Async< Matrix > const &matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute right SVD factors at explicit working precision with optional output settings.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto svd_right (async::Async< MatrixTensor > &&matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Schedule consuming right singular vectors using the static Tensor selector.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto svd_right (async::Async< MatrixTensor > const &matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Schedule preserving right singular vectors using the static Tensor selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto svd_right (BackendSelector &&selector, MatrixTensor &&matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Consume an owning matrix and return exact singular values and right singular vectors.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto svd_right (BackendSelector &&selector, MatrixTensor const &matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Preserve a matrix and return exact singular values and right singular vectors.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto svd_right (BackendSelector selector, async::Async< MatrixTensor > &&matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Schedule consuming right singular vectors through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto svd_right (BackendSelector selector, async::Async< MatrixTensor > const &matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Schedule preserving right singular vectors through an explicit selector.
 
template<RankedTensorView< 2 > Matrix>
auto svd_right (Matrix &&matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute right SVD factors at explicit working precision with optional output settings.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto svd_right (MatrixTensor &&matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Consume an owning matrix and return exact singular values and right singular vectors.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto svd_right (MatrixTensor const &matrix, SvdVectorExtent extent=SvdVectorExtent::Reduced, std::optional< Precision > requested={})
 Preserve a matrix and return exact singular values and right singular vectors.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto svd_right (Selector &&selector, async::Async< Matrix > &&matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute right SVD factors at explicit working precision with optional output settings.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto svd_right (Selector &&selector, async::Async< Matrix > const &matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute right SVD factors at explicit working precision with optional output settings.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto svd_right (Selector &&selector, Matrix &&matrix, Precision p, SvdVectorExtent extent=SvdVectorExtent::Reduced)
 Compute right SVD factors at explicit working precision with optional output settings.
 
template<class BackendSelector , uni20::LapackReal Scalar, uni20::MutableRankedTensorView< 2 > EigenvectorTensor>
void symmetric_tridiagonal_eigen (BackendSelector &&selector, std::span< Scalar > diagonal, std::span< Scalar > subdiagonal, EigenvectorTensor &&eigenvectors, bool compute_vectors)
 Overwrite a real symmetric tridiagonal matrix with its eigensystem.
 
template<uni20::LapackReal Scalar, uni20::MutableRankedTensorView< 2 > EigenvectorTensor>
void symmetric_tridiagonal_eigen (std::span< Scalar > diagonal, std::span< Scalar > subdiagonal, EigenvectorTensor &&eigenvectors, bool compute_vectors)
 Apply the destructive symmetric_tridiagonal_eigen contract using host tensor backend policy.
 
template<class Function >
 transform_inplace_op (Function) -> transform_inplace_op< std::decay_t< Function > >
 Deduce an update operation that owns a decayed callable value.
 
template<class Function >
 transform_op (Function) -> transform_op< std::decay_t< Function > >
 Deduce an overwrite operation that owns a decayed callable value.
 
template<RankedTensorView< 2 > Matrix>
auto truncated_svd (async::Async< Matrix > &&matrix, Precision p, SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > > policy={})
 Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.
 
template<RankedTensorView< 2 > Matrix>
auto truncated_svd (async::Async< Matrix > const &matrix, Precision p, SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > > policy={})
 Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto truncated_svd (async::Async< MatrixTensor > &&matrix, detail::svd_truncation_policy_t< MatrixTensor > policy={}, std::optional< Precision > requested={})
 Schedule a consuming truncated SVD using the static Tensor selector.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto truncated_svd (async::Async< MatrixTensor > const &matrix, detail::svd_truncation_policy_t< MatrixTensor > policy={}, std::optional< Precision > requested={})
 Schedule a preserving truncated SVD using the static Tensor selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto truncated_svd (BackendSelector &&selector, MatrixTensor &&matrix, SvdTruncationPolicy< uni20::make_real_t< uni20::tensor_element_t< MatrixTensor > > > policy={}, std::optional< Precision > requested={})
 Consume an owning matrix and return a truncated reduced SVD through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto truncated_svd (BackendSelector &&selector, MatrixTensor const &matrix, SvdTruncationPolicy< uni20::make_real_t< uni20::tensor_element_t< MatrixTensor > > > policy={}, std::optional< Precision > requested={})
 Preserve a matrix and return a truncated reduced SVD through an explicit selector.
 
template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto truncated_svd (BackendSelector selector, async::Async< MatrixTensor > &&matrix, detail::svd_truncation_policy_t< MatrixTensor > policy={}, std::optional< Precision > requested={})
 Schedule a consuming truncated SVD through an explicit selector.
 
template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto truncated_svd (BackendSelector selector, async::Async< MatrixTensor > const &matrix, detail::svd_truncation_policy_t< MatrixTensor > policy={}, std::optional< Precision > requested={})
 Schedule a preserving truncated SVD through an explicit selector.
 
template<RankedTensorView< 2 > Matrix>
auto truncated_svd (Matrix &&matrix, Precision p, SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > > policy={})
 Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.
 
template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto truncated_svd (MatrixTensor &&matrix, SvdTruncationPolicy< uni20::make_real_t< uni20::tensor_element_t< MatrixTensor > > > policy={}, std::optional< Precision > requested={})
 Consume an owning matrix and return a truncated reduced SVD.
 
template<uni20::RankedTensorView< 2 > MatrixTensor>
auto truncated_svd (MatrixTensor const &matrix, SvdTruncationPolicy< uni20::make_real_t< uni20::tensor_element_t< MatrixTensor > > > policy={}, std::optional< Precision > requested={})
 Preserve a matrix and return a truncated reduced SVD.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto truncated_svd (Selector &&selector, async::Async< Matrix > &&matrix, Precision p, SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > > policy={})
 Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto truncated_svd (Selector &&selector, async::Async< Matrix > const &matrix, Precision p, SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > > policy={})
 Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.
 
template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto truncated_svd (Selector &&selector, Matrix &&matrix, Precision p, SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > > policy={})
 Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.
 
template<class BackendSelector , class Op , class... Args>
requires detail::KernelDispatchTypesAccepted<detail::normalized_backend_selector_t<BackendSelector>, Op, Args...>
bool try_dispatch_kernel (BackendSelector &&selector, Op op, Args &&... args)
 Normalize a selector and try each eligible backend until one performs the operation.
 
template<MutableRankedTensorView< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<mutable_tensor_mdspec_t<C>> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<tensor_element_t<C>, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
KernelAttempt try_kernel (BlasBackend backend, assign_product_op const &, async::shared_storage< C > &storage, S const &alpha, A &a, B &b)
 Construct or resize a deferred output before binary80 GEMM.
 
template<MutableRankedTensorView< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<mutable_tensor_mdspec_t<C>> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<tensor_element_t<C>, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
KernelAttempt try_kernel (BlasBackend backend, assign_product_op const &, C &c, S const &alpha, A &a, B &b)
 Prepare the host output and lower assignment to binary80 GEMM.
 
template<MutableRankedMdspecLike< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<C> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<typename C::value_type, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
KernelAttempt try_kernel (BlasBackend, gemm_op const &, C &c, S const &alpha, A &a, B &b, S const &beta)
 Pack logical host values and execute GEMM through value-preserving provider conversion.
 
template<MutableRankedMdspecLike< 2 > C, mpfr_detail::RuntimeScalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<C> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<typename C::value_type, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
KernelAttempt try_kernel (BlasBackend, gemm_op const &, C &c, S const &alpha, A &a, B &b, S const &beta, Precision p)
 Pack logical host values and execute GEMM at one explicit precision.
 
template<uni20::MutableRankedMdspecLike< 1 > OutputMdspan, class Scalar , uni20::RankedMdspecLike< 2 > MatrixMdspan, uni20::RankedMdspecLike< 1 > InputMdspan>
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<MatrixMdspan> && uni20::HostReadableMdspec<InputMdspan>
KernelAttempt try_kernel (BlasBackend, gemv_op const &, OutputMdspan &output, Scalar alpha, MatrixMdspan &matrix, InputMdspan &input, Scalar beta)
 Resolve host access and try BLAS GEMV.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostAssignProductAccess<OutputTensor, LhsMdspan, RhsMdspan>
KernelAttempt try_kernel (CpuReferenceBackend, assign_product_op const &, async::shared_storage< OutputTensor > &output_storage, Scalar alpha, LhsMdspan &lhs, RhsMdspan &rhs)
 Construct or resize a deferred host output and run reference GEMM.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostAssignProductAccess<OutputTensor, LhsMdspan, RhsMdspan>
KernelAttempt try_kernel (CpuReferenceBackend, assign_product_op const &, OutputTensor &output, Scalar alpha, LhsMdspan &lhs, RhsMdspan &rhs)
 Lower a replaceable-output host tensor matrix product to fixed-output GEMM.
 
template<uni20::MutableMdspecLike Mdspan>
requires uni20::HostWritableMdspec<Mdspan>
KernelAttempt try_kernel (CpuReferenceBackend, conjugate_inplace_op const &, Mdspan &mdspan)
 Resolve host access and conjugate every element.
 
template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, uni20::MutableRankedMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, uni20::RankedMdspecLike< LhsRank > LhsMdspec, uni20::RankedMdspecLike< RhsRank > RhsMdspec>
requires detail::cpu_contract_backend::HostContractionAccess<OutputMdspec, LhsMdspec, RhsMdspec>
KernelAttempt try_kernel (CpuReferenceBackend, contract_op< LhsRank, RhsRank, ContractedRank > const &operation, OutputMdspec &output, Scalar alpha, LhsMdspec &lhs, RhsMdspec &rhs, Scalar beta)
 Acquire host access and execute the reference contraction kernel.
 
template<uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike InputMdspan>
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<InputMdspan>
KernelAttempt try_kernel (CpuReferenceBackend, copy_op const &, OutputMdspan &output, InputMdspan &input)
 Resolve host access and copy through the resulting mdspans.
 
template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostGemmMdspanAccess<OutputMdspan, LhsMdspan, RhsMdspan>
KernelAttempt try_kernel (CpuReferenceBackend, gemm_op const &, OutputMdspan &output, Scalar alpha, LhsMdspan &lhs, RhsMdspan &rhs, Scalar beta)
 Resolve host access and run reference GEMM.
 
template<uni20::MutableRankedMdspecLike< 1 > OutputMdspan, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > MatrixMdspan, uni20::RankedMdspecLike< 1 > InputMdspan>
requires detail::HostGemvMdspanAccess<OutputMdspan, MatrixMdspan, InputMdspan>
KernelAttempt try_kernel (CpuReferenceBackend, gemv_op const &, OutputMdspan &output, Scalar alpha, MatrixMdspan &matrix, InputMdspan &input, Scalar beta)
 Resolve host access and run reference GEMV.
 
template<class Output , uni20::MdspecLike LhsMdspan, uni20::MdspecLike RhsMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<LhsMdspan> && uni20::HostReadableMdspec<RhsMdspan>
KernelAttempt try_kernel (CpuReferenceBackend, inner_product_op const &, Output &output, LhsMdspan &lhs, RhsMdspan &rhs)
 Resolve host access and compute an inner product.
 
template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...>
KernelAttempt try_kernel (CpuReferenceBackend, least_squares_op const &, X &x, A &a, B &b, std::span< make_real_t< typename A::value_type > > residuals, LeastSquaresInfo &info, LeastSquaresOptions< make_real_t< typename A::value_type > > const &options, P... precision)
 Solve by Givens QR; numerical failure completes dispatch without publishing output.
 
template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && RealOrComplex<typename A::value_type> && has_runtime_precision_v<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
KernelAttempt try_kernel (CpuReferenceBackend, linear_solve_op const &, A &a, B &b, SolveInfo &info, SolveOptions< make_real_t< typename A::value_type > > const &options, Precision p)
 Convert runtime workspaces, then use reference LU and triangular substitution.
 
template<uni20::MutableRankedMdspecLike< 2 > CoefficientMdspec, uni20::MutableRankedMdspecLike< 2 > RhsMdspec>
requires uni20::HostWritableMdspec<CoefficientMdspec> && uni20::HostWritableMdspec<RhsMdspec>
KernelAttempt try_kernel (CpuReferenceBackend, linear_solve_op const &, CoefficientMdspec &coefficients, RhsMdspec &right_hand_sides, SolveInfo &info, SolveOptions< uni20::make_real_t< typename CoefficientMdspec::value_type > > const &options)
 Resolve host access and solve a dense general linear system.
 
template<MutableRankedMdspecLike< 2 > A, class... P>
requires HostWritableMdspec<A> && RealOrComplex<typename A::value_type> && detail::cpu_reference::LuPrecisionArgs<typename A::value_type, P...>
KernelAttempt try_kernel (CpuReferenceBackend, lu_factor_op const &, A &a, std::span< std::size_t > pivots, LuNorms< make_real_t< typename A::value_type > > *norms, SolveInfo &info, SolveOptions< make_real_t< typename A::value_type > > const &options, P... precision)
 Factor with partial row pivoting, converting runtime values to finite working precision.
 
template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B, class... P>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && RealOrComplex<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type> && detail::cpu_reference::LuPrecisionArgs<typename A::value_type, P...>
KernelAttempt try_kernel (CpuReferenceBackend, lu_solve_op const &, A &a, std::span< std::size_t const > pivots, B &b, SolveInfo &info, P... precision)
 Apply row swaps and triangular substitution, converting runtime RHS values to factor precision.
 
template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, uni20::RankedMdspecLike< 2 > InputMdspan, class TimeScalar >
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<InputMdspan>
KernelAttempt try_kernel (CpuReferenceBackend, matrix_exponential_op const &, OutputMdspan &output, InputMdspan &input, TimeScalar time)
 Resolve host access and compute a matrix exponential.
 
template<class Output , uni20::RankedMdspecLike< 2 > MatrixMdspec>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<MatrixMdspec>
KernelAttempt try_kernel (CpuReferenceBackend, matrix_norm_op const &operation, Output &output, MatrixMdspec &matrix)
 Resolve host access and compute a matrix norm.
 
template<uni20::MutableRankedMdspecLike< 2 > MatrixMdspan, uni20::Scalar Scalar>
requires uni20::HostWritableMdspec<MatrixMdspan>
KernelAttempt try_kernel (CpuReferenceBackend, matrix_set_op const &op, MatrixMdspan &matrix, Scalar diagonal, Scalar off_diagonal)
 Resolve host access and initialize the matrix.
 
template<class Output , uni20::MdspecLike InputMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<InputMdspan>
KernelAttempt try_kernel (CpuReferenceBackend, norm_op const &, Output &output, InputMdspan &input)
 Resolve host access and compute a Euclidean norm.
 
template<class Output , std::size_t InputRank, std::size_t ReducedRank, uni20::MdspecLike InputMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<InputMdspan>
KernelAttempt try_kernel (CpuReferenceBackend, sum_reduction_op< InputRank, ReducedRank > const &operation, Output &output, InputMdspan &input)
 Resolve host access and sum selected axes.
 
template<class Function , uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike... InputMdspans>
requires uni20::HostWritableMdspec<OutputMdspan> && (uni20::HostReadableMdspec<InputMdspans> && ...)
KernelAttempt try_kernel (CpuReferenceBackend, transform_inplace_op< Function > const &operation, OutputMdspan &output, InputMdspans &... inputs)
 Resolve host access and apply an update transform.
 
template<class Function , uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike... InputMdspans>
requires uni20::HostWritableMdspec<OutputMdspan> && (uni20::HostReadableMdspec<InputMdspans> && ...)
KernelAttempt try_kernel (CpuReferenceBackend, transform_op< Function > const &operation, OutputMdspan &output, InputMdspans &... inputs)
 Resolve host access and apply an overwrite transform.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires requires(async::shared_storage<OutputTensor>& storage, detail::matrix_product_extents const& shape, uni20::cuda::Device device) { uni20::prepare_output(storage, shape, device); }
KernelAttempt try_kernel (CublasBackend, assign_product_op const &, async::shared_storage< OutputTensor > &output_storage, Scalar alpha, LhsMdspan &lhs, RhsMdspan &rhs)
 Construct or relocate a deferred CUDA output and run blocking cuBLAS GEMM.
 
template<uni20::MutableRankedTensorView< 2 > OutputTensor, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
KernelAttempt try_kernel (CublasBackend, assign_product_op const &, OutputTensor &output, Scalar alpha, LhsMdspan &lhs, RhsMdspan &rhs)
 Prepare a replaceable output and lower normalized operands for cuBLAS GEMM.
 
template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
KernelAttempt try_kernel (CublasBackend, gemm_op const &, OutputMdspan &output, Scalar alpha, LhsMdspan &lhs, RhsMdspan &rhs, Scalar beta)
 Invoke the cuBLAS GEMM adapter with normalized mdspecs.
 
template<class Output , uni20::MdspecLike LhsMdspec, uni20::MdspecLike RhsMdspec>
requires detail::cublas_backend::HostScalarOutput<Output, typename std::remove_cvref_t<LhsMdspec>::value_type> && detail::cublas_backend::RawReadableCudaReductionMdspec< LhsMdspec, typename std::remove_cvref_t<LhsMdspec>::value_type> && detail::cublas_backend::RawReadableCudaReductionMdspec<RhsMdspec, typename std::remove_cvref_t<LhsMdspec>::value_type>
KernelAttempt try_kernel (CublasBackend, inner_product_op const &, Output &output, LhsMdspec &lhs, RhsMdspec &rhs)
 Compute a full CUDA inner product through cuBLAS.
 
template<class Output , uni20::MdspecLike InputMdspec>
requires detail::cublas_backend::HostScalarOutput< Output, uni20::make_real_t<typename std::remove_cvref_t<InputMdspec>::value_type>> && detail::cublas_backend::RawReadableCudaReductionMdspec<InputMdspec, typename std::remove_cvref_t<InputMdspec>::value_type>
KernelAttempt try_kernel (CublasBackend, norm_op const &, Output &output, InputMdspec &input)
 Compute a full CUDA Euclidean norm through cuBLAS.
 
template<class Mdspec >
requires detail::cuda_reference::SupportedConjugateMdspec<Mdspec>
KernelAttempt try_kernel (CudaReferenceBackend, conjugate_inplace_op const &, Mdspec &mdspec)
 Perform in-place conjugation on a normalized CUDA mdspec.
 
template<uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike InputMdspan>
KernelAttempt try_kernel (CudaReferenceBackend, copy_op const &, OutputMdspan &output, InputMdspan &input)
 Perform a CUDA copy from normalized mdspecs.
 
template<class Factor , class OutputMdspec , class InputMdspec >
requires detail::cuda_reference::SupportedAddScaledMdspecs<OutputMdspec, InputMdspec, Factor>
KernelAttempt try_kernel (CudaReferenceBackend, transform_inplace_op< add_scaled< Factor > > const &operation, OutputMdspec &output, InputMdspec &input)
 Accumulate a scaled CUDA mdspec into another.
 
template<detail::cuda_reference::RegisteredStatelessBinary Function, class OutputMdspec , class InputMdspec >
requires detail::cuda_reference::SupportedInplaceStatelessBinaryMdspecs<OutputMdspec, InputMdspec, Function>
KernelAttempt try_kernel (CudaReferenceBackend, transform_inplace_op< Function > const &operation, OutputMdspec &output, InputMdspec &input)
 Apply a registered in-place binary transform to CUDA mdspecs.
 
template<class Factor , class OutputMdspec >
requires detail::cuda_reference::SupportedInplaceScaleMdspec<OutputMdspec, Factor>
KernelAttempt try_kernel (CudaReferenceBackend, transform_inplace_op< scale< Factor > > const &operation, OutputMdspec &output)
 Scale a CUDA mdspec in place.
 
template<class Value , class OutputMdspec >
requires detail::cuda_reference::SupportedFillMdspec<OutputMdspec, Value>
KernelAttempt try_kernel (CudaReferenceBackend, transform_op< constant< Value > > const &operation, OutputMdspec &output)
 Fill a CUDA mdspec with one retained scalar value.
 
template<detail::cuda_reference::RegisteredStatelessUnary Function, class OutputMdspec , class InputMdspec >
requires detail::cuda_reference::SupportedStatelessUnaryMdspecs<OutputMdspec, InputMdspec, Function>
KernelAttempt try_kernel (CudaReferenceBackend, transform_op< Function > const &operation, OutputMdspec &output, InputMdspec &input)
 Apply a registered stateless unary transform to CUDA mdspec operands.
 
template<detail::cuda_reference::RegisteredStatelessBinary Function, class OutputMdspec , class LhsMdspec , class RhsMdspec >
requires detail::cuda_reference::SupportedStatelessBinaryMdspecs<OutputMdspec, LhsMdspec, RhsMdspec, Function>
KernelAttempt try_kernel (CudaReferenceBackend, transform_op< Function > const &operation, OutputMdspec &output, LhsMdspec &lhs, RhsMdspec &rhs)
 Apply a registered stateless binary transform to CUDA mdspec operands.
 
template<class Factor , class OutputMdspec , class InputMdspec >
requires detail::cuda_reference::SupportedScaleMdspecs<OutputMdspec, InputMdspec, Factor>
KernelAttempt try_kernel (CudaReferenceBackend, transform_op< scale< Factor > > const &operation, OutputMdspec &output, InputMdspec &input)
 Apply a registered unary scale transform to CUDA mdspec operands.
 
template<uni20::MutableRankedStridedMdspecLike< 1 > Values, uni20::MutableRankedStridedMdspecLike< 2 > Left, uni20::MutableRankedStridedMdspecLike< 2 > Right, uni20::MutableRankedStridedMdspecLike< 2 > Matrix>
requires detail::cusolver_backend::CusolverSvdMdspecs<Values, Left, Right, Matrix>
KernelAttempt try_kernel (CusolverBackend, svd_op const &operation, Values &values, Left &left, Right &right, Matrix &matrix)
 Compute one blocking exact SVD through cuSOLVER gesvd.
 
template<class GemmSelector , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
requires (detail::direct_gemm_contraction_backend::gemm_dispatch_types_compatible<GemmSelector, OutputMdspec, Scalar, LhsMdspec, RhsMdspec>())
KernelAttempt try_kernel (DirectGemmContractionBackend< GemmSelector > const &backend, contract_op< LhsRank, RhsRank, ContractedRank > const &operation, OutputMdspec &output, Scalar alpha, LhsMdspec &lhs, RhsMdspec &rhs, Scalar beta)
 Project a contraction and execute it through one nested GEMM dispatch.
 
template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...> && (least_squares_detail::qr_acceptance<typename A::value_type, P...>() != KernelTypeAcceptance::no)
KernelAttempt try_kernel (LapackBackend, least_squares_op const &, X &x, A &a, B &b, std::span< make_real_t< typename A::value_type > > residuals, LeastSquaresInfo &info, LeastSquaresOptions< make_real_t< typename A::value_type > > const &options, P... precision)
 Solve using configured LAPACK/MPLAPACK reduced QR and scalar-generic triangular substitution.
 
template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
KernelAttempt try_kernel (LapackBackend, linear_solve_op const &, A &a, B &b, SolveInfo &info, SolveOptions< float80 > const &options)
 Convert workspaces at the boundary and report LU solve diagnostics without double-precision intermediates.
 
template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && mpfr_detail::RuntimeScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
KernelAttempt try_kernel (LapackBackend, linear_solve_op const &, A &a, B &b, SolveInfo &info, SolveOptions< mpreal > const &options, Precision p)
 Convert workspaces at the boundary and report LU solve diagnostics without native-float intermediates.
 
template<uni20::MutableRankedStridedMdspecLike< 2 > CoefficientMdspec, uni20::MutableRankedStridedMdspecLike< 2 > RhsMdspec>
requires LapackScalar<typename CoefficientMdspec::value_type> && uni20::HostWritableMdspec<CoefficientMdspec> && uni20::HostWritableMdspec<RhsMdspec>
KernelAttempt try_kernel (LapackBackend, linear_solve_op const &, CoefficientMdspec &coefficients, RhsMdspec &right_hand_sides, SolveInfo &info, SolveOptions< uni20::make_real_t< typename CoefficientMdspec::value_type > > const &options)
 Resolve host access and solve a general system through LAPACK LU factorization.
 
template<uni20::MutableRankedMdspecLike< 2 > LMdspec, uni20::MutableRankedMdspecLike< 2 > QMdspec, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspec>
requires LapackScalar<typename MatrixMdspec::value_type> && uni20::HostWritableMdspec<LMdspec> && uni20::HostWritableMdspec<QMdspec> && uni20::HostWritableMdspec<MatrixMdspec>
KernelAttempt try_kernel (LapackBackend, lq_op const &, LMdspec &l, QMdspec &q, MatrixMdspec &matrix_work)
 Resolve host access and compute reduced LQ through LAPACK gelqf and orglq/unglq.
 
template<packed_detail::DecompositionMatrix A, class X , class Y , class... P>
requires packed_detail::SameMatrixScalar<A, X> && packed_detail::SameMatrixScalar<A, Y> && packed_detail::LqScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
KernelAttempt try_kernel (LapackBackend, lq_op const &, X &l, Y &q, A &a, P... precision)
 Pack logical elements and compute reduced LQ through MPLAPACK.
 
template<MutableRankedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type>
KernelAttempt try_kernel (LapackBackend, lu_factor_op const &, A &a, std::span< std::size_t > pivots, LuNorms< float80 > *norms, SolveInfo &info, SolveOptions< float80 > const &options)
 Convert values at the backend boundary and compute portable owning factors.
 
template<MutableRankedStridedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && LapackScalar<typename A::value_type> && DefaultAccessorMdspanLike<host_write_mdspan_t<A>>
KernelAttempt try_kernel (LapackBackend, lu_factor_op const &, A &a, std::span< std::size_t > pivots, LuNorms< make_real_t< typename A::value_type > > *norms, SolveInfo &info, SolveOptions< make_real_t< typename A::value_type > > const &options)
 Compute packed factors through GETRF, preserving all outputs on decline.
 
template<MutableRankedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && mpfr_detail::RuntimeScalar<typename A::value_type>
KernelAttempt try_kernel (LapackBackend, lu_factor_op const &, A &a, std::span< std::size_t > pivots, LuNorms< mpreal > *norms, SolveInfo &info, SolveOptions< mpreal > const &options, Precision p)
 Convert values at the backend boundary and compute portable owning factors.
 
template<RankedMdspecLike< 2 > A, class... P>
requires HostReadableMdspec<A> && condition_detail::PrecisionArgs<typename A::value_type, P...> && (LapackScalar<typename A::value_type> || condition_detail::PackedGecon<typename A::value_type>)
KernelAttempt try_kernel (LapackBackend, lu_rcond_op const &op, make_real_t< typename A::value_type > &output, A &a, make_real_t< typename A::value_type > const &original_norm, SolveInfo &info, P... precision)
 Estimate reciprocal conditioning without modifying the factors.
 
template<RankedStridedMdspecLike< 2 > A, MutableRankedStridedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && LapackScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type> && DefaultAccessorMdspanLike<host_read_mdspan_t<A>> && DefaultAccessorMdspanLike<host_write_mdspan_t<B>>
KernelAttempt try_kernel (LapackBackend, lu_solve_op const &, A &a, std::span< std::size_t const > pivots, B &b, SolveInfo &info)
 Apply GETRS without modifying the factors.
 
template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
KernelAttempt try_kernel (LapackBackend, lu_solve_op const &, A &a, std::span< std::size_t const > pivots, B &b, SolveInfo &info)
 Solve using binary80 arithmetic; RHS failures leave the factors reusable.
 
template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && mpfr_detail::RuntimeScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
KernelAttempt try_kernel (LapackBackend, lu_solve_op const &, A &a, std::span< std::size_t const > pivots, B &b, SolveInfo &info, Precision p)
 Solve at the factors' precision; RHS failures leave the factors reusable.
 
template<class Output , uni20::RankedStridedMdspecLike< 2 > MatrixMdspec>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<MatrixMdspec>
KernelAttempt try_kernel (LapackBackend, matrix_norm_op const &operation, Output &output, MatrixMdspec &matrix)
 Resolve host access and compute a matrix norm through LAPACK.
 
template<packed_detail::DecompositionMatrix A, packed_detail::DecompositionMatrix R, class... P>
requires std::same_as<typename R::value_type, complex<make_real_t<typename A::value_type>>> && packed_detail::EigenScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
KernelAttempt try_kernel (LapackBackend, nonsymmetric_eigen_op const &op, A &a, std::span< typename R::value_type > v, R &r, P... precision)
 Unpack real conjugate pairs into complex columns; omit unread vector output when disabled.
 
template<uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan, class EigenScalar , uni20::MutableRankedMdspecLike< 2 > RightEigenvectorMdspan>
requires LapackScalar<typename MatrixMdspan::value_type> && uni20::HostWritableMdspec<MatrixMdspan> && uni20::HostWritableMdspec<RightEigenvectorMdspan>
KernelAttempt try_kernel (LapackBackend, nonsymmetric_eigen_op const &operation, MatrixMdspan &matrix_work, std::span< EigenScalar > eigenvalues, RightEigenvectorMdspan &right_eigenvectors)
 Resolve host access and run LAPACK nonsymmetric eigenanalysis.
 
template<class Operation , uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan, class EigenScalar , uni20::MutableRankedStridedMdspecLike< 2 > SchurVectorMdspan>
requires (std::same_as<Operation, schur_op> || std::same_as<Operation, hessenberg_schur_op>) && uni20::HostWritableMdspec<MatrixMdspan> && uni20::HostWritableMdspec<SchurVectorMdspan>
KernelAttempt try_kernel (LapackBackend, Operation const &operation, MatrixMdspan &matrix_work, std::span< EigenScalar > eigenvalues, SchurVectorMdspan &schur_vectors)
 Resolve host access and run a LAPACK Schur decomposition.
 
template<lapack_detail::SvdOperation Operation, uni20::MutableStridedMdspecLike... Mdspans>
requires (LapackScalar<typename Mdspans::value_type> && ...) && (uni20::HostWritableMdspec<Mdspans> && ...) && requires { lapack_detail::svd_acceptance(Operation{}, std::type_identity<uni20::host_write_mdspan_t<Mdspans>>{}...); }
KernelAttempt try_kernel (LapackBackend, Operation const &operation, Mdspans &... mdspans)
 Resolve host access and run a LAPACK SVD operation.
 
template<uni20::MutableRankedMdspecLike< 2 > QMdspec, uni20::MutableRankedMdspecLike< 2 > RMdspec, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspec>
requires LapackScalar<typename MatrixMdspec::value_type> && uni20::HostWritableMdspec<QMdspec> && uni20::HostWritableMdspec<RMdspec> && uni20::HostWritableMdspec<MatrixMdspec>
KernelAttempt try_kernel (LapackBackend, qr_op const &, QMdspec &q, RMdspec &r, MatrixMdspec &matrix_work)
 Resolve host access and compute reduced QR through LAPACK geqrf and orgqr/ungqr.
 
template<packed_detail::DecompositionMatrix A, class X , class Y , class... P>
requires packed_detail::SameMatrixScalar<A, X> && packed_detail::SameMatrixScalar<A, Y> && packed_detail::QrScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
KernelAttempt try_kernel (LapackBackend, qr_op const &, X &q, Y &r, A &a, P... precision)
 Pack logical elements and compute reduced QR through MPLAPACK.
 
template<uni20::MutableRankedStridedMdspecLike< 2 > SchurFormMdspan, uni20::MutableRankedStridedMdspecLike< 2 > SchurVectorMdspan>
requires uni20::HostWritableMdspec<SchurFormMdspan> && uni20::HostWritableMdspec<SchurVectorMdspan>
KernelAttempt try_kernel (LapackBackend, schur_reorder_op const &operation, SchurFormMdspan &schur_form, SchurVectorMdspan &schur_vectors)
 Resolve host access and run LAPACK Schur reordering.
 
template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::EighScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt try_kernel (LapackBackend, self_adjoint_eigh_op const &op, V &v, A &a, P... precision)
 Read only the selected triangle and return values and optional vectors at p.
 
template<uni20::MutableRankedStridedMdspecLike< 1 > EigenvalueMdspan, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan>
requires LapackScalar<typename MatrixMdspan::value_type> && uni20::HostWritableMdspec<EigenvalueMdspan> && uni20::HostWritableMdspec<MatrixMdspan>
KernelAttempt try_kernel (LapackBackend, self_adjoint_eigh_op const &operation, EigenvalueMdspan &eigenvalues, MatrixMdspan &matrix_work)
 Resolve host access and run LAPACK self-adjoint eigenanalysis.
 
template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt try_kernel (LapackBackend, singular_values_op const &op, V &v, A &a, P... precision)
 Compute the requested SVD factors through logical host packing.
 
template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...> && (LapackScalar<typename A::value_type> || least_squares_detail::PackedGelss<typename A::value_type>)
KernelAttempt try_kernel (LapackBackend, svd_least_squares_op const &, X &x, A &a, B &b, std::span< make_real_t< typename A::value_type > > residuals, LeastSquaresInfo &info, SvdLeastSquaresDiagnostics< make_real_t< typename A::value_type > > &diagnostics, SvdLeastSquaresOptions< make_real_t< typename A::value_type > > const &options, P... precision)
 Solve through GELSS; numerical failure publishes only status, preserving fixed outputs.
 
template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt try_kernel (LapackBackend, svd_left_op const &op, V &v, A &a, P... precision)
 Compute the requested SVD factors through logical host packing.
 
template<class V , packed_detail::DecompositionMatrix A, class L , class... P>
requires packed_detail::SameMatrixScalar<A, L> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt try_kernel (LapackBackend, svd_left_op const &op, V &v, L &l, A &a, P... precision)
 Compute the requested SVD factors through logical host packing.
 
template<class V , packed_detail::DecompositionMatrix A, class F , class... P>
requires packed_detail::SameMatrixScalar<A, F> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt try_kernel (LapackBackend, svd_op const &op, V &v, F &f, A &a, P... precision)
 Compute the requested SVD factors through logical host packing.
 
template<class V , packed_detail::DecompositionMatrix A, class L , class R , class... P>
requires packed_detail::SameMatrixScalar<A, L> && packed_detail::SameMatrixScalar<A, R> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt try_kernel (LapackBackend, svd_op const &op, V &v, L &l, R &r, A &a, P... precision)
 Compute the requested SVD factors through logical host packing.
 
template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt try_kernel (LapackBackend, svd_right_op const &op, V &v, A &a, P... precision)
 Compute the requested SVD factors through logical host packing.
 
template<class V , packed_detail::DecompositionMatrix A, class R , class... P>
requires packed_detail::SameMatrixScalar<A, R> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt try_kernel (LapackBackend, svd_right_op const &op, V &v, R &r, A &a, P... precision)
 Compute the requested SVD factors through logical host packing.
 
template<uni20::LapackReal Scalar, uni20::MutableRankedStridedMdspecLike< 2 > EigenvectorMdspan>
requires uni20::HostWritableMdspec<EigenvectorMdspan>
KernelAttempt try_kernel (LapackBackend, symmetric_tridiagonal_eigen_op const &operation, std::span< Scalar > diagonal, std::span< Scalar > subdiagonal, EigenvectorMdspan &eigenvectors)
 Resolve host access and run LAPACK tridiagonal eigenanalysis.
 
template<class GemmSelector , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
requires (detail::looped_gemm_contraction_backend::gemm_dispatch_types_compatible<GemmSelector, OutputMdspec, Scalar, LhsMdspec, RhsMdspec>())
KernelAttempt try_kernel (LoopedGemmContractionBackend< GemmSelector > const &backend, contract_op< LhsRank, RhsRank, ContractedRank > const &operation, OutputMdspec &output, Scalar alpha, LhsMdspec &lhs, RhsMdspec &rhs, Scalar beta)
 Execute one residual M or N loop through nested GEMM dispatch.
 
template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
auto try_make_direct_contraction_gemm_plan (OutputMdspec const &output, LhsMdspec const &lhs, RhsMdspec const &rhs, ContractionAxes< LhsRank, RhsRank, ContractedRank > const &axes) -> std::optional< DirectContractionGemmPlan >
 Try to collapse merged contraction groups to three rank-two GEMM operands.
 
template<uni20::cublas::CublasScalar Scalar, uni20::MutableRankedTensorView< 2 > OutputTensor, class LhsMdspan , class RhsMdspan >
requires uni20::RankedMdspecLike<LhsMdspan, 2> && uni20::RankedMdspecLike<RhsMdspan, 2> && requires(async::shared_storage<OutputTensor>& storage, detail::matrix_product_extents const& shape, uni20::cuda::Device device) { uni20::prepare_output(storage, shape, device); }
auto try_make_kernel_task (CublasBackend, assign_product_op const &, async::shared_storage< OutputTensor > &output_storage, Scalar const &alpha, LhsMdspan &lhs, RhsMdspan &rhs) -> KernelTaskAttempt< async::CudaTask >
 Prepare asynchronous cuBLAS assignment into deferred Tensor storage.
 
template<uni20::cublas::CublasScalar Scalar, class OutputTensor , class LhsMdspan , class RhsMdspan >
requires uni20::MutableRankedTensorView<OutputTensor, 2> && uni20::RankedMdspecLike<LhsMdspan, 2> && uni20::RankedMdspecLike<RhsMdspan, 2>
auto try_make_kernel_task (CublasBackend, assign_product_op const &, OutputTensor &output, Scalar const &alpha, LhsMdspan &lhs, RhsMdspan &rhs) -> KernelTaskAttempt< async::CudaTask >
 Prepare a replaceable output and lower normalized operands for asynchronous cuBLAS work.
 
template<uni20::cublas::CublasScalar Scalar, class OutputMdspan , class LhsMdspan , class RhsMdspan >
requires uni20::MutableRankedMdspecLike<OutputMdspan, 2> && uni20::RankedMdspecLike<LhsMdspan, 2> && uni20::RankedMdspecLike<RhsMdspan, 2>
auto try_make_kernel_task (CublasBackend, gemm_op const &, OutputMdspan &output, Scalar const &alpha, LhsMdspan &lhs, RhsMdspan &rhs, Scalar const &beta) -> KernelTaskAttempt< async::CudaTask >
 Prepare asynchronous cuBLAS work from normalized mdspecs.
 
template<uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike InputMdspan>
requires (detail::cuda_reference::SupportedCopyMdspans<OutputMdspan, InputMdspan> && detail::cuda_reference::is_raw_cuda_mdspec<OutputMdspan> && detail::cuda_reference::is_supported_cuda_mdspan<InputMdspan>)
auto try_make_kernel_task (CudaReferenceBackend, copy_op const &, OutputMdspan &output, InputMdspan &input) -> KernelTaskAttempt< async::CudaTask >
 Create a CUDA copy task from normalized mdspecs.
 
template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
auto try_make_looped_contraction_gemm_plan (OutputMdspec const &output, LhsMdspec const &lhs, RhsMdspec const &rhs, ContractionAxes< LhsRank, RhsRank, ContractedRank > const &axes) -> std::optional< LoopedContractionGemmPlan >
 Try to leave one residual M or N dimension around a GEMM projection.
 

Variables

template<class Scalar >
constexpr bool cuda_partitioned_fill_scalar = detail::cuda_reference::supports_elementwise_arithmetic<Scalar>
 Whether allocation-wide CUDA fill operations support Scalar.
 
template<class Scalar , class Factor >
constexpr bool cuda_partitioned_scale_scalars
 Whether allocation-wide CUDA scale operations support this scalar pair.
 
template<class StoragePolicy >
constexpr bool enable_backend_neutral_storage = false
 Opt-in marker for storage policies that do not constrain backend selection.
 
template<class T >
constexpr bool is_backend_list_v = is_backend_list<std::remove_cvref_t<T>>::value
 
constexpr KernelAcceptance< KernelTypeAcceptance::maybe > kernel_types_maybe {}
 Report that runtime operand values determine backend acceptance.
 
constexpr KernelAcceptance< KernelTypeAcceptance::no > kernel_types_no {}
 Report that a backend rejects the argument types.
 
constexpr KernelAcceptance< KernelTypeAcceptance::yes > kernel_types_yes {}
 Report that a backend accepts every instance of the argument types.
 

Typedef Documentation

◆ contraction_matrix_mdspan_t

template<uni20::MdspanLike Mdspan>
using uni20::linalg::contraction_matrix_mdspan_t = typedef stdex::mdspan<typename std::remove_cvref_t<Mdspan>::element_type, stdex::dextents<typename std::remove_cvref_t<Mdspan>::index_type, 2>, stdex::layout_stride, typename std::remove_cvref_t<Mdspan>::accessor_type>

Rank-two layout_stride mdspan type retaining a resolved operand accessor.

◆ contraction_matrix_mdspec_t

template<uni20::MdspecLike Mdspec>
using uni20::linalg::contraction_matrix_mdspec_t = typedef typename detail::contraction_strides::ContractionMatrixMdspec<std::remove_cvref_t<Mdspec> >::type

Rank-two strided metadata type retaining an operand descriptor or immediate handle.

◆ kernel_type_candidates_t

template<class BackendSelector , class Op , class... Args>
using uni20::linalg::kernel_type_candidates_t = typedef typename detail::KernelTypeCandidates<detail::normalized_backend_selector_t<BackendSelector>, std::remove_cvref_t<Op>, Args...>::type

Ordered backend-list type whose entries accept the operation argument types.

Backends with yes or maybe type acceptance are retained. A missing kernel_accepts_types customization is a hard no and is omitted. Runtime values and backend state are not inspected.

◆ KernelAcceptance

template<KernelTypeAcceptance Value>
using uni20::linalg::KernelAcceptance = typedef std::integral_constant<KernelTypeAcceptance, Value>

Type-level result returned by kernel_accepts_types customizations.

◆ offset_contraction_matrix_mdspec_t

template<uni20::MdspecLike Mdspec>
using uni20::linalg::offset_contraction_matrix_mdspec_t = typedef typename detail::contraction_strides::OffsetContractionMatrixMdspec<std::remove_cvref_t<Mdspec> >::type

Rank-two strided metadata type whose storage origin may be advanced.

Enumeration Type Documentation

◆ KernelAttempt

enum class uni20::linalg::KernelAttempt
strong

Result of one runtime kernel backend attempt.

Every value other than success is a clean decline. The backend preserved all inputs and fixed or update outputs, submitted no work, and produced no externally visible result. An operation that declares an output replaceable may permit provisional output construction, resizing, or replacement before a decline; a later backend may reuse or replace that prepared output. Terminal execution failures are reported through the operation's ordinary error or exception mechanism instead. Dispatch success means the operation was handled. An operation may return a recoverable numerical failure in a separate output, such as SolveInfo, while returning success here to prevent fallback.

Enumerator
success 
unsupported_instance 
unsupported_shape 
unsupported_layout 
unsupported_accessor 
unsupported_transform 
incompatible_devices 
unavailable 
insufficient_resources 

◆ KernelDispatchFailure

Classify why an ordered kernel-dispatch walk failed.

Enumerator
no_eligible_backend 
all_candidates_declined 

◆ KernelTypeAcceptance

Type-level backend eligibility for an operation and argument set.

Enumerator
no 
maybe 
yes 

◆ LeastSquaresStatus

Numerical outcome of QR or SVD least squares.

Enumerator
success 
zero_diagonal 
small_diagonal 
nonfinite_input 
nonfinite_result 
nonconvergence 

◆ MatrixNorm

enum class uni20::linalg::MatrixNorm
strong

Matrix norm selected by matrix_norm_op.

All choices use mathematical magnitude for complex entries and return zero when either matrix dimension is zero.

Enumerator
MaxAbs 

Largest entry magnitude, max_ij abs(A[i,j]).

One 

Induced one-norm: largest column sum of entry magnitudes.

Infinity 

Induced infinity-norm: largest row sum of entry magnitudes.

Frobenius 

Frobenius norm: square root of the sum of squared entry magnitudes.

◆ MatrixRegion

enum class uni20::linalg::MatrixRegion
strong

Matrix region selected by structured initialization operations.

Enumerator
All 

All entries, including rectangular portions of the matrix.

Upper 

Entries with row <= column, including the diagonal.

Lower 

Entries with row >= column, including the diagonal.

◆ MatrixTriangle

enum class uni20::linalg::MatrixTriangle
strong

Triangle of a symmetric or Hermitian matrix supplied to an operation.

Enumerator
Upper 
Lower 

◆ RefinementStatus

Refinement termination, distinct from the outcome of an individual LU solve.

Enumerator
converged 
stagnated 
iteration_limit 
factorization_failed 
correction_failed 
nonfinite_input 
nonfinite_result 

◆ SolveStatus

enum class uni20::linalg::SolveStatus
strong

Numerical outcome of a square solve, LU factorization, condition estimate or log-determinant.

Enumerator
success 

Finite output was produced, or the problem was an empty no-op.

singular 

An exactly zero elimination pivot was found.

small_pivot 

A nonzero pivot failed the requested relative threshold.

nonfinite_input 

An input coefficient or RHS component was nonfinite; both workspaces are preserved.

nonfinite_result 

A factor, solution, reduction, or required magnitude became nonfinite.

◆ SvdOverwrite

enum class uni20::linalg::SvdOverwrite
strong

Input allocation overwritten by a singular-vector factor.

Enumerator
None 
Left 
Right 

◆ SvdVectorExtent

enum class uni20::linalg::SvdVectorExtent
strong

Extent policy for one side of an exact singular value decomposition.

Enumerator
Reduced 
Full 

Function Documentation

◆ add_product() [1/8]

template<uni20::AsyncTensorOutput Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void uni20::linalg::add_product ( async::Async< Output > &  output,
async::Async< A > const &  a,
async::Async< B > const &  b,
std::optional< Precision >  p = {} 
)

Schedule a unit-coefficient accumulation using storage-selected backends.

◆ add_product() [2/8]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha = uni20::tensor_element_t<OutputTensor>>
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::add_product ( async::Async< OutputTensor > &  output,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs,
Alpha &&  alpha,
std::optional< Precision >  p = {} 
)

Schedule output += alpha * lhs * rhs using the static Tensor selector.

The immutable selector is resolved from Tensor/storage types before scheduling. alpha may be immediate or asynchronous. Unhandled task failures propagate to the output epoch.

Precondition
The output must not share an epoch queue with either input.

◆ add_product() [3/8]

template<class BackendSelector , uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha = uni20::tensor_element_t<OutputTensor>>
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::add_product ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs,
Alpha &&  alpha,
std::optional< Precision >  p = {} 
)

Schedule output += alpha * lhs * rhs with an explicit backend selector.

Every Tensor operand is asynchronous. The existing output value and shape are required because they participate in the update. alpha may be an immediate value or an async reader yielding a compatible scalar.

Precondition
The output must not share an epoch queue with either input.

◆ add_product() [4/8]

template<MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B, class Alpha >
requires detail::CompatibleMatrixProductTensors<Output, A, B> && OperationScalar<Alpha, tensor_element_t<Output>>
void uni20::linalg::add_product ( Output &&  output,
A const &  a,
B const &  b,
Alpha const &  alpha,
std::optional< Precision >  p = {} 
)

Apply add_product using the storage-selected backend.

◆ add_product() [5/8]

template<MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void uni20::linalg::add_product ( Output &&  output,
A const &  a,
B const &  b,
std::optional< Precision >  p = {} 
)

Apply unit-coefficient add_product using storage-selected backends.

◆ add_product() [6/8]

template<KernelBackendSelector Selector, MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B, class Alpha >
requires detail::CompatibleMatrixProductTensors<Output, A, B> && OperationScalar<Alpha, tensor_element_t<Output>>
void uni20::linalg::add_product ( Selector &&  selector,
Output &&  output,
A const &  a,
B const &  b,
Alpha const &  alpha,
std::optional< Precision >  requested = {} 
)

Accumulate alpha * a * b into an existing fixed-shape output.

An omitted precision infers participating tensor defaults. An explicit precision must match fixed result types; runtime values convert in the kernel.

Precondition
Output storage does not overlap either input.

◆ add_product() [7/8]

template<KernelBackendSelector Selector, MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void uni20::linalg::add_product ( Selector &&  selector,
Output &&  output,
A const &  a,
B const &  b,
std::optional< Precision >  p = {} 
)

Apply add_product with an exact unit coefficient and optional precision.

◆ add_product() [8/8]

template<KernelBackendSelector Selector, uni20::AsyncTensorOutput Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void uni20::linalg::add_product ( Selector  selector,
async::Async< Output > &  output,
async::Async< A > const &  a,
async::Async< B > const &  b,
std::optional< Precision >  p = {} 
)

Schedule a unit-coefficient accumulation at inferred or explicit precision.

◆ add_scaled()

template<class Factor >
uni20::linalg::add_scaled ( Factor  ) -> add_scaled< std::decay_t< Factor > >

Deduce an add-scaled operation that owns a decayed factor value.

◆ all_reduction_axes()

template<std::size_t InputRank>
constexpr auto uni20::linalg::all_reduction_axes ( ) -> ReductionAxes<InputRank, InputRank>
constexpr

Construct the full-reduction descriptor for a fixed input rank.

◆ assign_product() [1/8]

template<uni20::AsyncTensorOutput Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void uni20::linalg::assign_product ( async::Async< Output > &  output,
async::Async< A > const &  a,
async::Async< B > const &  b,
std::optional< Precision >  p = {} 
)

Schedule a unit-coefficient product using storage-selected backends.

◆ assign_product() [2/8]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha = uni20::tensor_element_t<OutputTensor>>
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::assign_product ( async::Async< OutputTensor > &  output,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs,
Alpha &&  alpha,
std::optional< Precision >  p = {} 
)

Schedule output = alpha * lhs * rhs using the static Tensor selector.

The immutable selector is resolved from Tensor/storage types before scheduling. alpha may be immediate or asynchronous. Unhandled task failures propagate to the output epoch.

Precondition
The output must not share an epoch queue with either input.

◆ assign_product() [3/8]

template<class BackendSelector , uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha = uni20::tensor_element_t<OutputTensor>>
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::assign_product ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs,
Alpha &&  alpha,
std::optional< Precision >  p = {} 
)

Schedule output = alpha * lhs * rhs with an explicit backend selector.

Every Tensor operand is asynchronous. alpha may be an immediate value or an async reader yielding a compatible scalar; async::read normalizes both forms into an awaiter retained by the coroutine. An unconstructed output is initialized when its Tensor type can be constructed from its extents. Mutable aliases keep their binding and must already have the product shape and a layout supported by the selected backend.

Precondition
The output must not share an epoch queue with either input.

◆ assign_product() [4/8]

template<MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B, class Alpha >
requires detail::CompatibleMatrixProductTensors<Output, A, B> && OperationScalar<Alpha, tensor_element_t<Output>>
void uni20::linalg::assign_product ( Output &&  output,
A const &  a,
B const &  b,
Alpha const &  alpha,
std::optional< Precision >  p = {} 
)

Apply assign_product using the storage-selected backend.

◆ assign_product() [5/8]

template<MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void uni20::linalg::assign_product ( Output &&  output,
A const &  a,
B const &  b,
std::optional< Precision >  p = {} 
)

Apply unit-coefficient assign_product using storage-selected backends.

◆ assign_product() [6/8]

template<KernelBackendSelector Selector, MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B, class Alpha >
requires detail::CompatibleMatrixProductTensors<Output, A, B> && OperationScalar<Alpha, tensor_element_t<Output>>
void uni20::linalg::assign_product ( Selector &&  selector,
Output &&  output,
A const &  a,
B const &  b,
Alpha const &  alpha,
std::optional< Precision >  requested = {} 
)

Overwrite a resizable or already-compatible output with alpha * a * b.

An omitted precision infers participating tensor defaults. An explicit precision must match fixed result types; runtime values convert in the kernel.

Precondition
Output storage does not overlap either input.

◆ assign_product() [7/8]

template<KernelBackendSelector Selector, MutableRankedTensorView< 2 > Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void uni20::linalg::assign_product ( Selector &&  selector,
Output &&  output,
A const &  a,
B const &  b,
std::optional< Precision >  p = {} 
)

Apply assign_product with an exact unit coefficient and optional precision.

◆ assign_product() [8/8]

template<KernelBackendSelector Selector, uni20::AsyncTensorOutput Output, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires detail::CompatibleMatrixProductTensors<Output, A, B>
void uni20::linalg::assign_product ( Selector  selector,
async::Async< Output > &  output,
async::Async< A > const &  a,
async::Async< B > const &  b,
std::optional< Precision >  p = {} 
)

Schedule a unit-coefficient product at inferred or explicit precision.

◆ backend_list()

template<class... Backends>
uni20::linalg::backend_list ( Backends...  ) -> backend_list< std::remove_cvref_t< Backends >... >

◆ co_dispatch_kernel()

template<class BackendSelector , class Op , class... Args>
requires detail::KernelDispatchTypesAccepted<detail::normalized_backend_selector_t<BackendSelector>, Op, Args&...>
async::AsyncTask uni20::linalg::co_dispatch_kernel ( BackendSelector  selector,
Op  op,
Args &...  args 
)

Dispatch a kernel from a coroutine without requiring coroutine wrappers for blocking backends.

Each backend may optionally provide try_make_kernel_task, returning a KernelTaskAttempt whose concrete task is awaited before dispatch completes. A backend without that customization is invoked through its ordinary try_kernel implementation on the current scheduler thread. Runtime declines submit no work and permit fallback; an operation-declared replaceable output may remain provisionally prepared for the next backend.

Note
Operation arguments are stable lvalues owned by the calling coroutine. This avoids copying arbitrary operands and matches the ordinary dispatch probe and invocation contract.

◆ constant()

template<class Value >
uni20::linalg::constant ( Value  ) -> constant< std::decay_t< Value > >

◆ contract() [1/8]

template<uni20::AsyncTensorOutput OutputTensor, uni20::TensorView LhsTensor, uni20::TensorView RhsTensor, class Alpha , class Beta , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && uni20::MutableRankedTensorView<OutputTensor, ContractionAxes<LhsRank, RhsRank, ContractedRank>::output_rank> && uni20::RankedTensorView<LhsTensor, LhsRank> && uni20::RankedTensorView<RhsTensor, RhsRank> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::contract ( async::Async< OutputTensor > &  output,
Alpha &&  alpha,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs,
ContractionAxes< LhsRank, RhsRank, ContractedRank >  axes,
Beta &&  beta 
)

Schedule a fixed-output pairwise contraction using static Tensor policy.

◆ contract() [2/8]

template<uni20::AsyncTensorOutput OutputTensor, uni20::TensorView LhsTensor, uni20::TensorView RhsTensor, class Alpha , class Beta , std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && (ContractedRank <= uni20::tensor_mdspec_t<LhsTensor>::rank()) && (ContractedRank <= uni20::tensor_mdspec_t<RhsTensor>::rank()) && (uni20::tensor_mdspec_t<OutputTensor>::rank() == uni20::tensor_mdspec_t<LhsTensor>::rank() + uni20::tensor_mdspec_t<RhsTensor>::rank() - 2 * ContractedRank) && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::contract ( async::Async< OutputTensor > &  output,
Alpha &&  alpha,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs,
std::array< std::pair< std::size_t, std::size_t >, ContractedRank >  requested_axes,
Beta &&  beta 
)

Schedule a fixed-output pairwise contraction from raw axis pairs using static Tensor policy.

◆ contract() [3/8]

template<class BackendSelector , class OutputTensor , class LhsTensor , class RhsTensor , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && uni20::MutableRankedTensorView<OutputTensor, ContractionAxes<LhsRank, RhsRank, ContractedRank>::output_rank> && uni20::RankedTensorView<LhsTensor, LhsRank> && uni20::RankedTensorView<RhsTensor, RhsRank>
void uni20::linalg::contract ( BackendSelector &&  selector,
OutputTensor &&  output,
uni20::tensor_element_t< OutputTensor >  alpha,
LhsTensor const &  lhs,
RhsTensor const &  rhs,
ContractionAxes< LhsRank, RhsRank, ContractedRank >  axes,
uni20::tensor_element_t< OutputTensor >  beta 
)

Contract two tensors into an existing fixed-storage output.

Computes output = alpha * contract(lhs, rhs) + beta * output. Surviving left axes precede surviving right axes in their original order. Backend selection occurs before operands are normalized to mdspec values.

Precondition
Output storage does not overlap either input, beyond the cheap same-object aliases rejected by this front end.

◆ contract() [4/8]

template<class BackendSelector , class OutputTensor , class LhsTensor , class RhsTensor , std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && (ContractedRank <= uni20::tensor_mdspec_t<LhsTensor>::rank()) && (ContractedRank <= uni20::tensor_mdspec_t<RhsTensor>::rank()) && (uni20::tensor_mdspec_t<OutputTensor>::rank() == uni20::tensor_mdspec_t<LhsTensor>::rank() + uni20::tensor_mdspec_t<RhsTensor>::rank() - 2 * ContractedRank)
void uni20::linalg::contract ( BackendSelector &&  selector,
OutputTensor &&  output,
uni20::tensor_element_t< OutputTensor >  alpha,
LhsTensor const &  lhs,
RhsTensor const &  rhs,
std::array< std::pair< std::size_t, std::size_t >, ContractedRank >  requested_axes,
uni20::tensor_element_t< OutputTensor >  beta 
)

Contract two tensors using an explicit selector and raw axis pairs.

◆ contract() [5/8]

template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput OutputTensor, uni20::TensorView LhsTensor, uni20::TensorView RhsTensor, class Alpha , class Beta , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && uni20::MutableRankedTensorView<OutputTensor, ContractionAxes<LhsRank, RhsRank, ContractedRank>::output_rank> && uni20::RankedTensorView<LhsTensor, LhsRank> && uni20::RankedTensorView<RhsTensor, RhsRank> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::contract ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
Alpha &&  alpha,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs,
ContractionAxes< LhsRank, RhsRank, ContractedRank >  axes,
Beta &&  beta 
)

Schedule a fixed-output pairwise contraction through an explicit selector.

Tensor operands are asynchronous; alpha and beta may be immediate or Async scalars.

Precondition
The output is constructed, has a distinct epoch queue from both inputs, and has compatible shape.

◆ contract() [6/8]

template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput OutputTensor, uni20::TensorView LhsTensor, uni20::TensorView RhsTensor, class Alpha , class Beta , std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && (ContractedRank <= uni20::tensor_mdspec_t<LhsTensor>::rank()) && (ContractedRank <= uni20::tensor_mdspec_t<RhsTensor>::rank()) && (uni20::tensor_mdspec_t<OutputTensor>::rank() == uni20::tensor_mdspec_t<LhsTensor>::rank() + uni20::tensor_mdspec_t<RhsTensor>::rank() - 2 * ContractedRank) && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::contract ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
Alpha &&  alpha,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs,
std::array< std::pair< std::size_t, std::size_t >, ContractedRank >  requested_axes,
Beta &&  beta 
)

Schedule a fixed-output pairwise contraction from raw axis pairs through an explicit selector.

◆ contract() [7/8]

template<class OutputTensor , class LhsTensor , class RhsTensor , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && uni20::MutableRankedTensorView<OutputTensor, ContractionAxes<LhsRank, RhsRank, ContractedRank>::output_rank> && uni20::RankedTensorView<LhsTensor, LhsRank> && uni20::RankedTensorView<RhsTensor, RhsRank>
void uni20::linalg::contract ( OutputTensor &&  output,
uni20::tensor_element_t< OutputTensor >  alpha,
LhsTensor const &  lhs,
RhsTensor const &  rhs,
ContractionAxes< LhsRank, RhsRank, ContractedRank >  axes,
uni20::tensor_element_t< OutputTensor >  beta 
)

Contract two tensors using their default backend selector.

◆ contract() [8/8]

template<class OutputTensor , class LhsTensor , class RhsTensor , std::size_t ContractedRank>
requires detail::CompatibleContractionTensors<OutputTensor, LhsTensor, RhsTensor> && (ContractedRank <= uni20::tensor_mdspec_t<LhsTensor>::rank()) && (ContractedRank <= uni20::tensor_mdspec_t<RhsTensor>::rank()) && (uni20::tensor_mdspec_t<OutputTensor>::rank() == uni20::tensor_mdspec_t<LhsTensor>::rank() + uni20::tensor_mdspec_t<RhsTensor>::rank() - 2 * ContractedRank)
void uni20::linalg::contract ( OutputTensor &&  output,
uni20::tensor_element_t< OutputTensor >  alpha,
LhsTensor const &  lhs,
RhsTensor const &  rhs,
std::array< std::pair< std::size_t, std::size_t >, ContractedRank >  requested_axes,
uni20::tensor_element_t< OutputTensor >  beta 
)

Contract two tensors using storage policy and raw axis pairs.

◆ contraction_axes_are_valid()

template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
constexpr bool uni20::linalg::contraction_axes_are_valid ( ContractionAxes< LhsRank, RhsRank, ContractedRank > const &  axes)
constexprnoexcept

Return whether contraction axes form canonical partitions of both inputs.

◆ contraction_output_extents()

template<class Lhs , class Rhs , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
auto uni20::linalg::contraction_output_extents ( Lhs const &  lhs,
Rhs const &  rhs,
ContractionAxes< LhsRank, RhsRank, ContractedRank > const &  axes 
) -> stdex::dextents<uni20::index_type, ContractionAxes<LhsRank, RhsRank, ContractedRank>::output_rank>

Validate paired extents and return the canonical contraction output shape.

◆ cuda_partitioned_assign_scale()

template<class Scalar , class Factor >
requires cuda_partitioned_scale_scalars<Scalar, Factor>
void uni20::linalg::cuda_partitioned_assign_scale ( cuda::PartitionedCudaBuffer< Scalar > &  output,
Factor  factor,
cuda::PartitionedCudaBuffer< Scalar > const &  input 
)

Overwrite one partitioned CUDA allocation with a scaled peer allocation.

◆ cuda_partitioned_axpy()

template<class Scalar , class Factor >
requires cuda_partitioned_scale_scalars<Scalar, Factor>
void uni20::linalg::cuda_partitioned_axpy ( cuda::PartitionedCudaBuffer< Scalar > &  output,
Factor  factor,
cuda::PartitionedCudaBuffer< Scalar > const &  input 
)

Add a scaled partitioned CUDA allocation to another in place.

◆ cuda_partitioned_scale()

template<class Scalar , class Factor >
requires cuda_partitioned_scale_scalars<Scalar, Factor>
void uni20::linalg::cuda_partitioned_scale ( cuda::PartitionedCudaBuffer< Scalar > &  output,
Factor  factor 
)

Scale a complete partitioned CUDA allocation in place.

◆ cuda_partitioned_set_zero()

template<class Scalar >
requires cuda_partitioned_fill_scalar<Scalar>
void uni20::linalg::cuda_partitioned_set_zero ( cuda::PartitionedCudaBuffer< Scalar > &  output)

Set a complete partitioned CUDA allocation to numerical zero.

◆ diagnostic_report() [1/2]

presentation::report_builder uni20::linalg::diagnostic_report ( dispatch_diagnostics::event const &  diagnostic)
inline

Build a presentation report for one opt-in kernel-dispatch diagnostic event.

◆ diagnostic_report() [2/2]

presentation::report_builder uni20::linalg::diagnostic_report ( KernelDispatchError const &  error)
inline

Build a presentation report for a structured kernel-dispatch error.

◆ DirectGemmContractionBackend()

template<class GemmSelector >
uni20::linalg::DirectGemmContractionBackend ( GemmSelector  ) -> DirectGemmContractionBackend< std::remove_cvref_t< GemmSelector > >

◆ dispatch_kernel()

template<class BackendSelector , class Op , class... Args>
requires detail::KernelDispatchTypesAccepted<detail::normalized_backend_selector_t<BackendSelector>, Op, Args...>
void uni20::linalg::dispatch_kernel ( BackendSelector &&  selector,
Op  op,
Args &&...  args 
)

Normalize a selector and dispatch or report that every eligible backend declined.

Each runtime decline has the same input-preservation and replaceable-output preparation contract as try_dispatch_kernel. Tensor operands remain tensor views until a selected backend lowers them.

◆ dynamic_dispatch_kernel()

template<class BackendSelector , class Op , class... Args>
void uni20::linalg::dynamic_dispatch_kernel ( BackendSelector &&  selector,
Op  op,
Args &&...  args 
)

Dynamically dispatch an operation, raising even type-level rejection at runtime.

This boundary is intended for Python bindings and runtime-erased interfaces that must remain callable when the configured backend list has no implementation for the concrete argument types.

◆ eigh() [1/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::eigh ( async::Async< Matrix > &&  matrix,
Precision  p,
MatrixTriangle  triangle = MatrixTriangle::Upper 
)

Compute a self-adjoint eigensystem at explicit working precision with optional output settings.

◆ eigh() [2/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::eigh ( async::Async< Matrix > const &  matrix,
Precision  p,
MatrixTriangle  triangle = MatrixTriangle::Upper 
)

Compute a self-adjoint eigensystem at explicit working precision with optional output settings.

◆ eigh() [3/14]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::eigh ( async::Async< MatrixTensor > &&  matrix,
MatrixTriangle  triangle = MatrixTriangle::Upper,
std::optional< Precision >  requested = {} 
)

Schedule a consuming self-adjoint eigensystem using the static Tensor selector.

Passing the async matrix as an rvalue grants permission to remove its stored owning value. On success, that input timeline no longer contains a readable matrix.

◆ eigh() [4/14]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::eigh ( async::Async< MatrixTensor > const &  matrix,
MatrixTriangle  triangle = MatrixTriangle::Upper,
std::optional< Precision >  requested = {} 
)

Schedule a preserving self-adjoint eigensystem using the static Tensor selector.

Structured binding yields two independent Async<Tensor> values: auto [eigenvalues, eigenvectors] = eigh(matrix);.

◆ eigh() [5/14]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::eigh ( BackendSelector &&  selector,
MatrixTensor &&  matrix,
MatrixTriangle  triangle = MatrixTriangle::Upper,
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return its complete self-adjoint eigensystem through an explicit selector.

This overload has the same storage-transfer semantics as the default consuming overload; the supplied selector controls the eigensolver dispatch.

◆ eigh() [6/14]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::eigh ( BackendSelector &&  selector,
MatrixTensor const &  matrix,
MatrixTriangle  triangle = MatrixTriangle::Upper,
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return its complete self-adjoint eigensystem through an explicit selector.

Materialization uses the tensors' copy selector; the supplied selector controls the destructive eigensolver dispatch.

◆ eigh() [7/14]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::eigh ( BackendSelector  selector,
async::Async< MatrixTensor > &&  matrix,
MatrixTriangle  triangle = MatrixTriangle::Upper,
std::optional< Precision >  requested = {} 
)

Schedule a consuming self-adjoint eigensystem through an explicit selector.

The stored owning matrix is taken from its epoch and may transfer its allocation to the eigenvector output. The input writer and both output writers receive any failure that occurs after enrollment.

◆ eigh() [8/14]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::eigh ( BackendSelector  selector,
async::Async< MatrixTensor > const &  matrix,
MatrixTriangle  triangle = MatrixTriangle::Upper,
std::optional< Precision >  requested = {} 
)

Schedule a preserving self-adjoint eigensystem through an explicit selector.

The returned eigenvalue and eigenvector handles have independent output epochs and may be passed directly to subsequent async operations. Both receive any unhandled task failure.

◆ eigh() [9/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::eigh ( Matrix &&  matrix,
Precision  p,
MatrixTriangle  triangle = MatrixTriangle::Upper 
)

Compute a self-adjoint eigensystem at explicit working precision with optional output settings.

◆ eigh() [10/14]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::eigh ( MatrixTensor &&  matrix,
MatrixTriangle  triangle = MatrixTriangle::Upper,
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return its complete self-adjoint eigensystem.

A host tensor with a directly addressable BLAS matrix mapping transfers its allocation to the eigenvector result. Row-major storage is reinterpreted as its column-major transpose, with the selected triangle adjusted before LAPACK and complex eigenvectors conjugated afterward. The result preserves a compatible leading dimension and any storage tail. Other owning tensor types are materialized into a compatible work matrix. Passing an rvalue grants permission to consume storage but does not guarantee reuse.

Warning
Any non-owning views into storage transferred by this operation are invalidated under the ordinary C++ moved-from owner rules.

◆ eigh() [11/14]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::eigh ( MatrixTensor const &  matrix,
MatrixTriangle  triangle = MatrixTriangle::Upper,
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return its complete self-adjoint eigensystem.

This explicit value operation materializes a column-major work matrix through copy_op, then calls the destructive in-place eigensolver with eigenvectors enabled.

◆ eigh() [12/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::eigh ( Selector &&  selector,
async::Async< Matrix > &&  matrix,
Precision  p,
MatrixTriangle  triangle = MatrixTriangle::Upper 
)

Compute a self-adjoint eigensystem at explicit working precision with optional output settings.

◆ eigh() [13/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::eigh ( Selector &&  selector,
async::Async< Matrix > const &  matrix,
Precision  p,
MatrixTriangle  triangle = MatrixTriangle::Upper 
)

Compute a self-adjoint eigensystem at explicit working precision with optional output settings.

◆ eigh() [14/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::eigh ( Selector &&  selector,
Matrix &&  matrix,
Precision  p,
MatrixTriangle  triangle = MatrixTriangle::Upper 
)

Compute a self-adjoint eigensystem at explicit working precision with optional output settings.

◆ gemm() [1/4]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha , class Beta >
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::gemm ( async::Async< OutputTensor > &  output,
Alpha &&  alpha,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs,
Beta &&  beta,
std::optional< Precision >  p = {} 
)

Schedule fixed-output GEMM using the static Tensor selector.

◆ gemm() [2/4]

template<class BackendSelector , uni20::MutableRankedTensorView< 2 > OutputTensor, class Alpha , class Beta , uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires (OperationScalar<Alpha, tensor_element_t<OutputTensor>> && OperationScalar<Beta, tensor_element_t<OutputTensor>>)
void uni20::linalg::gemm ( BackendSelector &&  selector,
OutputTensor &&  output,
Alpha  alpha,
LhsTensor const &  lhs,
RhsTensor const &  rhs,
Beta  beta,
std::optional< Precision >  requested = {} 
)

Update a fixed-size matrix as output = alpha * lhs * rhs + beta * output.

For lhs of shape m x k and rhs of shape k x n, output must already have shape m x n; it is never resized. Operands use the same scalar type. An explicit precision must match fixed result types; otherwise input defaults infer precision (including the output when beta is nonzero). Coefficients are converted to the output scalar type. Runtime-precision coefficients also accept integers or exact literals. Multiplication observes the supplied views: transpose or conjugate a view explicitly when required. With beta == 0, old output elements are not read. With alpha == 0 or k == 0, only the beta scaling remains. An empty output has no elements to update; compatible dimensions are still required.

Precondition
Output storage must not overlap either input. Input views may overlap each other.
Note
Use assign_product for an overwrite operation that may resize its output.

◆ gemm() [3/4]

template<class BackendSelector , uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor, class Alpha , class Beta >
requires uni20::AsyncTensorOutput<OutputTensor> && detail::CompatibleMatrixProductTensors<OutputTensor, LhsTensor, RhsTensor> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::gemm ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
Alpha &&  alpha,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs,
Beta &&  beta,
std::optional< Precision >  p = {} 
)

Schedule fixed-output GEMM with an explicit backend selector.

Computes output = alpha * lhs * rhs + beta * output. Every Tensor operand is asynchronous. alpha and beta may be immediate values or async readers yielding compatible scalars. Mutable aliases write through their bound view; layout and accessor support is determined by the selected backend.

Precondition
The output is constructed with the matrix-product shape and does not share an epoch queue with either input.

◆ gemm() [4/4]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, class Alpha , class Beta , uni20::RankedTensorView< 2 > LhsTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires (OperationScalar<Alpha, tensor_element_t<OutputTensor>> && OperationScalar<Beta, tensor_element_t<OutputTensor>>)
void uni20::linalg::gemm ( OutputTensor &&  output,
Alpha  alpha,
LhsTensor const &  lhs,
RhsTensor const &  rhs,
Beta  beta,
std::optional< Precision >  p = {} 
)

Apply the fixed-storage gemm contract using the operands' default backend selector.

◆ gemv() [1/4]

template<uni20::AsyncTensorOutput OutputTensor, class Alpha , uni20::RankedTensorView< 2 > MatrixTensor, uni20::RankedTensorView< 1 > InputTensor, class Beta >
requires uni20::MutableRankedTensorView<OutputTensor, 1> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::gemv ( async::Async< OutputTensor > &  output,
Alpha &&  alpha,
async::Async< MatrixTensor > const &  matrix,
async::Async< InputTensor > const &  input,
Beta &&  beta 
)

Schedule fixed-output GEMV using static Tensor policy.

◆ gemv() [2/4]

template<class BackendSelector , uni20::MutableRankedTensorView< 1 > OutputTensor, class Scalar , uni20::RankedTensorView< 2 > MatrixTensor, uni20::RankedTensorView< 1 > InputTensor>
void uni20::linalg::gemv ( BackendSelector &&  selector,
OutputTensor &&  output,
Scalar  alpha,
MatrixTensor const &  matrix,
InputTensor const &  input,
Scalar  beta 
)

Update a fixed-size vector as output = alpha * matrix * input + beta * output.

For a matrix of shape m x n, input has length n and output must already have length m; it is never resized. Operands and coefficients use the same scalar type. Transpose or conjugate the matrix view explicitly when required. With beta == 0, old output elements are not read; with alpha == 0, matrix and input elements are not read. For finite coefficients, a zero inner dimension leaves only beta scaling. An output of length zero has no elements to update; compatible dimensions are still required.

Precondition
Output storage must not overlap the matrix or input vector.

◆ gemv() [3/4]

template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput OutputTensor, class Alpha , uni20::RankedTensorView< 2 > MatrixTensor, uni20::RankedTensorView< 1 > InputTensor, class Beta >
requires uni20::MutableRankedTensorView<OutputTensor, 1> && AsyncOperationScalar<Alpha, uni20::tensor_element_t<OutputTensor>> && AsyncOperationScalar<Beta, uni20::tensor_element_t<OutputTensor>>
void uni20::linalg::gemv ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
Alpha &&  alpha,
async::Async< MatrixTensor > const &  matrix,
async::Async< InputTensor > const &  input,
Beta &&  beta 
)

Schedule fixed-output GEMV through an explicit backend selector.

Tensor operands are asynchronous; alpha and beta may be immediate or Async scalars.

Precondition
The output is constructed, has a distinct epoch queue from both inputs, and has compatible shape.

◆ gemv() [4/4]

template<uni20::MutableRankedTensorView< 1 > OutputTensor, class Scalar , uni20::RankedTensorView< 2 > MatrixTensor, uni20::RankedTensorView< 1 > InputTensor>
void uni20::linalg::gemv ( OutputTensor &&  output,
Scalar  alpha,
MatrixTensor const &  matrix,
InputTensor const &  input,
Scalar  beta 
)

Apply the fixed-storage gemv contract using the operands' default backend selector.

◆ hessenberg_schur() [1/2]

template<class BackendSelector , uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void uni20::linalg::hessenberg_schur ( BackendSelector &&  selector,
MatrixTensor &&  matrix_work,
std::span< EigenScalar >  eigenvalues,
SchurVectorTensor &&  schur_vectors,
bool  compute_vectors 
)

Replace a real upper-Hessenberg matrix by its real Schur form.

Shapes, output types, block ordering, and failure behavior follow schur. With compute_vectors == true, schur_vectors is initialized by the backend and returns Q for the supplied Hessenberg matrix H, satisfying H = Q * T * transpose(Q). It does not accumulate a preceding dense-to- Hessenberg reduction's vectors. With false, vector elements are unchanged.

Precondition
Input is real, square, and already upper Hessenberg. Entries below its first subdiagonal must be zero; this routine does not perform a Hessenberg reduction. Work and output storage must not overlap. Outputs are not resized.

◆ hessenberg_schur() [2/2]

template<uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void uni20::linalg::hessenberg_schur ( MatrixTensor &&  matrix_work,
std::span< EigenScalar >  eigenvalues,
SchurVectorTensor &&  schur_vectors,
bool  compute_vectors 
)

Apply the destructive hessenberg_schur contract using tensor storage policy.

◆ kernel_accepts_types() [1/74]

template<uni20::MutableRankedMdspecLike< 1 > OutputMdspan, class Scalar , uni20::RankedMdspecLike< 2 > MatrixMdspan, uni20::RankedMdspecLike< 1 > InputMdspan>
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<MatrixMdspan> && uni20::HostReadableMdspec<InputMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( BlasBackend const &  ,
gemv_op const &  ,
OutputMdspan &  ,
Scalar const &  ,
MatrixMdspan &  ,
InputMdspan &  ,
Scalar const &   
)

Report eligibility for host-accessible mdspec BLAS GEMV.

◆ kernel_accepts_types() [2/74]

template<MutableRankedTensorView< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<mutable_tensor_mdspec_t<C>> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<tensor_element_t<C>, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
consteval auto uni20::linalg::kernel_accepts_types ( BlasBackend  ,
assign_product_op const &  ,
async::shared_storage< C > &  ,
S const &  ,
A &  ,
B &   
)

Accept deferred host binary80 matrix-product outputs.

◆ kernel_accepts_types() [3/74]

template<MutableRankedTensorView< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<mutable_tensor_mdspec_t<C>> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<tensor_element_t<C>, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
consteval auto uni20::linalg::kernel_accepts_types ( BlasBackend  ,
assign_product_op const &  ,
C &  ,
S const &  ,
A &  ,
B &   
)

Accept replaceable binary80 host outputs for matrix-product assignment.

◆ kernel_accepts_types() [4/74]

template<MutableRankedMdspecLike< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<C> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<typename C::value_type, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
consteval auto uni20::linalg::kernel_accepts_types ( BlasBackend  ,
gemm_op const &  ,
C &  ,
S const &  ,
A &  ,
B &  ,
S const &   
)

Accept host-readable native binary80 operands, including transforming accessors.

◆ kernel_accepts_types() [5/74]

template<MutableRankedMdspecLike< 2 > C, mpfr_detail::RuntimeScalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<C> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<typename C::value_type, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
consteval auto uni20::linalg::kernel_accepts_types ( BlasBackend  ,
gemm_op const &  ,
C &  ,
S const &  ,
A &  ,
B &  ,
S const &  ,
Precision   
)

Accept host-readable runtime-precision operands, including transforming accessors.

◆ kernel_accepts_types() [6/74]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostAssignProductAccess<OutputTensor, LhsMdspan, RhsMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
assign_product_op const &  ,
async::shared_storage< OutputTensor > &  ,
Scalar const &  ,
LhsMdspan &  ,
RhsMdspan &   
)

Report eligibility for a deferred host Tensor matrix-product output.

◆ kernel_accepts_types() [7/74]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostAssignProductAccess<OutputTensor, LhsMdspan, RhsMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
assign_product_op const &  ,
OutputTensor &  ,
Scalar const &  ,
LhsMdspan &  ,
RhsMdspan &   
)

Report eligibility for replaceable-output host tensor matrix products.

◆ kernel_accepts_types() [8/74]

template<uni20::MutableMdspecLike Mdspan>
requires uni20::HostWritableMdspec<Mdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
conjugate_inplace_op const &  ,
Mdspan &   
)

Report eligibility for host-accessible mdspec in-place conjugation.

◆ kernel_accepts_types() [9/74]

template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, uni20::MutableRankedMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, uni20::RankedMdspecLike< LhsRank > LhsMdspec, uni20::RankedMdspecLike< RhsRank > RhsMdspec>
requires detail::cpu_contract_backend::HostContractionAccess<OutputMdspec, LhsMdspec, RhsMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
contract_op< LhsRank, RhsRank, ContractedRank > const &  ,
OutputMdspec &  ,
Scalar const &  ,
LhsMdspec &  ,
RhsMdspec &  ,
Scalar const &   
)

Report eligibility for host-accessible pairwise contraction operands.

◆ kernel_accepts_types() [10/74]

template<uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike InputMdspan>
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<InputMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
copy_op const &  ,
OutputMdspan &  ,
InputMdspan &   
)

Report eligibility for a host-accessible mdspec element copy.

◆ kernel_accepts_types() [11/74]

template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostGemmMdspanAccess<OutputMdspan, LhsMdspan, RhsMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
gemm_op const &  ,
OutputMdspan &  ,
Scalar const &  ,
LhsMdspan &  ,
RhsMdspan &  ,
Scalar const &   
)

Report eligibility for host-accessible mdspec CPU GEMM.

◆ kernel_accepts_types() [12/74]

template<uni20::MutableRankedMdspecLike< 1 > OutputMdspan, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > MatrixMdspan, uni20::RankedMdspecLike< 1 > InputMdspan>
requires detail::HostGemvMdspanAccess<OutputMdspan, MatrixMdspan, InputMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
gemv_op const &  ,
OutputMdspan &  ,
Scalar const &  ,
MatrixMdspan &  ,
InputMdspan &  ,
Scalar const &   
)

Report eligibility for host-accessible mdspec CPU GEMV.

◆ kernel_accepts_types() [13/74]

template<class Output , uni20::MdspecLike LhsMdspan, uni20::MdspecLike RhsMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<LhsMdspan> && uni20::HostReadableMdspec<RhsMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
inner_product_op const &  ,
Output &  ,
LhsMdspan &  ,
RhsMdspan &   
)

Report eligibility for a host-accessible mdspec inner product.

◆ kernel_accepts_types() [14/74]

template<uni20::MutableRankedMdspecLike< 2 > CoefficientMdspec, uni20::MutableRankedMdspecLike< 2 > RhsMdspec>
requires uni20::HostWritableMdspec<CoefficientMdspec> && uni20::HostWritableMdspec<RhsMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
linear_solve_op const &  ,
CoefficientMdspec &  ,
RhsMdspec &  ,
SolveInfo &  ,
SolveOptions< uni20::make_real_t< typename CoefficientMdspec::value_type > > const &   
)

Report eligibility for a host-accessible dense general solve.

◆ kernel_accepts_types() [15/74]

template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, uni20::RankedMdspecLike< 2 > InputMdspan, class TimeScalar >
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<InputMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
matrix_exponential_op const &  ,
OutputMdspan &  ,
InputMdspan &  ,
TimeScalar const &   
)

Report eligibility for host-accessible mdspec matrix exponentiation.

◆ kernel_accepts_types() [16/74]

template<class Output , uni20::RankedMdspecLike< 2 > MatrixMdspec>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<MatrixMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
matrix_norm_op const &  ,
Output &  ,
MatrixMdspec &   
)

Report eligibility for a host-accessible matrix norm.

◆ kernel_accepts_types() [17/74]

template<uni20::MutableRankedMdspecLike< 2 > MatrixMdspan, uni20::Scalar Scalar>
requires uni20::HostWritableMdspec<MatrixMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
matrix_set_op const &  ,
MatrixMdspan &  ,
Scalar const &  ,
Scalar const &   
)

Report eligibility for host-accessible mdspec matrix initialization.

◆ kernel_accepts_types() [18/74]

template<class Output , uni20::MdspecLike InputMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<InputMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
norm_op const &  ,
Output &  ,
InputMdspan &   
)

Report eligibility for a host-accessible mdspec norm.

◆ kernel_accepts_types() [19/74]

template<class Output , std::size_t InputRank, std::size_t ReducedRank, uni20::MdspecLike InputMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<InputMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
sum_reduction_op< InputRank, ReducedRank > const &  ,
Output &  ,
InputMdspan &   
)

Report eligibility for a host-accessible mdspec sum reduction.

◆ kernel_accepts_types() [20/74]

template<class Function , uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike... InputMdspans>
requires uni20::HostWritableMdspec<OutputMdspan> && (uni20::HostReadableMdspec<InputMdspans> && ...)
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
transform_inplace_op< Function > const &  ,
OutputMdspan &  ,
InputMdspans &  ... 
)

Report eligibility for host-accessible mdspec update transforms.

◆ kernel_accepts_types() [21/74]

template<class Function , uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike... InputMdspans>
requires uni20::HostWritableMdspec<OutputMdspan> && (uni20::HostReadableMdspec<InputMdspans> && ...)
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend const &  ,
transform_op< Function > const &  ,
OutputMdspan &  ,
InputMdspans &  ... 
)

Report eligibility for host-accessible mdspec overwrite transforms.

◆ kernel_accepts_types() [22/74]

template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend  ,
least_squares_op const &  ,
X &  ,
A &  ,
B &  ,
std::span< make_real_t< typename A::value_type > >  ,
LeastSquaresInfo &  ,
LeastSquaresOptions< make_real_t< typename A::value_type > > const &  ,
P...   
)

Accept matching host matrices for finite-precision reference QR least squares.

◆ kernel_accepts_types() [23/74]

template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && RealOrComplex<typename A::value_type> && has_runtime_precision_v<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend  ,
linear_solve_op const &  ,
A &  ,
B &  ,
SolveInfo &  ,
SolveOptions< make_real_t< typename A::value_type > > const &  ,
Precision   
)

Accept runtime-precision host solves with an explicit finite working precision.

◆ kernel_accepts_types() [24/74]

template<MutableRankedMdspecLike< 2 > A, class... P>
requires HostWritableMdspec<A> && RealOrComplex<typename A::value_type> && detail::cpu_reference::LuPrecisionArgs<typename A::value_type, P...>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend  ,
lu_factor_op const &  ,
A &  ,
std::span< std::size_t >  ,
LuNorms< make_real_t< typename A::value_type > > *  ,
SolveInfo &  ,
SolveOptions< make_real_t< typename A::value_type > > const &  ,
P...   
)

Accept real/complex LU on mutable logical host elements.

◆ kernel_accepts_types() [25/74]

template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B, class... P>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && RealOrComplex<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type> && detail::cpu_reference::LuPrecisionArgs<typename A::value_type, P...>
consteval auto uni20::linalg::kernel_accepts_types ( CpuReferenceBackend  ,
lu_solve_op const &  ,
A &  ,
std::span< std::size_t const >  ,
B &  ,
SolveInfo &  ,
P...   
)

Accept host solves from read-only factors at their working precision.

◆ kernel_accepts_types() [26/74]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires requires(async::shared_storage<OutputTensor>& storage, detail::matrix_product_extents const& shape, uni20::cuda::Device device) { uni20::prepare_output(storage, shape, device); }
consteval auto uni20::linalg::kernel_accepts_types ( CublasBackend const &  ,
assign_product_op const &  ,
async::shared_storage< OutputTensor > &  ,
Scalar const &  ,
LhsMdspan &  ,
RhsMdspan &   
)

Report cuBLAS eligibility for a deferred Tensor matrix-product output.

◆ kernel_accepts_types() [27/74]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CublasBackend const &  ,
assign_product_op const &  ,
OutputTensor &  ,
Scalar const &  ,
LhsMdspan &  ,
RhsMdspan &   
)

Report cuBLAS eligibility for replaceable-output matrix products.

◆ kernel_accepts_types() [28/74]

template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CublasBackend const &  ,
gemm_op const &  ,
OutputMdspan &  ,
Scalar const &  ,
LhsMdspan &  ,
RhsMdspan &  ,
Scalar const &   
)

Report cuBLAS eligibility for normalized mdspec GEMM operands.

◆ kernel_accepts_types() [29/74]

template<class Output , uni20::MdspecLike LhsMdspec, uni20::MdspecLike RhsMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CublasBackend const &  ,
inner_product_op const &  ,
Output &  ,
LhsMdspec &  ,
RhsMdspec &   
)

Report cuBLAS eligibility for a full CUDA inner product returning a host scalar.

◆ kernel_accepts_types() [30/74]

template<class Output , uni20::MdspecLike InputMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CublasBackend const &  ,
norm_op const &  ,
Output &  ,
InputMdspec &   
)

Report cuBLAS eligibility for a full CUDA norm returning a host scalar.

◆ kernel_accepts_types() [31/74]

template<uni20::MutableMdspecLike Mdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CudaReferenceBackend const &  ,
conjugate_inplace_op const &  ,
Mdspec &   
)

Report CUDA in-place conjugation eligibility for a normalized mdspec.

◆ kernel_accepts_types() [32/74]

template<uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike InputMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( CudaReferenceBackend const &  ,
copy_op const &  ,
OutputMdspan &  ,
InputMdspan &   
)

Report CUDA copy eligibility for normalized mdspecs.

◆ kernel_accepts_types() [33/74]

template<class Factor , uni20::MutableMdspecLike OutputMdspec, uni20::MdspecLike InputMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CudaReferenceBackend const &  ,
transform_inplace_op< add_scaled< Factor > > const &  ,
OutputMdspec &  ,
InputMdspec &   
)

Report CUDA eligibility for an in-place add-scaled transform.

◆ kernel_accepts_types() [34/74]

template<detail::cuda_reference::RegisteredStatelessBinary Function, uni20::MutableMdspecLike OutputMdspec, uni20::MdspecLike InputMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CudaReferenceBackend const &  ,
transform_inplace_op< Function > const &  ,
OutputMdspec &  ,
InputMdspec &   
)

Report CUDA eligibility for a registered in-place binary transform.

◆ kernel_accepts_types() [35/74]

template<class Factor , uni20::MutableMdspecLike OutputMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CudaReferenceBackend const &  ,
transform_inplace_op< scale< Factor > > const &  ,
OutputMdspec &   
)

Report CUDA eligibility for in-place scaling.

◆ kernel_accepts_types() [36/74]

template<class Value , uni20::MutableMdspecLike OutputMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CudaReferenceBackend const &  ,
transform_op< constant< Value > > const &  ,
OutputMdspec &   
)

Report CUDA eligibility for a retained-value fill transform.

◆ kernel_accepts_types() [37/74]

template<detail::cuda_reference::RegisteredStatelessUnary Function, uni20::MutableMdspecLike OutputMdspec, uni20::MdspecLike InputMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CudaReferenceBackend const &  ,
transform_op< Function > const &  ,
OutputMdspec &  ,
InputMdspec &   
)

Report CUDA eligibility for a registered stateless unary transform.

◆ kernel_accepts_types() [38/74]

template<detail::cuda_reference::RegisteredStatelessBinary Function, uni20::MutableMdspecLike OutputMdspec, uni20::MdspecLike LhsMdspec, uni20::MdspecLike RhsMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CudaReferenceBackend const &  ,
transform_op< Function > const &  ,
OutputMdspec &  ,
LhsMdspec &  ,
RhsMdspec &   
)

Report CUDA eligibility for a registered stateless binary transform.

◆ kernel_accepts_types() [39/74]

template<class Factor , uni20::MutableMdspecLike OutputMdspec, uni20::MdspecLike InputMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( CudaReferenceBackend const &  ,
transform_op< scale< Factor > > const &  ,
OutputMdspec &  ,
InputMdspec &   
)

Report CUDA eligibility for a registered unary scale transform.

◆ kernel_accepts_types() [40/74]

consteval auto uni20::linalg::kernel_accepts_types ( CusolverBackend const &  ,
svd_op const &  ,
Values &  ,
Left &  ,
Right &  ,
Matrix &   
)

Report cuSOLVER eligibility for a CUDA-buffer exact SVD.

◆ kernel_accepts_types() [41/74]

template<class GemmSelector , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( DirectGemmContractionBackend< GemmSelector > const &  ,
contract_op< LhsRank, RhsRank, ContractedRank > const &  ,
OutputMdspec &  ,
Scalar const &  ,
LhsMdspec &  ,
RhsMdspec &  ,
Scalar const &   
)

Report direct-GEMM contraction eligibility for the retained GEMM selector.

◆ kernel_accepts_types() [42/74]

template<uni20::MutableRankedStridedMdspecLike< 2 > CoefficientMdspec, uni20::MutableRankedStridedMdspecLike< 2 > RhsMdspec>
requires LapackScalar<typename CoefficientMdspec::value_type> && uni20::HostWritableMdspec<CoefficientMdspec> && uni20::HostWritableMdspec<RhsMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend const &  ,
linear_solve_op const &  ,
CoefficientMdspec &  ,
RhsMdspec &  ,
SolveInfo &  ,
SolveOptions< uni20::make_real_t< typename CoefficientMdspec::value_type > > const &   
)

Report eligibility for a host-accessible LAPACK general solve.

◆ kernel_accepts_types() [43/74]

template<uni20::MutableRankedMdspecLike< 2 > LMdspec, uni20::MutableRankedMdspecLike< 2 > QMdspec, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspec>
requires LapackScalar<typename MatrixMdspec::value_type> && uni20::HostWritableMdspec<LMdspec> && uni20::HostWritableMdspec<QMdspec> && uni20::HostWritableMdspec<MatrixMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend const &  ,
lq_op const &  ,
LMdspec &  ,
QMdspec &  ,
MatrixMdspec &   
)

Report eligibility for a host-accessible reduced real or complex LQ factorization.

◆ kernel_accepts_types() [44/74]

template<class Output , uni20::RankedStridedMdspecLike< 2 > MatrixMdspec>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<MatrixMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend const &  ,
matrix_norm_op const &  ,
Output &  ,
MatrixMdspec &   
)

Report eligibility for a host-accessible LAPACK matrix norm.

◆ kernel_accepts_types() [45/74]

template<uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan, class EigenScalar , uni20::MutableRankedMdspecLike< 2 > RightEigenvectorMdspan>
requires LapackScalar<typename MatrixMdspan::value_type> && uni20::HostWritableMdspec<MatrixMdspan> && uni20::HostWritableMdspec<RightEigenvectorMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend const &  ,
nonsymmetric_eigen_op const &  ,
MatrixMdspan &  ,
std::span< EigenScalar > &  ,
RightEigenvectorMdspan &   
)

Report eligibility for host-accessible mdspec nonsymmetric eigenanalysis.

◆ kernel_accepts_types() [46/74]

template<class Operation , uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan, class EigenScalar , uni20::MutableRankedStridedMdspecLike< 2 > SchurVectorMdspan>
requires (std::same_as<Operation, schur_op> || std::same_as<Operation, hessenberg_schur_op>) && uni20::HostWritableMdspec<MatrixMdspan> && uni20::HostWritableMdspec<SchurVectorMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend const &  ,
Operation const &  ,
MatrixMdspan &  ,
std::span< EigenScalar > &  ,
SchurVectorMdspan &   
)

Report eligibility for host-accessible mdspec Schur decomposition.

◆ kernel_accepts_types() [47/74]

template<lapack_detail::SvdOperation Operation, uni20::MutableStridedMdspecLike... Mdspans>
requires (LapackScalar<typename Mdspans::value_type> && ...) && (uni20::HostWritableMdspec<Mdspans> && ...) && requires { lapack_detail::svd_acceptance(Operation{}, std::type_identity<uni20::host_write_mdspan_t<Mdspans>>{}...); }
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend const &  ,
Operation const &  ,
Mdspans &  ... 
)

Report eligibility for host-accessible mdspec SVD operands.

◆ kernel_accepts_types() [48/74]

template<uni20::MutableRankedMdspecLike< 2 > QMdspec, uni20::MutableRankedMdspecLike< 2 > RMdspec, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspec>
requires LapackScalar<typename MatrixMdspec::value_type> && uni20::HostWritableMdspec<QMdspec> && uni20::HostWritableMdspec<RMdspec> && uni20::HostWritableMdspec<MatrixMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend const &  ,
qr_op const &  ,
QMdspec &  ,
RMdspec &  ,
MatrixMdspec &   
)

Report eligibility for a host-accessible reduced real or complex QR factorization.

◆ kernel_accepts_types() [49/74]

template<uni20::MutableRankedStridedMdspecLike< 2 > SchurFormMdspan, uni20::MutableRankedStridedMdspecLike< 2 > SchurVectorMdspan>
requires uni20::HostWritableMdspec<SchurFormMdspan> && uni20::HostWritableMdspec<SchurVectorMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend const &  ,
schur_reorder_op const &  ,
SchurFormMdspan &  ,
SchurVectorMdspan &   
)

Report eligibility for host-accessible mdspec Schur reordering.

◆ kernel_accepts_types() [50/74]

template<uni20::MutableRankedStridedMdspecLike< 1 > EigenvalueMdspan, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan>
requires LapackScalar<typename MatrixMdspan::value_type> && uni20::HostWritableMdspec<EigenvalueMdspan> && uni20::HostWritableMdspec<MatrixMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend const &  ,
self_adjoint_eigh_op const &  ,
EigenvalueMdspan &  ,
MatrixMdspan &   
)

Report eligibility for host-accessible mdspec self-adjoint eigenanalysis.

◆ kernel_accepts_types() [51/74]

template<uni20::LapackReal Scalar, uni20::MutableRankedStridedMdspecLike< 2 > EigenvectorMdspan>
requires uni20::HostWritableMdspec<EigenvectorMdspan>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend const &  ,
symmetric_tridiagonal_eigen_op const &  ,
std::span< Scalar > &  ,
std::span< Scalar > &  ,
EigenvectorMdspan &   
)

Report eligibility for a host-accessible mdspec tridiagonal eigensystem.

◆ kernel_accepts_types() [52/74]

template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...> && (least_squares_detail::qr_acceptance<typename A::value_type, P...>() != KernelTypeAcceptance::no)
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
least_squares_op const &  ,
X &  ,
A &  ,
B &  ,
std::span< make_real_t< typename A::value_type > >  ,
LeastSquaresInfo &  ,
LeastSquaresOptions< make_real_t< typename A::value_type > > const &  ,
P...   
)

Accept precisely those scalar families supported by the configured LAPACK QR kernel.

◆ kernel_accepts_types() [53/74]

template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
linear_solve_op const &  ,
A &  ,
B &  ,
SolveInfo &  ,
SolveOptions< float80 > const &   
)

Accept mutable host operands for a binary80 LU solve.

◆ kernel_accepts_types() [54/74]

template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && mpfr_detail::RuntimeScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
linear_solve_op const &  ,
A &  ,
B &  ,
SolveInfo &  ,
SolveOptions< mpreal > const &  ,
Precision   
)

Accept mutable host operands for an arbitrary-precision LU solve.

◆ kernel_accepts_types() [55/74]

template<packed_detail::DecompositionMatrix A, class X , class Y , class... P>
requires packed_detail::SameMatrixScalar<A, X> && packed_detail::SameMatrixScalar<A, Y> && packed_detail::LqScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
lq_op const &  ,
X &  ,
Y &  ,
A &  ,
P...  precision 
)

Accept real or complex host matrices for reduced LQ at explicit precision.

◆ kernel_accepts_types() [56/74]

template<MutableRankedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
lu_factor_op const &  ,
A &  ,
std::span< std::size_t >  ,
LuNorms< float80 > *  ,
SolveInfo &  ,
SolveOptions< float80 > const &   
)

Accept logical host workspaces for native binary80 LU.

◆ kernel_accepts_types() [57/74]

template<MutableRankedStridedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && LapackScalar<typename A::value_type> && DefaultAccessorMdspanLike<host_write_mdspan_t<A>>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
lu_factor_op const &  ,
A &  ,
std::span< std::size_t >  ,
LuNorms< make_real_t< typename A::value_type > > *  ,
SolveInfo &  ,
SolveOptions< make_real_t< typename A::value_type > > const &   
)

Accept directly addressable native LAPACK LU workspaces.

◆ kernel_accepts_types() [58/74]

template<MutableRankedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && mpfr_detail::RuntimeScalar<typename A::value_type>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
lu_factor_op const &  ,
A &  ,
std::span< std::size_t >  ,
LuNorms< mpreal > *  ,
SolveInfo &  ,
SolveOptions< mpreal > const &  ,
Precision   
)

Accept logical host workspaces for finite-precision MPFR/MPC LU.

◆ kernel_accepts_types() [59/74]

template<RankedMdspecLike< 2 > A, class... P>
requires HostReadableMdspec<A> && condition_detail::PrecisionArgs<typename A::value_type, P...> && (LapackScalar<typename A::value_type> || condition_detail::PackedGecon<typename A::value_type>)
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
lu_rcond_op const &  ,
make_real_t< typename A::value_type > &  ,
A &  ,
make_real_t< typename A::value_type > const &  ,
SolveInfo &  ,
P...   
)

Accept configured GECON providers for read-only successful LU factors.

◆ kernel_accepts_types() [60/74]

template<RankedStridedMdspecLike< 2 > A, MutableRankedStridedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && LapackScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type> && DefaultAccessorMdspanLike<host_read_mdspan_t<A>> && DefaultAccessorMdspanLike<host_write_mdspan_t<B>>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
lu_solve_op const &  ,
A &  ,
std::span< std::size_t const >  ,
B &  ,
SolveInfo &   
)

Accept directly addressable read-only factors and a writable RHS.

◆ kernel_accepts_types() [61/74]

template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
lu_solve_op const &  ,
A &  ,
std::span< std::size_t const >  ,
B &  ,
SolveInfo &   
)

Accept read-only binary80 factors and logical host RHS elements.

◆ kernel_accepts_types() [62/74]

template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && mpfr_detail::RuntimeScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
lu_solve_op const &  ,
A &  ,
std::span< std::size_t const >  ,
B &  ,
SolveInfo &  ,
Precision   
)

Accept read-only runtime-precision factors and logical host RHS elements.

◆ kernel_accepts_types() [63/74]

template<packed_detail::DecompositionMatrix A, packed_detail::DecompositionMatrix R, class... P>
requires std::same_as<typename R::value_type, complex<make_real_t<typename A::value_type>>> && packed_detail::EigenScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
nonsymmetric_eigen_op const &  ,
A &  ,
std::span< typename R::value_type >  ,
R &  ,
P...  precision 
)

Accept real or complex input and actual complex eigenvalue/vector outputs.

◆ kernel_accepts_types() [64/74]

template<packed_detail::DecompositionMatrix A, class X , class Y , class... P>
requires packed_detail::SameMatrixScalar<A, X> && packed_detail::SameMatrixScalar<A, Y> && packed_detail::QrScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
qr_op const &  ,
X &  ,
Y &  ,
A &  ,
P...  precision 
)

Accept real or complex host matrices for reduced QR at explicit precision.

◆ kernel_accepts_types() [65/74]

template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::EighScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
self_adjoint_eigh_op const &  ,
V &  ,
A &  ,
P...  precision 
)

Accept matching real eigenvalues and real or complex host matrix storage.

◆ kernel_accepts_types() [66/74]

template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
singular_values_op const &  op,
V &  v,
A &  a,
P...  precision 
)

Accept explicit-precision SVD with the requested output structure.

◆ kernel_accepts_types() [67/74]

template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...> && (LapackScalar<typename A::value_type> || least_squares_detail::PackedGelss<typename A::value_type>)
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
svd_least_squares_op const &  ,
X &  ,
A &  ,
B &  ,
std::span< make_real_t< typename A::value_type > >  ,
LeastSquaresInfo &  ,
SvdLeastSquaresDiagnostics< make_real_t< typename A::value_type > > &  ,
SvdLeastSquaresOptions< make_real_t< typename A::value_type > > const &  ,
P...   
)

Accept configured real/complex GELSS providers; runtime scalars require explicit precision.

◆ kernel_accepts_types() [68/74]

template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
svd_left_op const &  op,
V &  v,
A &  a,
P...  precision 
)

Accept explicit-precision SVD with the requested output structure.

◆ kernel_accepts_types() [69/74]

template<class V , packed_detail::DecompositionMatrix A, class L , class... P>
requires packed_detail::SameMatrixScalar<A, L> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
svd_left_op const &  op,
V &  v,
L &  l,
A &  a,
P...  precision 
)

Accept explicit-precision SVD with the requested output structure.

◆ kernel_accepts_types() [70/74]

template<class V , packed_detail::DecompositionMatrix A, class F , class... P>
requires packed_detail::SameMatrixScalar<A, F> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
svd_op const &  op,
V &  v,
F &  f,
A &  a,
P...  precision 
)

Accept explicit-precision SVD with the requested output structure.

◆ kernel_accepts_types() [71/74]

template<class V , packed_detail::DecompositionMatrix A, class L , class R , class... P>
requires packed_detail::SameMatrixScalar<A, L> && packed_detail::SameMatrixScalar<A, R> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
svd_op const &  op,
V &  v,
L &  l,
R &  r,
A &  a,
P...  precision 
)

Accept explicit-precision SVD with the requested output structure.

◆ kernel_accepts_types() [72/74]

template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
svd_right_op const &  op,
V &  v,
A &  a,
P...  precision 
)

Accept explicit-precision SVD with the requested output structure.

◆ kernel_accepts_types() [73/74]

template<class V , packed_detail::DecompositionMatrix A, class R , class... P>
requires packed_detail::SameMatrixScalar<A, R> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
consteval auto uni20::linalg::kernel_accepts_types ( LapackBackend  ,
svd_right_op const &  op,
V &  v,
R &  r,
A &  a,
P...  precision 
)

Accept explicit-precision SVD with the requested output structure.

◆ kernel_accepts_types() [74/74]

template<class GemmSelector , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
consteval auto uni20::linalg::kernel_accepts_types ( LoopedGemmContractionBackend< GemmSelector > const &  ,
contract_op< LhsRank, RhsRank, ContractedRank > const &  ,
OutputMdspec &  ,
Scalar const &  ,
LhsMdspec &  ,
RhsMdspec &  ,
Scalar const &   
)

Report looped-GEMM contraction eligibility for the retained GEMM selector.

◆ kernel_attempt_name()

constexpr std::string_view uni20::linalg::kernel_attempt_name ( KernelAttempt  attempt)
constexprnoexcept

Return a stable human-readable kernel-attempt result name.

◆ kernel_attempt_succeeded()

constexpr bool uni20::linalg::kernel_attempt_succeeded ( KernelAttempt  attempt)
constexprnoexcept

Return whether a backend performed the operation.

◆ kernel_type_candidates()

template<class BackendSelector , class Op , class... Args>
constexpr auto uni20::linalg::kernel_type_candidates ( BackendSelector &&  selector,
Op const &  ,
Args &&  ... 
)
constexpr

Filter a backend selector to candidates accepting the call's argument types.

The result type is determined entirely at compile time. Retained backend values preserve their original order and state so callers such as conformance tests can exercise each candidate independently.

◆ least_squares()

template<class... Args>
requires requires(Args&&... args) { least_squares_with_info(std::forward<Args>(args)...); }
auto uni20::linalg::least_squares ( Args &&...  args)

Return a preserving least-squares solution; numerical failure uses the ordinary terminal error policy.

◆ least_squares_with_info() [1/4]

template<RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::least_squares_with_info ( A const &  a,
B const &  b,
LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Infer precision and select the ordinary host-result backends.

◆ least_squares_with_info() [2/4]

template<RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::least_squares_with_info ( A const &  a,
B const &  b,
Precision  p,
LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Use the ordinary backend selector for the owning host result.

◆ least_squares_with_info() [3/4]

template<KernelBackendSelector Backend, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::least_squares_with_info ( Backend &&  backend,
A const &  a,
B const &  b,
LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Infer working precision from input defaults, requiring matching finite defaults when both exist.

◆ least_squares_with_info() [4/4]

template<KernelBackendSelector Backend, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::least_squares_with_info ( Backend &&  backend,
A const &  a,
B const &  b,
Precision  p,
LeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Minimize each column's Euclidean residual for m-by-n A with m >= n.

Both inputs are preserved. A finite precision is required; fixed scalars accept their native precision only. Runtime inputs and the tolerance convert in the backend. Zero RHS columns are a no-op; zero unknowns return the norms of B. Unsupported underdetermined shapes and invalid options are errors, not numerical outcomes.

Returns
Owning host solution and residuals on success, otherwise only failure diagnostics.

◆ LoopedGemmContractionBackend()

template<class GemmSelector >
uni20::linalg::LoopedGemmContractionBackend ( GemmSelector  ) -> LoopedGemmContractionBackend< std::remove_cvref_t< GemmSelector > >

◆ lq() [1/8]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::lq ( async::Async< MatrixTensor > &&  matrix,
std::optional< Precision >  requested = {} 
)

Schedule a consuming reduced real or complex LQ factorization using the static Tensor selector.

◆ lq() [2/8]

template<uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::lq ( async::Async< MatrixTensor > const &  matrix,
std::optional< Precision >  requested = {} 
)

Schedule a preserving reduced real or complex LQ factorization using the static Tensor selector.

Structured binding yields two independent Async<Tensor> values: auto [l, q] = lq(matrix);.

◆ lq() [3/8]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::lq ( BackendSelector &&  selector,
MatrixTensor &&  matrix,
std::optional< Precision >  requested = {} 
)

Consume an owning real or complex matrix and return its reduced LQ factorization through an explicit selector.

An exact column-major host tensor is moved directly into the destructive workspace. Other owning tensor views are materialized.

◆ lq() [4/8]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::lq ( BackendSelector &&  selector,
MatrixTensor const &  matrix,
std::optional< Precision >  requested = {} 
)

Preserve a real or complex matrix and return its reduced LQ factorization through an explicit selector.

◆ lq() [5/8]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::lq ( BackendSelector  selector,
async::Async< MatrixTensor > &&  matrix,
std::optional< Precision >  requested = {} 
)

Schedule a consuming reduced real or complex LQ factorization through an explicit selector.

Passing the async matrix as an rvalue grants permission to remove its stored owning value. The input writer and both output writers receive any failure that occurs after enrollment.

◆ lq() [6/8]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::lq ( BackendSelector  selector,
async::Async< MatrixTensor > const &  matrix,
std::optional< Precision >  requested = {} 
)

Schedule a preserving reduced real or complex LQ factorization through an explicit selector.

The returned L and Q handles have independent output epochs and both receive any unhandled task failure.

◆ lq() [7/8]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::lq ( MatrixTensor &&  matrix,
std::optional< Precision >  requested = {} 
)

Consume an owning real or complex matrix and return its reduced LQ factorization.

◆ lq() [8/8]

template<uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::lq ( MatrixTensor const &  matrix,
std::optional< Precision >  requested = {} 
)

Preserve a real or complex matrix and return its reduced LQ factorization.

◆ lq_factorization() [1/2]

template<KernelBackendSelector BackendSelector, class LTensor , class QTensor , class MatrixTensor >
requires detail::CompatibleLqTensors<LTensor, QTensor, MatrixTensor>
void uni20::linalg::lq_factorization ( BackendSelector &&  selector,
LTensor &&  l,
QTensor &&  q,
MatrixTensor &&  matrix_work,
std::optional< Precision >  requested = {} 
)

Compute reduced LQ in a destructive input workspace through an explicit selector.

matrix_work is overwritten. For an m x n input, l is prepared with shape m x k and q with shape k x n, where k = min(m,n).

Precondition
The two outputs and input workspace do not overlap.

◆ lq_factorization() [2/2]

template<class LTensor , class QTensor , class MatrixTensor >
requires detail::CompatibleLqTensors<LTensor, QTensor, MatrixTensor>
void uni20::linalg::lq_factorization ( LTensor &&  l,
QTensor &&  q,
MatrixTensor &&  matrix_work,
std::optional< Precision >  requested = {} 
)

Compute reduced LQ in a destructive workspace using tensor storage policy.

◆ lu_factor()

template<class... Args>
requires requires(Args&&... args) { lu_factor_with_info(std::forward<Args>(args)...); }
auto uni20::linalg::lu_factor ( Args &&...  args)

Return completed owning factors; numerical failure uses the terminal error policy.

◆ lu_factor_with_info() [1/4]

template<RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::lu_factor_with_info ( A const &  a,
LuOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Factor with the default backend for the materialized host workspace.

◆ lu_factor_with_info() [2/4]

template<RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::lu_factor_with_info ( A const &  a,
Precision  p,
LuOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Factor at explicit precision with the default host backend.

◆ lu_factor_with_info() [3/4]

template<KernelBackendSelector Backend, RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::lu_factor_with_info ( Backend &&  backend,
A const &  a,
LuOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Factor at native precision or the input tensor's finite construction default.

Preserves the logical input, including accessor transformations, in owned column-major host work. Shape, options and dispatch errors are ordinary errors; numerical outcomes are returned in SolveInfo.

◆ lu_factor_with_info() [4/4]

template<KernelBackendSelector Backend, RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::lu_factor_with_info ( Backend &&  backend,
A const &  a,
Precision  p,
LuOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Factor at explicit finite precision, preserving input values and defaults.

Conversion occurs in the backend. Exact inputs require this finite override. Numerical failures return diagnostics with no factor.

◆ lu_rcond()

template<class... Args>
requires requires(Args&&... args) { lu_rcond_with_info(std::forward<Args>(args)...); }
auto uni20::linalg::lu_rcond ( Args &&...  args)

Return the reciprocal condition estimate; numerical failure uses the terminal error policy.

◆ lu_rcond_with_info() [1/4]

template<KernelBackendSelector Backend, RealOrComplex S>
auto uni20::linalg::lu_rcond_with_info ( Backend &&  backend,
LuFactorization< S > const &  factor,
MatrixNorm  norm,
make_real_t< S > const &  original_norm 
)

Estimate conditioning using an explicitly supplied original matrix norm.

Preserves factors on every outcome. The supplied norm must describe A after conversion to factor precision, using mathematical complex magnitudes. It converts to that precision in the backend. A nonfinite norm or estimate reports nonfinite_result without invalidating LU. Empty factors have reciprocal condition one.

◆ lu_rcond_with_info() [2/4]

template<KernelBackendSelector Backend, RealOrComplex S>
auto uni20::linalg::lu_rcond_with_info ( Backend &&  backend,
LuFactorization< S > const &  factor,
MatrixNorm  norm = MatrixNorm::One 
)

Estimate conditioning from retained original norms; missing capture is an ordinary error.

◆ lu_rcond_with_info() [3/4]

template<RealOrComplex S>
auto uni20::linalg::lu_rcond_with_info ( LuFactorization< S > const &  factor,
MatrixNorm  norm,
make_real_t< S > const &  original_norm 
)

Estimate with default dispatch and an explicit original norm.

◆ lu_rcond_with_info() [4/4]

template<RealOrComplex S>
auto uni20::linalg::lu_rcond_with_info ( LuFactorization< S > const &  factor,
MatrixNorm  norm = MatrixNorm::One 
)

Estimate with default dispatch and the norms retained during factorization.

◆ lu_refine()

template<class... Args>
requires requires(Args&&... args) { lu_refine_with_info(std::forward<Args>(args)...); }
auto uni20::linalg::lu_refine ( Args &&...  args)

Return the refined solution only on convergence; other outcomes use the terminal error policy.

◆ lu_refine_with_info() [1/4]

template<RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto uni20::linalg::lu_refine_with_info ( A const &  a,
B const &  b,
LuRefinementPrecision< F, W, R >  p,
RefinementOptions< make_real_t< R > > const &  options = {},
LuOptions< make_real_t< F > > const &  factor_options = {.retain_norms = false} 
)

Refine with the ordinary host backend selection for the factor scalar.

◆ lu_refine_with_info() [2/4]

template<KernelBackendSelector Backend, RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto uni20::linalg::lu_refine_with_info ( Backend &&  backend,
A const &  a,
B const &  b,
LuRefinementPrecision< F, W, R >  p,
RefinementOptions< make_real_t< R > > const &  options = {},
LuOptions< make_real_t< F > > const &  factor_options = {.retain_norms = false} 
)

Factor at p.factor, then solve and refine with independently selected working/residual arithmetic.

Preserves A and B. Factor conversion is directly from the original logical A, independently of residual conversion. Factorization and correction failures report their SolveInfo; no automatic retry or precision escalation occurs. Diagnostic norm capture is disabled by default for the temporary LU. Invalid shapes, precision arguments, options and unavailable providers are ordinary errors.

◆ lu_refine_with_info() [3/4]

template<KernelBackendSelector Backend, RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto uni20::linalg::lu_refine_with_info ( Backend &&  backend,
LuFactorization< F > const &  factor,
A const &  a,
B const &  b,
LuRefinementPrecision< F, W, R >  p,
RefinementOptions< make_real_t< R > > const &  options = {} 
)

Refine a preserving solve using existing LU factors and the original A and B.

Factors must describe A rounded to the requested factor scalar and precision. This correspondence is a caller precondition. The factor precision must match p.factor. A and B are evaluated at p.residual; the owning result uses W at p.working. Each RHS freezes once its componentwise backward error meets the target. A correction that cannot change the iterate signals stagnation. Failed later steps preserve the last finite iterate and its recomputed diagnostics. Empty systems/RHS sets succeed without inspecting numerical values. All work is synchronous and host-resident; backend selects the LU solve, while residual evaluation and updates use scalar arithmetic.

◆ lu_refine_with_info() [4/4]

template<RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto uni20::linalg::lu_refine_with_info ( LuFactorization< F > const &  factor,
A const &  a,
B const &  b,
LuRefinementPrecision< F, W, R >  p,
RefinementOptions< make_real_t< R > > const &  options = {} 
)

Refine from reusable factors with ordinary host solve dispatch.

◆ lu_solve() [1/2]

template<KernelBackendSelector Backend, RealOrComplex S, RankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
auto uni20::linalg::lu_solve ( Backend &&  backend,
LuFactorization< S > const &  factor,
B const &  b 
)

Preserve the RHS and return an owning column-major solution at factor precision.

◆ lu_solve() [2/2]

template<RealOrComplex S, RankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
auto uni20::linalg::lu_solve ( LuFactorization< S > const &  factor,
B const &  b 
)

Preserve the RHS and solve with default host backends.

◆ lu_solve_inplace()

template<class... Args>
requires requires(Args&&... args) { lu_solve_inplace_with_info(std::forward<Args>(args)...); }
void uni20::linalg::lu_solve_inplace ( Args &&...  args)

Strict solve in an existing RHS workspace; numerical failure is terminal.

◆ lu_solve_inplace_with_info() [1/2]

template<KernelBackendSelector Backend, RealOrComplex S, MutableRankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
SolveInfo uni20::linalg::lu_solve_inplace_with_info ( Backend &&  backend,
LuFactorization< S > const &  factor,
B &&  b 
)

Solve in an existing RHS workspace, preserving the factors on every outcome.

Finite RHS values convert to the factors' precision, regardless of their construction default. Nonfinite input preserves the RHS; later numerical failure may change it. Empty solves do not inspect values. A successful nonempty owning RHS records factor precision; views do not.

Precondition
RHS storage does not overlap factor storage.

◆ lu_solve_inplace_with_info() [2/2]

template<RealOrComplex S, MutableRankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
SolveInfo uni20::linalg::lu_solve_inplace_with_info ( LuFactorization< S > const &  factor,
B &&  b 
)

Solve in place using the factors' and RHS storage-selected backends.

◆ make_contraction_axes()

template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank>
auto uni20::linalg::make_contraction_axes ( std::array< std::pair< std::size_t, std::size_t >, ContractedRank >  requested_axes) -> ContractionAxes<LhsRank, RhsRank, ContractedRank>

Normalize and validate a fixed-size array of contraction-axis pairs.

Each pair contains a left axis followed by its matching right axis. Repeated and out-of-range axes are rejected. Pair order does not affect the normalized result.

◆ make_contraction_matrix_mdspan()

template<uni20::MdspanLike Mdspan>
auto uni20::linalg::make_contraction_matrix_mdspan ( Mdspan &  span,
ContractionMatrixProjection const &  projection 
) -> contraction_matrix_mdspan_t<Mdspan>

Project a resolved mdspan into one rank-two GEMM operand without changing storage.

◆ make_contraction_matrix_mdspec()

template<uni20::MdspecLike Mdspec>
auto uni20::linalg::make_contraction_matrix_mdspec ( Mdspec &  span,
ContractionMatrixProjection const &  projection 
) -> contraction_matrix_mdspec_t<Mdspec>

Project an mdspec into one rank-two GEMM operand without acquiring its handle.

Immediate mdspans remain immediate. Descriptor-backed inputs retain a copied data descriptor, mapping, and accessor for acquisition by the selected GEMM backend.

◆ make_contraction_stride_groups()

template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
auto uni20::linalg::make_contraction_stride_groups ( OutputMdspec const &  output,
LhsMdspec const &  lhs,
RhsMdspec const &  rhs,
ContractionAxes< LhsRank, RhsRank, ContractedRank > const &  axes 
) -> ContractionStrideGroups<LhsRank, RhsRank, ContractedRank>

Build jointly merged M, N, and K stride groups without acquiring data handles.

◆ make_offset_contraction_matrix_mdspec()

template<uni20::MdspecLike Mdspec>
requires (detail::contraction_strides::can_offset_contraction_mdspec<Mdspec>())
auto uni20::linalg::make_offset_contraction_matrix_mdspec ( Mdspec &  span,
ContractionMatrixProjection const &  projection,
uni20::index_type  element_offset 
) -> offset_contraction_matrix_mdspec_t<Mdspec>

Project a rank-two mdspec slice at one nonnegative element offset.

Immediate storage advances its handle through the accessor and uses the accessor's offset policy. Deferred storage advances the copied data descriptor through offset_by, preserving acquisition and resource identity for the selected GEMM backend.

Precondition
element_offset is nonnegative and identifies a valid element origin within the source descriptor.

◆ make_reduction_axes()

template<std::size_t InputRank, ReductionAxis... Axes>
auto uni20::linalg::make_reduction_axes ( Axes...  requested_axes) -> ReductionAxes<InputRank, sizeof...(Axes)>

Normalize and validate a runtime reduction-axis pack.

Negative axes count backward from InputRank. Duplicate and out-of-range axes are rejected before backend dispatch.

◆ matrix_exponential() [1/4]

template<uni20::AsyncTensorOutput OutputTensor, uni20::RankedTensorView< 2 > InputTensor, class TimeScalar >
requires uni20::MutableRankedTensorView<OutputTensor, 2> && requires(TimeScalar&& time) { async::read(std::forward<TimeScalar>(time)); }
void uni20::linalg::matrix_exponential ( async::Async< OutputTensor > &  output,
async::Async< InputTensor > const &  input,
TimeScalar &&  time 
)

Schedule fixed-output matrix exponentiation using static Tensor policy.

◆ matrix_exponential() [2/4]

template<class BackendSelector , uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > InputTensor, class TimeScalar >
void uni20::linalg::matrix_exponential ( BackendSelector &&  selector,
OutputTensor &&  output,
InputTensor const &  input,
TimeScalar  time 
)

Overwrite a fixed-size output with the matrix exponential exp(time * input).

Both matrices must have the same square shape; output is not resized and its old values are ignored. This is the matrix exponential, not entrywise exponentiation. The CPU backend accepts real or complex time and promotes a real input to a complex result for complex time; output elements must be assignable from the computed result type.

Note
The current CPU backend materializes the input before writing the output. This implementation detail does not establish an aliasing contract for other backends or Async overloads; Async input and output require distinct queues.

◆ matrix_exponential() [3/4]

template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput OutputTensor, uni20::RankedTensorView< 2 > InputTensor, class TimeScalar >
requires uni20::MutableRankedTensorView<OutputTensor, 2> && requires(TimeScalar&& time) { async::read(std::forward<TimeScalar>(time)); }
void uni20::linalg::matrix_exponential ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
async::Async< InputTensor > const &  input,
TimeScalar &&  time 
)

Schedule fixed-output matrix exponentiation through an explicit selector.

Tensor operands are asynchronous; time may be an immediate or Async scalar.

Precondition
The output is constructed, has a distinct epoch queue from the input, and has compatible square shape.

◆ matrix_exponential() [4/4]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::RankedTensorView< 2 > InputTensor, class TimeScalar >
void uni20::linalg::matrix_exponential ( OutputTensor &&  output,
InputTensor const &  input,
TimeScalar  time 
)

Apply the fixed-output matrix_exponential contract using tensor storage policy.

◆ matrix_norm() [1/9]

template<uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && requires(MatrixTensor const& matrix) { uni20::norm(matrix); }
auto uni20::linalg::matrix_norm ( async::Async< MatrixTensor > const &  matrix,
MatrixNorm  kind 
)

Schedule a storage-preserving dense matrix norm using static Tensor policy.

◆ matrix_norm() [2/9]

template<uni20::AsyncTensorOutput OutputTensor, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::MutableScalarTensorView<OutputTensor> && uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && std::same_as<uni20::tensor_element_t<OutputTensor>, uni20::make_real_t<uni20::tensor_element_t<MatrixTensor>>>
void uni20::linalg::matrix_norm ( async::Async< OutputTensor > &  output,
async::Async< MatrixTensor > const &  matrix,
MatrixNorm  kind 
)

Schedule a matrix norm into an explicit async scalar Tensor using storage policy.

Precondition
The output must not share an epoch queue with the matrix.

◆ matrix_norm() [3/9]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && requires(MatrixTensor const& matrix) { uni20::norm(matrix); }
auto uni20::linalg::matrix_norm ( BackendSelector &&  selector,
MatrixTensor const &  matrix,
MatrixNorm  kind 
)

Return a storage-preserving rank-zero Tensor matrix norm.

Uses the MatrixNorm definitions. The result has the same owning storage policy as uni20::norm(matrix) and the input's corresponding real scalar type. Use matrix_norm_host when a host C++ scalar is required.

◆ matrix_norm() [4/9]

template<KernelBackendSelector BackendSelector, uni20::MutableRankedMdspanLike< 0 > OutputMdspan, uni20::RankedMdspanLike< 2 > MatrixMdspan>
requires uni20::RealOrComplex<typename std::remove_cvref_t<MatrixMdspan>::value_type> && std::same_as<typename std::remove_cvref_t<OutputMdspan>::value_type, uni20::make_real_t<typename std::remove_cvref_t<MatrixMdspan>::value_type>>
void uni20::linalg::matrix_norm ( BackendSelector &&  selector,
OutputMdspan &&  output,
MatrixMdspan &&  matrix,
MatrixNorm  kind 
)

Compute a bare mdspan matrix norm into a rank-zero output.

MatrixNorm defines the four supported norms. Input may be rectangular; either zero extent gives zero. Complex input uses mathematical magnitude, and the result has the corresponding real scalar type. Output's old value is ignored. Tensor overloads use the same numerical definitions.

◆ matrix_norm() [5/9]

template<KernelBackendSelector BackendSelector, uni20::MutableScalarTensorView OutputTensor, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && std::same_as<uni20::tensor_element_t<OutputTensor>, uni20::make_real_t<uni20::tensor_element_t<MatrixTensor>>>
void uni20::linalg::matrix_norm ( BackendSelector &&  selector,
OutputTensor &&  output,
MatrixTensor const &  matrix,
MatrixNorm  kind 
)

Compute a Tensor matrix norm into an existing real scalar Tensor.

Uses the MatrixNorm definitions, including zero for empty input and mathematical complex magnitude. Output has rank zero and the input's corresponding real scalar type; its old value is ignored.

◆ matrix_norm() [6/9]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && requires(MatrixTensor const& matrix) { uni20::norm(matrix); }
auto uni20::linalg::matrix_norm ( BackendSelector  selector,
async::Async< MatrixTensor > const &  matrix,
MatrixNorm  kind 
)

Schedule a storage-preserving dense matrix norm through an explicit selector.

◆ matrix_norm() [7/9]

template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput OutputTensor, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::MutableScalarTensorView<OutputTensor> && uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && std::same_as<uni20::tensor_element_t<OutputTensor>, uni20::make_real_t<uni20::tensor_element_t<MatrixTensor>>>
void uni20::linalg::matrix_norm ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
async::Async< MatrixTensor > const &  matrix,
MatrixNorm  kind 
)

Schedule a matrix norm into an explicit async scalar Tensor.

Precondition
The output must not share an epoch queue with the matrix.

◆ matrix_norm() [8/9]

template<uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && requires(MatrixTensor const& matrix) { uni20::norm(matrix); }
auto uni20::linalg::matrix_norm ( MatrixTensor const &  matrix,
MatrixNorm  kind 
)

Return a storage-preserving rank-zero Tensor matrix norm using storage policy.

◆ matrix_norm() [9/9]

template<uni20::MutableScalarTensorView OutputTensor, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>> && std::same_as<uni20::tensor_element_t<OutputTensor>, uni20::make_real_t<uni20::tensor_element_t<MatrixTensor>>>
void uni20::linalg::matrix_norm ( OutputTensor &&  output,
MatrixTensor const &  matrix,
MatrixNorm  kind 
)

Compute a Tensor matrix norm using the operands' storage policy.

◆ matrix_norm_host() [1/5]

template<uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::matrix_norm_host ( async::Async< MatrixTensor > const &  matrix,
MatrixNorm  kind 
)

Schedule a dense matrix norm returning a host C++ scalar using static Tensor policy.

◆ matrix_norm_host() [2/5]

template<KernelBackendSelector BackendSelector, uni20::RankedMdspanLike< 2 > MatrixMdspan>
requires uni20::RealOrComplex<typename std::remove_cvref_t<MatrixMdspan>::value_type>
auto uni20::linalg::matrix_norm_host ( BackendSelector &&  selector,
MatrixMdspan &&  matrix,
MatrixNorm  kind 
) -> uni20::make_real_t<typename std::remove_cvref_t<MatrixMdspan>::value_type>

Return a bare mdspan matrix norm as a host C++ scalar.

◆ matrix_norm_host() [3/5]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::matrix_norm_host ( BackendSelector &&  selector,
MatrixTensor const &  matrix,
MatrixNorm  kind 
) -> uni20::make_real_t<uni20::tensor_element_t<MatrixTensor>>

Return a Tensor matrix norm as a host C++ scalar through an explicit selector.

Uses the MatrixNorm definitions and the input's corresponding real scalar type. This synchronous overload returns a completed host value; it does not preserve the input storage policy. Backend availability still determines which input memory domains are supported.

◆ matrix_norm_host() [4/5]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::matrix_norm_host ( BackendSelector  selector,
async::Async< MatrixTensor > const &  matrix,
MatrixNorm  kind 
)

Schedule a dense matrix norm returning a host C++ scalar through an explicit selector.

◆ matrix_norm_host() [5/5]

template<uni20::RankedTensorView< 2 > MatrixTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::matrix_norm_host ( MatrixTensor const &  matrix,
MatrixNorm  kind 
) -> uni20::make_real_t<uni20::tensor_element_t<MatrixTensor>>

Return a Tensor matrix norm as a host C++ scalar using storage policy.

◆ nonsymmetric_eigen() [1/2]

template<KernelBackendSelector BackendSelector, uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > RightEigenvectorTensor>
void uni20::linalg::nonsymmetric_eigen ( BackendSelector &&  selector,
MatrixTensor &&  matrix_work,
std::span< EigenScalar >  eigenvalues,
RightEigenvectorTensor &&  right_eigenvectors,
bool  compute_right_vectors,
std::optional< Precision >  requested = {} 
)

Compute eigenvalues and optional right eigenvectors, destroying the input matrix.

For the original matrix A, column j of right_eigenvectors satisfies A * v = eigenvalues[j] * v and has unit Euclidean norm. Eigenvalues are not sorted. For real input, conjugate pairs are consecutive with the positive-imaginary value first; Uni20 returns actual complex vector columns rather than LAPACK's packed real representation. Left vectors are not computed.

Precondition
matrix_work is n x n, and eigenvalues has length n. Eigenvalues and vectors use uni20::complex<make_real_t<matrix_scalar>>, even for real input. Requested vector output is n x n. Work and output storage must not overlap; no output is resized.
Note
LAPACK convergence failure uses Uni20's error policy; modified workspaces are not rolled back and no partial-result API is provided.
compute_right_vectors: If false, vector elements are unchanged and their dimensions are ignored; a tensor of a supported type is still required.

◆ nonsymmetric_eigen() [2/2]

template<uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > RightEigenvectorTensor>
void uni20::linalg::nonsymmetric_eigen ( MatrixTensor &&  matrix_work,
std::span< EigenScalar >  eigenvalues,
RightEigenvectorTensor &&  right_eigenvectors,
bool  compute_right_vectors,
std::optional< Precision >  requested = {} 
)

Apply the destructive nonsymmetric_eigen contract using tensor storage policy.

◆ normalize_backend_selector() [1/2]

template<class Backend >
requires (!is_backend_list_v<Backend>)
constexpr auto uni20::linalg::normalize_backend_selector ( Backend &&  backend)
constexpr

Treat a single backend value as a one-entry backend list.

◆ normalize_backend_selector() [2/2]

template<class... Backends>
constexpr auto uni20::linalg::normalize_backend_selector ( backend_list< Backends... >  selector) -> backend_list<Backends...>
constexpr

Return an explicit backend list unchanged.

◆ probe_dispatch_kernel()

template<class BackendSelector , class Op , class... Args>
constexpr KernelTypeAcceptance uni20::linalg::probe_dispatch_kernel ( BackendSelector &&  ,
Op const &  ,
Args &&  ... 
)
constexpr

Probe whether a backend selector can dispatch an operation for the argument types.

This value-oriented convenience overload delegates to probe_dispatch_kernel_types; argument values and backend state are not inspected.

◆ probe_dispatch_kernel_types()

template<class BackendSelector , class Op , class... Args>
consteval KernelTypeAcceptance uni20::linalg::probe_dispatch_kernel_types ( )

Probe whether a backend selector type can dispatch operation argument types.

Returns yes if any backend accepts all runtime instances, maybe if at least one backend may accept an instance, and no otherwise. A single backend type is normalized to a one-entry backend list.

◆ qr() [1/8]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::qr ( async::Async< MatrixTensor > &&  matrix,
std::optional< Precision >  requested = {} 
)

Schedule a consuming reduced real or complex QR factorization using the static Tensor selector.

◆ qr() [2/8]

template<uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::qr ( async::Async< MatrixTensor > const &  matrix,
std::optional< Precision >  requested = {} 
)

Schedule a preserving reduced real or complex QR factorization using the static Tensor selector.

Structured binding yields two independent Async<Tensor> values: auto [q, r] = qr(matrix);.

◆ qr() [3/8]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::qr ( BackendSelector &&  selector,
MatrixTensor &&  matrix,
std::optional< Precision >  requested = {} 
)

Consume an owning real or complex matrix and return its reduced QR factorization through an explicit selector.

An exact column-major host tensor is moved directly into the destructive workspace. Other owning tensor views are materialized.

◆ qr() [4/8]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::qr ( BackendSelector &&  selector,
MatrixTensor const &  matrix,
std::optional< Precision >  requested = {} 
)

Preserve a real or complex matrix and return its reduced QR factorization through an explicit selector.

◆ qr() [5/8]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::qr ( BackendSelector  selector,
async::Async< MatrixTensor > &&  matrix,
std::optional< Precision >  requested = {} 
)

Schedule a consuming reduced real or complex QR factorization through an explicit selector.

Passing the async matrix as an rvalue grants permission to remove its stored owning value. The input writer and both output writers receive any failure that occurs after enrollment.

◆ qr() [6/8]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::qr ( BackendSelector  selector,
async::Async< MatrixTensor > const &  matrix,
std::optional< Precision >  requested = {} 
)

Schedule a preserving reduced real or complex QR factorization through an explicit selector.

The returned Q and R handles have independent output epochs and both receive any unhandled task failure.

◆ qr() [7/8]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2> && detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::qr ( MatrixTensor &&  matrix,
std::optional< Precision >  requested = {} 
)

Consume an owning real or complex matrix and return its reduced QR factorization.

◆ qr() [8/8]

template<uni20::RankedTensorView< 2 > MatrixTensor>
requires detail::DecompositionScalar<uni20::tensor_element_t<MatrixTensor>>
auto uni20::linalg::qr ( MatrixTensor const &  matrix,
std::optional< Precision >  requested = {} 
)

Preserve a real or complex matrix and return its reduced QR factorization.

◆ qr_factorization() [1/2]

template<KernelBackendSelector BackendSelector, class QTensor , class RTensor , class MatrixTensor >
requires detail::CompatibleQrTensors<QTensor, RTensor, MatrixTensor>
void uni20::linalg::qr_factorization ( BackendSelector &&  selector,
QTensor &&  q,
RTensor &&  r,
MatrixTensor &&  matrix_work,
std::optional< Precision >  requested = {} 
)

Compute reduced QR in a destructive input workspace through an explicit selector.

matrix_work is overwritten. For an m x n input, q is prepared with shape m x k and r with shape k x n, where k = min(m,n).

Precondition
The two outputs and input workspace do not overlap.

◆ qr_factorization() [2/2]

template<class QTensor , class RTensor , class MatrixTensor >
requires detail::CompatibleQrTensors<QTensor, RTensor, MatrixTensor>
void uni20::linalg::qr_factorization ( QTensor &&  q,
RTensor &&  r,
MatrixTensor &&  matrix_work,
std::optional< Precision >  requested = {} 
)

Compute reduced QR in a destructive workspace using tensor storage policy.

◆ reduction_axes_are_valid()

template<std::size_t InputRank, std::size_t ReducedRank>
constexpr bool uni20::linalg::reduction_axes_are_valid ( ReductionAxes< InputRank, ReducedRank > const &  axes)
constexprnoexcept

Return whether a reduction-axis descriptor partitions every input axis.

◆ reorder_schur() [1/2]

template<class BackendSelector , uni20::MutableRankedTensorView< 2 > SchurFormTensor, uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void uni20::linalg::reorder_schur ( BackendSelector &&  selector,
SchurFormTensor &&  schur_form,
SchurVectorTensor &&  schur_vectors,
std::size_t  from,
std::size_t  to,
bool  update_vectors 
)

Reorder a Schur form in place, optionally updating its Schur vectors.

Uses LAPACK trexc semantics. from and to are zero-based matrix row indices, not ordinal block numbers. For real forms, an index in the second row of a 2x2 block selects that whole block; the final start row may differ from to because blocks have different sizes. Complex forms move one diagonal entry. The adjusted destination is not returned. Updating Q preserves A = Q * T * adjoint(Q). Previously saved eigenvalue arrays are not updated by this operation.

Precondition
schur_form is n x n in Schur canonical form (as produced by schur), with both indices less than n. Requested vector storage has shape n x n, the same scalar type, and does not overlap the form. With vector updates enabled, it must contain the existing Schur vectors on entry. No output is resized.
Note
A failed real block swap uses Uni20's error policy and may leave the form and vectors partially reordered. There is no rollback. An empty form has no valid reordering indices.
update_vectors: If false, vector elements are unchanged and their dimensions are ignored; a tensor of a supported type is still required.

◆ reorder_schur() [2/2]

template<uni20::MutableRankedTensorView< 2 > SchurFormTensor, uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void uni20::linalg::reorder_schur ( SchurFormTensor &&  schur_form,
SchurVectorTensor &&  schur_vectors,
std::size_t  from,
std::size_t  to,
bool  update_vectors 
)

Apply the in-place reorder_schur contract using tensor storage policy.

◆ scale()

template<class Factor >
uni20::linalg::scale ( Factor  ) -> scale< std::decay_t< Factor > >

Deduce a scaling operation that owns a decayed factor value.

◆ schur() [1/2]

template<class BackendSelector , uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void uni20::linalg::schur ( BackendSelector &&  selector,
MatrixTensor &&  matrix_work,
std::span< EigenScalar >  eigenvalues,
SchurVectorTensor &&  schur_vectors,
bool  compute_vectors 
)

Replace a square matrix by its Schur form and optionally return Schur vectors.

On success, matrix_work holds T and requested schur_vectors hold Q, with A = Q * T * adjoint(Q) for the original matrix A. Real input gives real orthogonal Q and upper quasi-triangular T with 1x1 or 2x2 diagonal blocks. Complex input gives unitary Q and upper triangular T. Schur vectors are not in general eigenvectors. Eigenvalues follow the diagonal block order; no sorting is requested.

Precondition
matrix_work is n x n, and eigenvalues has length n with scalar type uni20::complex<make_real_t<matrix_scalar>>. Requested vectors have shape n x n and the same scalar type as the matrix. Work and output storage must not overlap; no output is resized.
Note
LAPACK convergence failure uses Uni20's error policy; modified workspaces are not rolled back and no partial-result API is provided.
compute_vectors: If false, vector elements are unchanged and their dimensions are ignored; a tensor of a supported type is still required.

◆ schur() [2/2]

template<uni20::MutableRankedTensorView< 2 > MatrixTensor, class EigenScalar , uni20::MutableRankedTensorView< 2 > SchurVectorTensor>
void uni20::linalg::schur ( MatrixTensor &&  matrix_work,
std::span< EigenScalar >  eigenvalues,
SchurVectorTensor &&  schur_vectors,
bool  compute_vectors 
)

Apply the destructive schur contract using tensor storage policy.

◆ select_backend()

template<class Operation , class FirstTensor , class... RestTensors>
constexpr auto uni20::linalg::select_backend ( Operation const &  operation,
FirstTensor const &  ,
RestTensors const &  ... 
)
constexpr

Select the default backend list for an operation on Tensor operands.

Tensor values are accepted for operation-front-end ergonomics but selector resolution depends only on their static types and the operation value.

◆ select_backend_for()

template<class FirstTensor , class... RestTensors, class Operation >
constexpr auto uni20::linalg::select_backend_for ( Operation const &  operation)
constexpr

Resolve the immutable backend selector for Tensor operand types.

Backend-bound operands with storage policies must use one common policy; backend-neutral storage operands are ignored when finding that policy. A user backend_selector_override completely replaces selector resolution. Otherwise a Uni20 backend_selector_default may compose an operation-specific list from the storage policy's general selector. Tensor adaptors without storage policies must expose a static backend_selector().

◆ select_backend_for_storage()

template<class StoragePolicy , class Operation >
constexpr auto uni20::linalg::select_backend_for_storage ( Operation const &  operation)
constexpr

Resolve a backend selector directly from one storage policy.

This overload is useful for an operation backend that delegates lower-level work through another operation-specific selector. User overrides and Uni20 defaults have the same priority as ordinary tensor-based selection.

Template Parameters
StoragePolicyStorage policy governing the nested operation.
Parameters
operationOperation whose selector is requested.
Returns
Resolved backend selector value.

◆ select_svd_truncation()

template<uni20::Real Real>
auto uni20::linalg::select_svd_truncation ( std::span< Real const >  singular_values,
SvdTruncationPolicy< Real > const &  policy = {} 
) -> SvdTruncationInfo<Real>

Select a retained prefix from descending singular values.

This is the common numerical policy layer used by dense and symmetry-sector SVD. The input must contain finite, nonnegative singular values in descending order.

Parameters
singular_valuesSingular values in descending order.
policyRank, cutoff, and discarded-weight criteria.
Returns
Truncation statistics including the selected prefix extent.

◆ self_adjoint_eigh() [1/4]

template<KernelBackendSelector BackendSelector, uni20::MutableRankedTensorView< 1 > EigenvalueTensor, uni20::MutableRankedTensorView< 2 > MatrixTensor>
void uni20::linalg::self_adjoint_eigh ( BackendSelector &&  selector,
EigenvalueTensor &&  eigenvalues,
MatrixTensor &&  matrix_work,
SelfAdjointEighOptions  options = {},
std::optional< Precision >  requested = {} 
)

Compute an in-place self-adjoint eigensystem through an explicit selector.

The selected triangle of matrix_work is read. LAPACK destroys the matrix input; when vectors are requested, its columns contain the normalized eigenvectors on return. eigenvalues is resized when its output policy permits.

Precondition
Eigenvalue and matrix storage do not overlap.

◆ self_adjoint_eigh() [2/4]

template<uni20::MutableRankedTensorView< 1 > EigenvalueTensor, uni20::MutableRankedTensorView< 2 > MatrixTensor>
void uni20::linalg::self_adjoint_eigh ( EigenvalueTensor &&  eigenvalues,
MatrixTensor &&  matrix_work,
SelfAdjointEighOptions  options = {},
std::optional< Precision >  requested = {} 
)

Compute an in-place self-adjoint eigensystem using tensor storage policy.

◆ self_adjoint_eigh() [3/4]

template<KernelBackendSelector Selector, MutableRankedTensorView< 1 > V, MutableRankedTensorView< 2 > A>
void uni20::linalg::self_adjoint_eigh ( Selector &&  selector,
V &&  eigenvalues,
A &&  matrix_work,
Precision  p,
SelfAdjointEighOptions  options = {} 
)

Compute a destructive decomposition at explicit precision with optional output settings.

◆ self_adjoint_eigh() [4/4]

template<MutableRankedTensorView< 1 > V, MutableRankedTensorView< 2 > A>
void uni20::linalg::self_adjoint_eigh ( V &&  eigenvalues,
A &&  matrix_work,
Precision  p,
SelfAdjointEighOptions  options = {} 
)

Compute a destructive decomposition at explicit precision with optional output settings.

◆ set_matrix() [1/4]

template<uni20::AsyncTensorOutput MatrixTensor, class Diagonal , class OffDiagonal >
requires uni20::MutableRankedTensorView<MatrixTensor, 2> && AsyncOperationScalar<Diagonal, uni20::tensor_element_t<MatrixTensor>> && AsyncOperationScalar<OffDiagonal, uni20::tensor_element_t<MatrixTensor>>
void uni20::linalg::set_matrix ( async::Async< MatrixTensor > &  matrix,
Diagonal &&  diagonal,
OffDiagonal &&  off_diagonal,
MatrixRegion  region = MatrixRegion::All 
)

Schedule structured matrix initialization using static Tensor policy.

◆ set_matrix() [2/4]

template<class BackendSelector , uni20::MutableRankedTensorView< 2 > MatrixTensor, class Scalar >
void uni20::linalg::set_matrix ( BackendSelector &&  selector,
MatrixTensor &&  matrix,
Scalar  diagonal,
Scalar  off_diagonal,
MatrixRegion  region = MatrixRegion::All 
)

Set diagonal and off-diagonal entries in a selected matrix region.

Selected entries with row == column receive diagonal; other selected entries receive off_diagonal. Upper and Lower both include the diagonal. Entries outside the region are unchanged. Rectangular matrices are allowed; no resize occurs, and an empty matrix has no entries to write.

Note
region: All entries by default, or the inclusive upper/lower triangle.

◆ set_matrix() [3/4]

template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput MatrixTensor, class Diagonal , class OffDiagonal >
requires uni20::MutableRankedTensorView<MatrixTensor, 2> && AsyncOperationScalar<Diagonal, uni20::tensor_element_t<MatrixTensor>> && AsyncOperationScalar<OffDiagonal, uni20::tensor_element_t<MatrixTensor>>
void uni20::linalg::set_matrix ( BackendSelector  selector,
async::Async< MatrixTensor > &  matrix,
Diagonal &&  diagonal,
OffDiagonal &&  off_diagonal,
MatrixRegion  region = MatrixRegion::All 
)

Schedule structured matrix initialization through an explicit selector.

The matrix is asynchronous; diagonal values may be immediate or Async scalars.

◆ set_matrix() [4/4]

template<uni20::MutableRankedTensorView< 2 > MatrixTensor, class Scalar >
void uni20::linalg::set_matrix ( MatrixTensor &&  matrix,
Scalar  diagonal,
Scalar  off_diagonal,
MatrixRegion  region = MatrixRegion::All 
)

Apply the set_matrix region contract using the matrix storage's backend selector.

◆ singular_value_decomposition() [1/4]

template<KernelBackendSelector BackendSelector, uni20::MutableRankedTensorView< 1 > SingularValueTensor, uni20::MutableRankedTensorView< 2 > LeftTensor, uni20::MutableRankedTensorView< 2 > RightAdjointTensor, uni20::MutableRankedTensorView< 2 > MatrixTensor>
void uni20::linalg::singular_value_decomposition ( BackendSelector &&  selector,
SingularValueTensor &&  singular_values,
LeftTensor &&  left_singular_vectors,
RightAdjointTensor &&  right_singular_vectors_adjoint,
MatrixTensor &&  matrix_work,
SvdOptions  options = {},
std::optional< Precision >  requested = {} 
)

Compute a destructive exact SVD through an explicit selector.

matrix_work is overwritten. Singular values are returned in descending order. The right factor is Vh, the transpose for real inputs and conjugate transpose for complex inputs. The workspace and outputs must satisfy the selected backend: native LAPACK requires column-major operands; MPFR/MPC packs logical host elements.

Precondition
Output storage and matrix workspace do not overlap.

◆ singular_value_decomposition() [2/4]

template<KernelBackendSelector Selector, MutableRankedTensorView< 1 > V, MutableRankedTensorView< 2 > L, MutableRankedTensorView< 2 > R, MutableRankedTensorView< 2 > A>
void uni20::linalg::singular_value_decomposition ( Selector &&  selector,
V &&  values,
L &&  left,
R &&  right,
A &&  matrix_work,
Precision  p,
SvdOptions  options = {} 
)

Compute a destructive decomposition at explicit precision with optional output settings.

◆ singular_value_decomposition() [3/4]

template<uni20::MutableRankedTensorView< 1 > SingularValueTensor, uni20::MutableRankedTensorView< 2 > LeftTensor, uni20::MutableRankedTensorView< 2 > RightAdjointTensor, uni20::MutableRankedTensorView< 2 > MatrixTensor>
void uni20::linalg::singular_value_decomposition ( SingularValueTensor &&  singular_values,
LeftTensor &&  left_singular_vectors,
RightAdjointTensor &&  right_singular_vectors_adjoint,
MatrixTensor &&  matrix_work,
SvdOptions  options = {},
std::optional< Precision >  requested = {} 
)

Compute a destructive exact SVD using tensor storage policy.

Native LAPACK requires writable column-major operands; MPFR/MPC packs logical host elements.

◆ singular_value_decomposition() [4/4]

template<MutableRankedTensorView< 1 > V, MutableRankedTensorView< 2 > L, MutableRankedTensorView< 2 > R, MutableRankedTensorView< 2 > A>
void uni20::linalg::singular_value_decomposition ( V &&  values,
L &&  left,
R &&  right,
A &&  matrix_work,
Precision  p,
SvdOptions  options = {} 
)

Compute a destructive decomposition at explicit precision with optional output settings.

◆ singular_values() [1/8]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::singular_values ( async::Async< MatrixTensor > &&  matrix,
std::optional< Precision >  requested = {} 
)

Schedule consuming exact singular values using the static Tensor selector.

◆ singular_values() [2/8]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::singular_values ( async::Async< MatrixTensor > const &  matrix,
std::optional< Precision >  requested = {} 
)

Schedule preserving exact singular values using the static Tensor selector.

◆ singular_values() [3/8]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::singular_values ( BackendSelector &&  selector,
MatrixTensor &&  matrix,
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return its exact singular values through an explicit selector.

The input allocation is used directly as destructive workspace when its layout is LAPACK-compatible.

◆ singular_values() [4/8]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::singular_values ( BackendSelector &&  selector,
MatrixTensor const &  matrix,
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return its exact singular values through an explicit selector.

◆ singular_values() [5/8]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::singular_values ( BackendSelector  selector,
async::Async< MatrixTensor > &&  matrix,
std::optional< Precision >  requested = {} 
)

Schedule consuming exact singular values through an explicit selector.

◆ singular_values() [6/8]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::singular_values ( BackendSelector  selector,
async::Async< MatrixTensor > const &  matrix,
std::optional< Precision >  requested = {} 
)

Schedule preserving exact singular values through an explicit selector.

◆ singular_values() [7/8]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::singular_values ( MatrixTensor &&  matrix,
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return its exact singular values.

◆ singular_values() [8/8]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::singular_values ( MatrixTensor const &  matrix,
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return its exact singular values.

◆ slogdet()

template<class... Args>
requires requires(Args&&... args) { slogdet_with_info(std::forward<Args>(args)...); }
auto uni20::linalg::slogdet ( Args &&...  args)

Return the log-determinant, including conventional zero for singular matrices.

Unresolved/nonfinite outcomes use the terminal numerical-error policy.

◆ slogdet_with_info() [1/4]

template<RankedTensorView< 2 > A, class... Options>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::slogdet_with_info ( A const &  a,
Options const &...  options 
)

Factor and reduce with the default backends for the owned host workspace.

◆ slogdet_with_info() [2/4]

template<KernelBackendSelector Backend, RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::slogdet_with_info ( Backend &&  backend,
A const &  a,
Precision  p,
SolveOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Factor once at explicit finite precision and return a recoverable log-determinant.

◆ slogdet_with_info() [3/4]

template<KernelBackendSelector Backend, RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::slogdet_with_info ( Backend &&  backend,
A const &  a,
SolveOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Factor once at native or inferred finite precision and reduce its diagonal.

Empty input gives phase one and log zero. Singular gives phase zero, log negative infinity and a singular diagnostic; threshold rejection or nonfinite arithmetic gives no determinant value.

◆ slogdet_with_info() [4/4]

template<RealOrComplex S>
LogDeterminantResult< S > uni20::linalg::slogdet_with_info ( LuFactorization< S > const &  factor)

Reduce completed factors in O(n), without refactoring or changing them.

Uses factor precision and scaled complex magnitudes. A reduction failure reports nonfinite_result and leaves the factors usable.

◆ solve() [1/4]

template<uni20::RankedTensorView< 2 > CoefficientTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<CoefficientTensor>> && std::same_as<uni20::tensor_element_t<CoefficientTensor>, uni20::tensor_element_t<RhsTensor>>
auto uni20::linalg::solve ( async::Async< CoefficientTensor > const &  coefficients,
async::Async< RhsTensor > const &  right_hand_sides,
std::optional< Precision >  p = {} 
)

Schedule a preserving dense general solve using static Tensor policy.

◆ solve() [2/4]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > CoefficientTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<CoefficientTensor>> && std::same_as<uni20::tensor_element_t<CoefficientTensor>, uni20::tensor_element_t<RhsTensor>>
auto uni20::linalg::solve ( BackendSelector &&  selector,
CoefficientTensor const &  coefficients,
RhsTensor const &  right_hand_sides,
std::optional< Precision >  requested = {} 
)

Preserve inputs and return the dense solution through an explicit selector.

Coefficients and right-hand sides are materialized into owning column-major host work matrices before destructive dispatch.

◆ solve() [3/4]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > CoefficientTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<CoefficientTensor>> && std::same_as<uni20::tensor_element_t<CoefficientTensor>, uni20::tensor_element_t<RhsTensor>>
auto uni20::linalg::solve ( BackendSelector  selector,
async::Async< CoefficientTensor > const &  coefficients,
async::Async< RhsTensor > const &  right_hand_sides,
std::optional< Precision >  p = {} 
)

Schedule a preserving dense general solve through an explicit selector.

Both inputs remain readable. The result is an independent owning column-major host matrix whose failure state is published by the task.

◆ solve() [4/4]

template<uni20::RankedTensorView< 2 > CoefficientTensor, uni20::RankedTensorView< 2 > RhsTensor>
requires uni20::RealOrComplex<uni20::tensor_element_t<CoefficientTensor>> && std::same_as<uni20::tensor_element_t<CoefficientTensor>, uni20::tensor_element_t<RhsTensor>>
auto uni20::linalg::solve ( CoefficientTensor const &  coefficients,
RhsTensor const &  right_hand_sides,
std::optional< Precision >  requested = {} 
)

Preserve inputs and return an owning column-major host solution.

◆ solve_diagnostics_with_info()

template<RealOrComplex S, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B, refinement_detail::HostMatrix X>
requires (Complex<S> == Complex<tensor_element_t<A>> && Complex<S> == Complex<tensor_element_t<B>> && Complex<S> == Complex<tensor_element_t<X>>)
SolveDiagnosticsResult< S > uni20::linalg::solve_diagnostics_with_info ( A const &  a,
B const &  b,
X const &  x,
Precision  p 
)

Evaluate b - A*x and normwise/componentwise backward error in scalar S at p.

Requires square A and matching rank-two RHS/solution shapes. All inputs are preserved and may have different scalar types of the same real/complex kind. Logical host accessors are respected. Conversion, products, sums and complex magnitudes use p. Nonfinite conversion or arithmetic, including diagnostic denominator overflow, is recoverable failure, with no published residual or columns. Zero RHS columns and zero-order systems do not read numerical values. These diagnostics are not certified bounds and can be optimistic near underflow.

◆ solve_inplace() [1/4]

template<uni20::AsyncTensorOutput CoefficientTensor, uni20::AsyncTensorOutput RhsTensor>
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
void uni20::linalg::solve_inplace ( async::Async< CoefficientTensor > &  coefficients,
async::Async< RhsTensor > &  right_hand_sides,
std::optional< Precision >  p = {} 
)

Schedule a destructive dense general solve using static Tensor policy.

Precondition
The two async workspaces have distinct epoch queues and nonoverlapping storage.

◆ solve_inplace() [2/4]

template<KernelBackendSelector BackendSelector, class CoefficientTensor , class RhsTensor >
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
void uni20::linalg::solve_inplace ( BackendSelector &&  selector,
CoefficientTensor &&  coefficients,
RhsTensor &&  right_hand_sides,
std::optional< Precision >  requested = {} 
)

Solve a general system in destructive coefficient and RHS workspaces.

On return, right_hand_sides contains the solution. The coefficient workspace is overwritten with backend factorization data. Any numerical failure is a terminal error. An N x 0 right-hand side is a vacuous no-op that preserves both workspaces without testing coefficient singularity.

Precondition
The two workspaces do not overlap.

◆ solve_inplace() [3/4]

template<KernelBackendSelector BackendSelector, uni20::AsyncTensorOutput CoefficientTensor, uni20::AsyncTensorOutput RhsTensor>
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
void uni20::linalg::solve_inplace ( BackendSelector  selector,
async::Async< CoefficientTensor > &  coefficients,
async::Async< RhsTensor > &  right_hand_sides,
std::optional< Precision >  p = {} 
)

Schedule a destructive dense general solve through an explicit selector.

On success, right_hand_sides contains the solution and coefficients contains backend factorization data. Both writer epochs receive any task failure.

Precondition
The two async workspaces have distinct epoch queues and nonoverlapping storage.

◆ solve_inplace() [4/4]

template<class CoefficientTensor , class RhsTensor >
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
void uni20::linalg::solve_inplace ( CoefficientTensor &&  coefficients,
RhsTensor &&  right_hand_sides,
std::optional< Precision >  p = {} 
)

Solve a general system in destructive workspaces using storage policy.

◆ solve_inplace_with_info() [1/4]

template<class A , class B >
requires detail::CompatibleLinearSolveTensors<A, B>
SolveInfo uni20::linalg::solve_inplace_with_info ( A &&  a,
B &&  b,
Precision  p,
SolveOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Solve at explicit precision using storage-selected backends.

◆ solve_inplace_with_info() [2/4]

template<KernelBackendSelector BackendSelector, class A , class B >
requires detail::CompatibleLinearSolveTensors<A, B>
SolveInfo uni20::linalg::solve_inplace_with_info ( BackendSelector &&  selector,
A &&  a,
B &&  b,
Precision  p,
SolveOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Solve in place at an explicit operation precision, independent of workspace defaults.

The backend converts values at p. A successful nonempty solve records p on owning workspaces; views and empty no-ops preserve existing defaults. For fixed scalar types, p must exactly match their native precision.

◆ solve_inplace_with_info() [3/4]

template<KernelBackendSelector BackendSelector, class CoefficientTensor , class RhsTensor >
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
SolveInfo uni20::linalg::solve_inplace_with_info ( BackendSelector &&  selector,
CoefficientTensor &&  coefficients,
RhsTensor &&  right_hand_sides,
SolveOptions< uni20::make_real_t< uni20::tensor_element_t< CoefficientTensor > > > const &  options = {} 
)

Solve in destructive workspaces and return numerical diagnostics.

The solution is valid only on success. On numerical failure either workspace may be modified; no fallback backend is attempted. Unsupported backends decline without modifying workspaces or diagnostics. Zero-order systems and N x 0 RHS matrices are successful no-ops, without inspecting matrix values. Shape and option errors remain terminal.

Precondition
The two workspaces do not overlap.
Parameters
selectorBackend or ordered backend list used to select the solve implementation.
coefficientsSquare N x N coefficient workspace, overwritten with backend-dependent elimination data.
right_hand_sidesN x R RHS workspace, overwritten with the solution on success.
optionsPivot policy in the coefficient scalar's real precision; the zero default rejects exact zero pivots only.
Returns
Numerical status and, for singular or small-pivot failure, the zero-based elimination column. Success provides no residual bound or conditioning guarantee.

◆ solve_inplace_with_info() [4/4]

template<class CoefficientTensor , class RhsTensor >
requires detail::CompatibleLinearSolveTensors<CoefficientTensor, RhsTensor>
SolveInfo uni20::linalg::solve_inplace_with_info ( CoefficientTensor &&  coefficients,
RhsTensor &&  right_hand_sides,
SolveOptions< uni20::make_real_t< uni20::tensor_element_t< CoefficientTensor > > > const &  options = {} 
)

Return numerical solve diagnostics using storage-selected backends.

Uses the same shape, nonoverlap, mutation and failure contract as the explicit-selector overload. The default pivot tolerance is zero.

Returns
Numerical diagnostics as defined by SolveInfo; success does not certify accuracy.

◆ svd() [1/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd ( async::Async< Matrix > &&  matrix,
Precision  p,
SvdOptions  options = {} 
)

Compute SVD at explicit working precision with optional output settings.

◆ svd() [2/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd ( async::Async< Matrix > const &  matrix,
Precision  p,
SvdOptions  options = {} 
)

Compute SVD at explicit working precision with optional output settings.

◆ svd() [3/14]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::svd ( async::Async< MatrixTensor > &&  matrix,
SvdOptions  options = {},
std::optional< Precision >  requested = {} 
)

Schedule a consuming exact SVD using the static Tensor selector.

The stored owning matrix is taken from its epoch. Compatible reduced factors may adopt that allocation, and the input timeline no longer contains a readable matrix on success.

◆ svd() [4/14]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd ( async::Async< MatrixTensor > const &  matrix,
SvdOptions  options = {},
std::optional< Precision >  requested = {} 
)

Schedule a preserving exact SVD using the static Tensor selector.

Structured binding yields three independent Async<Tensor> values: auto [u, s, vh] = svd(matrix);.

◆ svd() [5/14]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::svd ( BackendSelector &&  selector,
MatrixTensor &&  matrix,
SvdOptions  options = {},
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return its exact singular value decomposition.

The supplied selector controls the destructive SVD dispatch. Compatible reduced factors may adopt the input allocation through a LAPACK overwrite job.

◆ svd() [6/14]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd ( BackendSelector &&  selector,
MatrixTensor const &  matrix,
SvdOptions  options = {},
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return its exact singular value decomposition through an explicit selector.

The default reduced decomposition returns U with shape m x k, s with length k, and Vh with shape k x n, where k = min(m,n). Full left and right extents are independently selectable.

◆ svd() [7/14]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::svd ( BackendSelector  selector,
async::Async< MatrixTensor > &&  matrix,
SvdOptions  options = {},
std::optional< Precision >  requested = {} 
)

Schedule a consuming exact SVD through an explicit selector.

◆ svd() [8/14]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd ( BackendSelector  selector,
async::Async< MatrixTensor > const &  matrix,
SvdOptions  options = {},
std::optional< Precision >  requested = {} 
)

Schedule a preserving exact SVD through an explicit selector.

The returned U, s, and Vh handles have independent output epochs and may be passed directly to subsequent async operations. All three receive any unhandled task failure.

◆ svd() [9/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd ( Matrix &&  matrix,
Precision  p,
SvdOptions  options = {} 
)

Compute SVD at explicit working precision with optional output settings.

◆ svd() [10/14]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::svd ( MatrixTensor &&  matrix,
SvdOptions  options = {},
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return its exact singular value decomposition.

A directly addressable column-major input becomes LAPACK work storage. When either requested factor is reduced, LAPACK may write that factor into the input allocation and Uni20 adopts it under a strided owning descriptor that preserves the leading dimension and unused storage tail. Other inputs are materialized. Passing an rvalue grants permission to consume storage but does not guarantee allocation reuse.

Warning
Existing views into transferred input storage are invalidated by the ordinary C++ moved-from owner rules.

◆ svd() [11/14]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd ( MatrixTensor const &  matrix,
SvdOptions  options = {},
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return its exact singular value decomposition.

Zero inner extent returns empty reduced factors; a requested unconstrained full left or right factor is the identity matrix.

◆ svd() [12/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd ( Selector &&  selector,
async::Async< Matrix > &&  matrix,
Precision  p,
SvdOptions  options = {} 
)

Compute SVD at explicit working precision with optional output settings.

◆ svd() [13/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd ( Selector &&  selector,
async::Async< Matrix > const &  matrix,
Precision  p,
SvdOptions  options = {} 
)

Compute SVD at explicit working precision with optional output settings.

◆ svd() [14/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd ( Selector &&  selector,
Matrix &&  matrix,
Precision  p,
SvdOptions  options = {} 
)

Compute SVD at explicit working precision with optional output settings.

◆ svd_least_squares()

template<class... Args>
requires requires(Args&&... args) { svd_least_squares_with_info(std::forward<Args>(args)...); }
auto uni20::linalg::svd_least_squares ( Args &&...  args)

Return a preserving truncated-SVD solution; numerical failure uses the ordinary terminal error policy.

◆ svd_least_squares_with_info() [1/4]

template<RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::svd_least_squares_with_info ( A const &  a,
B const &  b,
Precision  p,
SvdLeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Use the ordinary backend selector for the owning host result.

◆ svd_least_squares_with_info() [2/4]

template<RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::svd_least_squares_with_info ( A const &  a,
B const &  b,
SvdLeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Infer precision and select the ordinary host-result backends.

◆ svd_least_squares_with_info() [3/4]

template<KernelBackendSelector Backend, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::svd_least_squares_with_info ( Backend &&  backend,
A const &  a,
B const &  b,
Precision  p,
SvdLeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Compute a minimum-norm solution after singular-value truncation for rectangular A.

Both inputs are preserved. A finite precision is required; fixed scalars accept their native precision only. Runtime inputs and the cutoff convert in the backend. Rank-deficient and underdetermined inputs are supported. Rank is computed even without RHS columns; zero unknowns return the norms of B, and zero rows give the zero solution.

Returns
Owning host solution and residuals on success, otherwise only failure diagnostics.

◆ svd_least_squares_with_info() [4/4]

template<KernelBackendSelector Backend, RankedTensorView< 2 > A, RankedTensorView< 2 > B>
requires RealOrComplex<tensor_element_t<A>> && std::same_as<tensor_element_t<A>, tensor_element_t<B>>
auto uni20::linalg::svd_least_squares_with_info ( Backend &&  backend,
A const &  a,
B const &  b,
SvdLeastSquaresOptions< make_real_t< tensor_element_t< A > > > const &  options = {} 
)

Infer working precision from input defaults, requiring matching finite defaults when both exist.

◆ svd_left() [1/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_left ( async::Async< Matrix > &&  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute left SVD factors at explicit working precision with optional output settings.

◆ svd_left() [2/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_left ( async::Async< Matrix > const &  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute left SVD factors at explicit working precision with optional output settings.

◆ svd_left() [3/14]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::svd_left ( async::Async< MatrixTensor > &&  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Schedule consuming left singular vectors using the static Tensor selector.

◆ svd_left() [4/14]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd_left ( async::Async< MatrixTensor > const &  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Schedule preserving left singular vectors using the static Tensor selector.

◆ svd_left() [5/14]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::svd_left ( BackendSelector &&  selector,
MatrixTensor &&  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return exact left singular vectors and singular values.

A reduced left factor may adopt the input allocation through LAPACK ‘JOBU='O’`. A full factor is allocated separately.

◆ svd_left() [6/14]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd_left ( BackendSelector &&  selector,
MatrixTensor const &  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return exact left singular vectors and singular values.

◆ svd_left() [7/14]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::svd_left ( BackendSelector  selector,
async::Async< MatrixTensor > &&  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Schedule consuming left singular vectors through an explicit selector.

◆ svd_left() [8/14]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd_left ( BackendSelector  selector,
async::Async< MatrixTensor > const &  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Schedule preserving left singular vectors through an explicit selector.

◆ svd_left() [9/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_left ( Matrix &&  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute left SVD factors at explicit working precision with optional output settings.

◆ svd_left() [10/14]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::svd_left ( MatrixTensor &&  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return exact left singular vectors and singular values.

◆ svd_left() [11/14]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd_left ( MatrixTensor const &  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return exact left singular vectors and singular values.

◆ svd_left() [12/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_left ( Selector &&  selector,
async::Async< Matrix > &&  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute left SVD factors at explicit working precision with optional output settings.

◆ svd_left() [13/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_left ( Selector &&  selector,
async::Async< Matrix > const &  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute left SVD factors at explicit working precision with optional output settings.

◆ svd_left() [14/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_left ( Selector &&  selector,
Matrix &&  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute left SVD factors at explicit working precision with optional output settings.

◆ svd_right() [1/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_right ( async::Async< Matrix > &&  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute right SVD factors at explicit working precision with optional output settings.

◆ svd_right() [2/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_right ( async::Async< Matrix > const &  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute right SVD factors at explicit working precision with optional output settings.

◆ svd_right() [3/14]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::svd_right ( async::Async< MatrixTensor > &&  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Schedule consuming right singular vectors using the static Tensor selector.

◆ svd_right() [4/14]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd_right ( async::Async< MatrixTensor > const &  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Schedule preserving right singular vectors using the static Tensor selector.

◆ svd_right() [5/14]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::svd_right ( BackendSelector &&  selector,
MatrixTensor &&  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return exact singular values and right singular vectors.

A reduced right factor may adopt the input allocation through LAPACK ‘JOBVT='O’`. A full factor is allocated separately.

◆ svd_right() [6/14]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd_right ( BackendSelector &&  selector,
MatrixTensor const &  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return exact singular values and right singular vectors.

◆ svd_right() [7/14]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::svd_right ( BackendSelector  selector,
async::Async< MatrixTensor > &&  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Schedule consuming right singular vectors through an explicit selector.

◆ svd_right() [8/14]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd_right ( BackendSelector  selector,
async::Async< MatrixTensor > const &  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Schedule preserving right singular vectors through an explicit selector.

◆ svd_right() [9/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_right ( Matrix &&  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute right SVD factors at explicit working precision with optional output settings.

◆ svd_right() [10/14]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::svd_right ( MatrixTensor &&  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return exact singular values and right singular vectors.

◆ svd_right() [11/14]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::svd_right ( MatrixTensor const &  matrix,
SvdVectorExtent  extent = SvdVectorExtent::Reduced,
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return exact singular values and right singular vectors.

◆ svd_right() [12/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_right ( Selector &&  selector,
async::Async< Matrix > &&  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute right SVD factors at explicit working precision with optional output settings.

◆ svd_right() [13/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_right ( Selector &&  selector,
async::Async< Matrix > const &  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute right SVD factors at explicit working precision with optional output settings.

◆ svd_right() [14/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::svd_right ( Selector &&  selector,
Matrix &&  matrix,
Precision  p,
SvdVectorExtent  extent = SvdVectorExtent::Reduced 
)

Compute right SVD factors at explicit working precision with optional output settings.

◆ symmetric_tridiagonal_eigen() [1/2]

template<class BackendSelector , uni20::LapackReal Scalar, uni20::MutableRankedTensorView< 2 > EigenvectorTensor>
void uni20::linalg::symmetric_tridiagonal_eigen ( BackendSelector &&  selector,
std::span< Scalar >  diagonal,
std::span< Scalar >  subdiagonal,
EigenvectorTensor &&  eigenvectors,
bool  compute_vectors 
)

Overwrite a real symmetric tridiagonal matrix with its eigensystem.

On success, diagonal contains eigenvalues in ascending order and subdiagonal is destroyed. With compute_vectors == true, column j of eigenvectors is the orthonormal eigenvector of the original tridiagonal matrix associated with diagonal[j]. Existing vector entries are ignored; this does not accumulate a prior reduction from a dense matrix.

Precondition
For n = diagonal.size(), subdiagonal length is n - 1 (zero when n == 0). Requested vectors have shape n x n and the same real scalar type. The spans and requested vector storage must not overlap. No output is resized.
Note
Empty input is a no-op. LAPACK convergence failure uses Uni20's error policy; modified workspaces are not rolled back and no partial-result API is provided.
compute_vectors: If false, vector elements are unchanged and their dimensions are ignored; a tensor of a supported type must still be supplied.

◆ symmetric_tridiagonal_eigen() [2/2]

template<uni20::LapackReal Scalar, uni20::MutableRankedTensorView< 2 > EigenvectorTensor>
void uni20::linalg::symmetric_tridiagonal_eigen ( std::span< Scalar >  diagonal,
std::span< Scalar >  subdiagonal,
EigenvectorTensor &&  eigenvectors,
bool  compute_vectors 
)

Apply the destructive symmetric_tridiagonal_eigen contract using host tensor backend policy.

◆ transform_inplace_op()

template<class Function >
uni20::linalg::transform_inplace_op ( Function  ) -> transform_inplace_op< std::decay_t< Function > >

Deduce an update operation that owns a decayed callable value.

◆ transform_op()

template<class Function >
uni20::linalg::transform_op ( Function  ) -> transform_op< std::decay_t< Function > >

Deduce an overwrite operation that owns a decayed callable value.

◆ truncated_svd() [1/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::truncated_svd ( async::Async< Matrix > &&  matrix,
Precision  p,
SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > >  policy = {} 
)

Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.

◆ truncated_svd() [2/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::truncated_svd ( async::Async< Matrix > const &  matrix,
Precision  p,
SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > >  policy = {} 
)

Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.

◆ truncated_svd() [3/14]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::truncated_svd ( async::Async< MatrixTensor > &&  matrix,
detail::svd_truncation_policy_t< MatrixTensor >  policy = {},
std::optional< Precision >  requested = {} 
)

Schedule a consuming truncated SVD using the static Tensor selector.

◆ truncated_svd() [4/14]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::truncated_svd ( async::Async< MatrixTensor > const &  matrix,
detail::svd_truncation_policy_t< MatrixTensor >  policy = {},
std::optional< Precision >  requested = {} 
)

Schedule a preserving truncated SVD using the static Tensor selector.

◆ truncated_svd() [5/14]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::truncated_svd ( BackendSelector &&  selector,
MatrixTensor &&  matrix,
SvdTruncationPolicy< uni20::make_real_t< uni20::tensor_element_t< MatrixTensor > > >  policy = {},
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return a truncated reduced SVD through an explicit selector.

The exact SVD may reuse compatible input storage as destructive workspace. Truncation returns right-sized owning factors and does not promise that the transferred allocation is retained.

◆ truncated_svd() [6/14]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::truncated_svd ( BackendSelector &&  selector,
MatrixTensor const &  matrix,
SvdTruncationPolicy< uni20::make_real_t< uni20::tensor_element_t< MatrixTensor > > >  policy = {},
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return a truncated reduced SVD through an explicit selector.

◆ truncated_svd() [7/14]

template<KernelBackendSelector BackendSelector, class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedTensorView<MatrixTensor, 2>
auto uni20::linalg::truncated_svd ( BackendSelector  selector,
async::Async< MatrixTensor > &&  matrix,
detail::svd_truncation_policy_t< MatrixTensor >  policy = {},
std::optional< Precision >  requested = {} 
)

Schedule a consuming truncated SVD through an explicit selector.

◆ truncated_svd() [8/14]

template<KernelBackendSelector BackendSelector, uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::truncated_svd ( BackendSelector  selector,
async::Async< MatrixTensor > const &  matrix,
detail::svd_truncation_policy_t< MatrixTensor >  policy = {},
std::optional< Precision >  requested = {} 
)

Schedule a preserving truncated SVD through an explicit selector.

◆ truncated_svd() [9/14]

template<RankedTensorView< 2 > Matrix>
auto uni20::linalg::truncated_svd ( Matrix &&  matrix,
Precision  p,
SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > >  policy = {} 
)

Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.

◆ truncated_svd() [10/14]

template<class MatrixTensor >
requires uni20::OwningTensor<MatrixTensor> && uni20::MutableRankedImmediateTensorView<MatrixTensor, 2> && (!std::is_lvalue_reference_v<MatrixTensor>) && (!std::is_const_v<std::remove_reference_t<MatrixTensor>>)
auto uni20::linalg::truncated_svd ( MatrixTensor &&  matrix,
SvdTruncationPolicy< uni20::make_real_t< uni20::tensor_element_t< MatrixTensor > > >  policy = {},
std::optional< Precision >  requested = {} 
)

Consume an owning matrix and return a truncated reduced SVD.

◆ truncated_svd() [11/14]

template<uni20::RankedTensorView< 2 > MatrixTensor>
auto uni20::linalg::truncated_svd ( MatrixTensor const &  matrix,
SvdTruncationPolicy< uni20::make_real_t< uni20::tensor_element_t< MatrixTensor > > >  policy = {},
std::optional< Precision >  requested = {} 
)

Preserve a matrix and return a truncated reduced SVD.

◆ truncated_svd() [12/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::truncated_svd ( Selector &&  selector,
async::Async< Matrix > &&  matrix,
Precision  p,
SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > >  policy = {} 
)

Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.

◆ truncated_svd() [13/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::truncated_svd ( Selector &&  selector,
async::Async< Matrix > const &  matrix,
Precision  p,
SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > >  policy = {} 
)

Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.

◆ truncated_svd() [14/14]

template<KernelBackendSelector Selector, RankedTensorView< 2 > Matrix>
auto uni20::linalg::truncated_svd ( Selector &&  selector,
Matrix &&  matrix,
Precision  p,
SvdTruncationPolicy< make_real_t< tensor_element_t< Matrix > > >  policy = {} 
)

Compute and truncate at explicit working precision; cutoff scalars retain their precision rules.

◆ try_dispatch_kernel()

template<class BackendSelector , class Op , class... Args>
requires detail::KernelDispatchTypesAccepted<detail::normalized_backend_selector_t<BackendSelector>, Op, Args...>
bool uni20::linalg::try_dispatch_kernel ( BackendSelector &&  selector,
Op  op,
Args &&...  args 
)

Normalize a selector and try each eligible backend until one performs the operation.

A backend returning a decline result must preserve every input and every fixed or update output, and must produce no externally visible result. An operation that declares an output replaceable may permit provisional output preparation before a decline; later backends receive and may reuse or replace that prepared output. Fixed tensor operands are normalized mdspec descriptors; selected backends perform execution-domain acquisition and mdspan lowering.

Postcondition
On false, inputs and fixed outputs are preserved; replaceable outputs remain valid but may contain provisional backend preparation.

◆ try_kernel() [1/74]

template<MutableRankedTensorView< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<mutable_tensor_mdspec_t<C>> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<tensor_element_t<C>, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
KernelAttempt uni20::linalg::try_kernel ( BlasBackend  backend,
assign_product_op const &  ,
async::shared_storage< C > &  storage,
S const &  alpha,
A &  a,
B &  b 
)

Construct or resize a deferred output before binary80 GEMM.

◆ try_kernel() [2/74]

template<MutableRankedTensorView< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<mutable_tensor_mdspec_t<C>> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<tensor_element_t<C>, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
KernelAttempt uni20::linalg::try_kernel ( BlasBackend  backend,
assign_product_op const &  ,
C &  c,
S const &  alpha,
A &  a,
B &  b 
)

Prepare the host output and lower assignment to binary80 GEMM.

◆ try_kernel() [3/74]

template<MutableRankedMdspecLike< 2 > C, mplapack_binary80_detail::Binary80Scalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<C> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<typename C::value_type, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
KernelAttempt uni20::linalg::try_kernel ( BlasBackend  ,
gemm_op const &  ,
C &  c,
S const &  alpha,
A &  a,
B &  b,
S const &  beta 
)

Pack logical host values and execute GEMM through value-preserving provider conversion.

◆ try_kernel() [4/74]

template<MutableRankedMdspecLike< 2 > C, mpfr_detail::RuntimeScalar S, RankedMdspecLike< 2 > A, RankedMdspecLike< 2 > B>
requires HostWritableMdspec<C> && HostReadableMdspec<A> && HostReadableMdspec<B> && std::same_as<typename C::value_type, S> && std::same_as<typename A::value_type, S> && std::same_as<typename B::value_type, S>
KernelAttempt uni20::linalg::try_kernel ( BlasBackend  ,
gemm_op const &  ,
C &  c,
S const &  alpha,
A &  a,
B &  b,
S const &  beta,
Precision  p 
)

Pack logical host values and execute GEMM at one explicit precision.

◆ try_kernel() [5/74]

template<uni20::MutableRankedMdspecLike< 1 > OutputMdspan, class Scalar , uni20::RankedMdspecLike< 2 > MatrixMdspan, uni20::RankedMdspecLike< 1 > InputMdspan>
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<MatrixMdspan> && uni20::HostReadableMdspec<InputMdspan>
KernelAttempt uni20::linalg::try_kernel ( BlasBackend  ,
gemv_op const &  ,
OutputMdspan &  output,
Scalar  alpha,
MatrixMdspan &  matrix,
InputMdspan &  input,
Scalar  beta 
)

Resolve host access and try BLAS GEMV.

◆ try_kernel() [6/74]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostAssignProductAccess<OutputTensor, LhsMdspan, RhsMdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
assign_product_op const &  ,
async::shared_storage< OutputTensor > &  output_storage,
Scalar  alpha,
LhsMdspan &  lhs,
RhsMdspan &  rhs 
)

Construct or resize a deferred host output and run reference GEMM.

◆ try_kernel() [7/74]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostAssignProductAccess<OutputTensor, LhsMdspan, RhsMdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
assign_product_op const &  ,
OutputTensor &  output,
Scalar  alpha,
LhsMdspan &  lhs,
RhsMdspan &  rhs 
)

Lower a replaceable-output host tensor matrix product to fixed-output GEMM.

◆ try_kernel() [8/74]

template<uni20::MutableMdspecLike Mdspan>
requires uni20::HostWritableMdspec<Mdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
conjugate_inplace_op const &  ,
Mdspan &  mdspan 
)

Resolve host access and conjugate every element.

◆ try_kernel() [9/74]

template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, uni20::MutableRankedMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, uni20::RankedMdspecLike< LhsRank > LhsMdspec, uni20::RankedMdspecLike< RhsRank > RhsMdspec>
requires detail::cpu_contract_backend::HostContractionAccess<OutputMdspec, LhsMdspec, RhsMdspec>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
contract_op< LhsRank, RhsRank, ContractedRank > const &  operation,
OutputMdspec &  output,
Scalar  alpha,
LhsMdspec &  lhs,
RhsMdspec &  rhs,
Scalar  beta 
)

Acquire host access and execute the reference contraction kernel.

◆ try_kernel() [10/74]

template<uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike InputMdspan>
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<InputMdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
copy_op const &  ,
OutputMdspan &  output,
InputMdspan &  input 
)

Resolve host access and copy through the resulting mdspans.

◆ try_kernel() [11/74]

template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires detail::HostGemmMdspanAccess<OutputMdspan, LhsMdspan, RhsMdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
gemm_op const &  ,
OutputMdspan &  output,
Scalar  alpha,
LhsMdspan &  lhs,
RhsMdspan &  rhs,
Scalar  beta 
)

Resolve host access and run reference GEMM.

◆ try_kernel() [12/74]

template<uni20::MutableRankedMdspecLike< 1 > OutputMdspan, uni20::Scalar Scalar, uni20::RankedMdspecLike< 2 > MatrixMdspan, uni20::RankedMdspecLike< 1 > InputMdspan>
requires detail::HostGemvMdspanAccess<OutputMdspan, MatrixMdspan, InputMdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
gemv_op const &  ,
OutputMdspan &  output,
Scalar  alpha,
MatrixMdspan &  matrix,
InputMdspan &  input,
Scalar  beta 
)

Resolve host access and run reference GEMV.

◆ try_kernel() [13/74]

template<class Output , uni20::MdspecLike LhsMdspan, uni20::MdspecLike RhsMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<LhsMdspan> && uni20::HostReadableMdspec<RhsMdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
inner_product_op const &  ,
Output &  output,
LhsMdspan &  lhs,
RhsMdspan &  rhs 
)

Resolve host access and compute an inner product.

◆ try_kernel() [14/74]

template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
least_squares_op const &  ,
X &  x,
A &  a,
B &  b,
std::span< make_real_t< typename A::value_type > >  residuals,
LeastSquaresInfo &  info,
LeastSquaresOptions< make_real_t< typename A::value_type > > const &  options,
P...  precision 
)

Solve by Givens QR; numerical failure completes dispatch without publishing output.

◆ try_kernel() [15/74]

template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && RealOrComplex<typename A::value_type> && has_runtime_precision_v<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
linear_solve_op const &  ,
A &  a,
B &  b,
SolveInfo &  info,
SolveOptions< make_real_t< typename A::value_type > > const &  options,
Precision  p 
)

Convert runtime workspaces, then use reference LU and triangular substitution.

◆ try_kernel() [16/74]

template<uni20::MutableRankedMdspecLike< 2 > CoefficientMdspec, uni20::MutableRankedMdspecLike< 2 > RhsMdspec>
requires uni20::HostWritableMdspec<CoefficientMdspec> && uni20::HostWritableMdspec<RhsMdspec>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
linear_solve_op const &  ,
CoefficientMdspec &  coefficients,
RhsMdspec &  right_hand_sides,
SolveInfo &  info,
SolveOptions< uni20::make_real_t< typename CoefficientMdspec::value_type > > const &  options 
)

Resolve host access and solve a dense general linear system.

◆ try_kernel() [17/74]

template<MutableRankedMdspecLike< 2 > A, class... P>
requires HostWritableMdspec<A> && RealOrComplex<typename A::value_type> && detail::cpu_reference::LuPrecisionArgs<typename A::value_type, P...>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
lu_factor_op const &  ,
A &  a,
std::span< std::size_t >  pivots,
LuNorms< make_real_t< typename A::value_type > > *  norms,
SolveInfo &  info,
SolveOptions< make_real_t< typename A::value_type > > const &  options,
P...  precision 
)

Factor with partial row pivoting, converting runtime values to finite working precision.

◆ try_kernel() [18/74]

template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B, class... P>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && RealOrComplex<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type> && detail::cpu_reference::LuPrecisionArgs<typename A::value_type, P...>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
lu_solve_op const &  ,
A &  a,
std::span< std::size_t const >  pivots,
B &  b,
SolveInfo &  info,
P...  precision 
)

Apply row swaps and triangular substitution, converting runtime RHS values to factor precision.

Precondition
Factors and pivots describe a successful LU and do not overlap the RHS.

◆ try_kernel() [19/74]

template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, uni20::RankedMdspecLike< 2 > InputMdspan, class TimeScalar >
requires uni20::HostWritableMdspec<OutputMdspan> && uni20::HostReadableMdspec<InputMdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
matrix_exponential_op const &  ,
OutputMdspan &  output,
InputMdspan &  input,
TimeScalar  time 
)

Resolve host access and compute a matrix exponential.

◆ try_kernel() [20/74]

template<class Output , uni20::RankedMdspecLike< 2 > MatrixMdspec>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<MatrixMdspec>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
matrix_norm_op const &  operation,
Output &  output,
MatrixMdspec &  matrix 
)

Resolve host access and compute a matrix norm.

◆ try_kernel() [21/74]

template<uni20::MutableRankedMdspecLike< 2 > MatrixMdspan, uni20::Scalar Scalar>
requires uni20::HostWritableMdspec<MatrixMdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
matrix_set_op const &  op,
MatrixMdspan &  matrix,
Scalar  diagonal,
Scalar  off_diagonal 
)

Resolve host access and initialize the matrix.

◆ try_kernel() [22/74]

template<class Output , uni20::MdspecLike InputMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<InputMdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
norm_op const &  ,
Output &  output,
InputMdspan &  input 
)

Resolve host access and compute a Euclidean norm.

◆ try_kernel() [23/74]

template<class Output , std::size_t InputRank, std::size_t ReducedRank, uni20::MdspecLike InputMdspan>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<InputMdspan>
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
sum_reduction_op< InputRank, ReducedRank > const &  operation,
Output &  output,
InputMdspan &  input 
)

Resolve host access and sum selected axes.

◆ try_kernel() [24/74]

template<class Function , uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike... InputMdspans>
requires uni20::HostWritableMdspec<OutputMdspan> && (uni20::HostReadableMdspec<InputMdspans> && ...)
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
transform_inplace_op< Function > const &  operation,
OutputMdspan &  output,
InputMdspans &...  inputs 
)

Resolve host access and apply an update transform.

◆ try_kernel() [25/74]

template<class Function , uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike... InputMdspans>
requires uni20::HostWritableMdspec<OutputMdspan> && (uni20::HostReadableMdspec<InputMdspans> && ...)
KernelAttempt uni20::linalg::try_kernel ( CpuReferenceBackend  ,
transform_op< Function > const &  operation,
OutputMdspan &  output,
InputMdspans &...  inputs 
)

Resolve host access and apply an overwrite transform.

◆ try_kernel() [26/74]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
requires requires(async::shared_storage<OutputTensor>& storage, detail::matrix_product_extents const& shape, uni20::cuda::Device device) { uni20::prepare_output(storage, shape, device); }
KernelAttempt uni20::linalg::try_kernel ( CublasBackend  ,
assign_product_op const &  ,
async::shared_storage< OutputTensor > &  output_storage,
Scalar  alpha,
LhsMdspan &  lhs,
RhsMdspan &  rhs 
)

Construct or relocate a deferred CUDA output and run blocking cuBLAS GEMM.

◆ try_kernel() [27/74]

template<uni20::MutableRankedTensorView< 2 > OutputTensor, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
KernelAttempt uni20::linalg::try_kernel ( CublasBackend  ,
assign_product_op const &  ,
OutputTensor &  output,
Scalar  alpha,
LhsMdspan &  lhs,
RhsMdspan &  rhs 
)

Prepare a replaceable output and lower normalized operands for cuBLAS GEMM.

◆ try_kernel() [28/74]

template<uni20::MutableRankedMdspecLike< 2 > OutputMdspan, class Scalar , uni20::RankedMdspecLike< 2 > LhsMdspan, uni20::RankedMdspecLike< 2 > RhsMdspan>
KernelAttempt uni20::linalg::try_kernel ( CublasBackend  ,
gemm_op const &  ,
OutputMdspan &  output,
Scalar  alpha,
LhsMdspan &  lhs,
RhsMdspan &  rhs,
Scalar  beta 
)

Invoke the cuBLAS GEMM adapter with normalized mdspecs.

◆ try_kernel() [29/74]

template<class Output , uni20::MdspecLike LhsMdspec, uni20::MdspecLike RhsMdspec>
requires detail::cublas_backend::HostScalarOutput<Output, typename std::remove_cvref_t<LhsMdspec>::value_type> && detail::cublas_backend::RawReadableCudaReductionMdspec< LhsMdspec, typename std::remove_cvref_t<LhsMdspec>::value_type> && detail::cublas_backend::RawReadableCudaReductionMdspec<RhsMdspec, typename std::remove_cvref_t<LhsMdspec>::value_type>
KernelAttempt uni20::linalg::try_kernel ( CublasBackend  ,
inner_product_op const &  ,
Output &  output,
LhsMdspec &  lhs,
RhsMdspec &  rhs 
)

Compute a full CUDA inner product through cuBLAS.

◆ try_kernel() [30/74]

template<class Output , uni20::MdspecLike InputMdspec>
requires detail::cublas_backend::HostScalarOutput< Output, uni20::make_real_t<typename std::remove_cvref_t<InputMdspec>::value_type>> && detail::cublas_backend::RawReadableCudaReductionMdspec<InputMdspec, typename std::remove_cvref_t<InputMdspec>::value_type>
KernelAttempt uni20::linalg::try_kernel ( CublasBackend  ,
norm_op const &  ,
Output &  output,
InputMdspec &  input 
)

Compute a full CUDA Euclidean norm through cuBLAS.

◆ try_kernel() [31/74]

template<class Mdspec >
requires detail::cuda_reference::SupportedConjugateMdspec<Mdspec>
KernelAttempt uni20::linalg::try_kernel ( CudaReferenceBackend  ,
conjugate_inplace_op const &  ,
Mdspec &  mdspec 
)

Perform in-place conjugation on a normalized CUDA mdspec.

◆ try_kernel() [32/74]

template<uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike InputMdspan>
KernelAttempt uni20::linalg::try_kernel ( CudaReferenceBackend  ,
copy_op const &  ,
OutputMdspan &  output,
InputMdspan &  input 
)

Perform a CUDA copy from normalized mdspecs.

◆ try_kernel() [33/74]

template<class Factor , class OutputMdspec , class InputMdspec >
requires detail::cuda_reference::SupportedAddScaledMdspecs<OutputMdspec, InputMdspec, Factor>
KernelAttempt uni20::linalg::try_kernel ( CudaReferenceBackend  ,
transform_inplace_op< add_scaled< Factor > > const &  operation,
OutputMdspec &  output,
InputMdspec &  input 
)

Accumulate a scaled CUDA mdspec into another.

◆ try_kernel() [34/74]

template<detail::cuda_reference::RegisteredStatelessBinary Function, class OutputMdspec , class InputMdspec >
requires detail::cuda_reference::SupportedInplaceStatelessBinaryMdspecs<OutputMdspec, InputMdspec, Function>
KernelAttempt uni20::linalg::try_kernel ( CudaReferenceBackend  ,
transform_inplace_op< Function > const &  operation,
OutputMdspec &  output,
InputMdspec &  input 
)

Apply a registered in-place binary transform to CUDA mdspecs.

◆ try_kernel() [35/74]

template<class Factor , class OutputMdspec >
requires detail::cuda_reference::SupportedInplaceScaleMdspec<OutputMdspec, Factor>
KernelAttempt uni20::linalg::try_kernel ( CudaReferenceBackend  ,
transform_inplace_op< scale< Factor > > const &  operation,
OutputMdspec &  output 
)

Scale a CUDA mdspec in place.

◆ try_kernel() [36/74]

template<class Value , class OutputMdspec >
requires detail::cuda_reference::SupportedFillMdspec<OutputMdspec, Value>
KernelAttempt uni20::linalg::try_kernel ( CudaReferenceBackend  ,
transform_op< constant< Value > > const &  operation,
OutputMdspec &  output 
)

Fill a CUDA mdspec with one retained scalar value.

◆ try_kernel() [37/74]

template<detail::cuda_reference::RegisteredStatelessUnary Function, class OutputMdspec , class InputMdspec >
requires detail::cuda_reference::SupportedStatelessUnaryMdspecs<OutputMdspec, InputMdspec, Function>
KernelAttempt uni20::linalg::try_kernel ( CudaReferenceBackend  ,
transform_op< Function > const &  operation,
OutputMdspec &  output,
InputMdspec &  input 
)

Apply a registered stateless unary transform to CUDA mdspec operands.

◆ try_kernel() [38/74]

template<detail::cuda_reference::RegisteredStatelessBinary Function, class OutputMdspec , class LhsMdspec , class RhsMdspec >
requires detail::cuda_reference::SupportedStatelessBinaryMdspecs<OutputMdspec, LhsMdspec, RhsMdspec, Function>
KernelAttempt uni20::linalg::try_kernel ( CudaReferenceBackend  ,
transform_op< Function > const &  operation,
OutputMdspec &  output,
LhsMdspec &  lhs,
RhsMdspec &  rhs 
)

Apply a registered stateless binary transform to CUDA mdspec operands.

◆ try_kernel() [39/74]

template<class Factor , class OutputMdspec , class InputMdspec >
requires detail::cuda_reference::SupportedScaleMdspecs<OutputMdspec, InputMdspec, Factor>
KernelAttempt uni20::linalg::try_kernel ( CudaReferenceBackend  ,
transform_op< scale< Factor > > const &  operation,
OutputMdspec &  output,
InputMdspec &  input 
)

Apply a registered unary scale transform to CUDA mdspec operands.

◆ try_kernel() [40/74]

template<uni20::MutableRankedStridedMdspecLike< 1 > Values, uni20::MutableRankedStridedMdspecLike< 2 > Left, uni20::MutableRankedStridedMdspecLike< 2 > Right, uni20::MutableRankedStridedMdspecLike< 2 > Matrix>
requires detail::cusolver_backend::CusolverSvdMdspecs<Values, Left, Right, Matrix>
KernelAttempt uni20::linalg::try_kernel ( CusolverBackend  ,
svd_op const &  operation,
Values &  values,
Left &  left,
Right &  right,
Matrix &  matrix 
)

Compute one blocking exact SVD through cuSOLVER gesvd.

◆ try_kernel() [41/74]

template<class GemmSelector , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
requires (detail::direct_gemm_contraction_backend::gemm_dispatch_types_compatible<GemmSelector, OutputMdspec, Scalar, LhsMdspec, RhsMdspec>())
KernelAttempt uni20::linalg::try_kernel ( DirectGemmContractionBackend< GemmSelector > const &  backend,
contract_op< LhsRank, RhsRank, ContractedRank > const &  operation,
OutputMdspec &  output,
Scalar  alpha,
LhsMdspec &  lhs,
RhsMdspec &  rhs,
Scalar  beta 
)

Project a contraction and execute it through one nested GEMM dispatch.

◆ try_kernel() [42/74]

template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...> && (least_squares_detail::qr_acceptance<typename A::value_type, P...>() != KernelTypeAcceptance::no)
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
least_squares_op const &  ,
X &  x,
A &  a,
B &  b,
std::span< make_real_t< typename A::value_type > >  residuals,
LeastSquaresInfo &  info,
LeastSquaresOptions< make_real_t< typename A::value_type > > const &  options,
P...  precision 
)

Solve using configured LAPACK/MPLAPACK reduced QR and scalar-generic triangular substitution.

◆ try_kernel() [43/74]

template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
linear_solve_op const &  ,
A &  a,
B &  b,
SolveInfo &  info,
SolveOptions< float80 > const &  options 
)

Convert workspaces at the boundary and report LU solve diagnostics without double-precision intermediates.

◆ try_kernel() [44/74]

template<MutableRankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostWritableMdspec<A> && HostWritableMdspec<B> && mpfr_detail::RuntimeScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
linear_solve_op const &  ,
A &  a,
B &  b,
SolveInfo &  info,
SolveOptions< mpreal > const &  options,
Precision  p 
)

Convert workspaces at the boundary and report LU solve diagnostics without native-float intermediates.

◆ try_kernel() [45/74]

template<uni20::MutableRankedStridedMdspecLike< 2 > CoefficientMdspec, uni20::MutableRankedStridedMdspecLike< 2 > RhsMdspec>
requires LapackScalar<typename CoefficientMdspec::value_type> && uni20::HostWritableMdspec<CoefficientMdspec> && uni20::HostWritableMdspec<RhsMdspec>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
linear_solve_op const &  ,
CoefficientMdspec &  coefficients,
RhsMdspec &  right_hand_sides,
SolveInfo &  info,
SolveOptions< uni20::make_real_t< typename CoefficientMdspec::value_type > > const &  options 
)

Resolve host access and solve a general system through LAPACK LU factorization.

◆ try_kernel() [46/74]

template<uni20::MutableRankedMdspecLike< 2 > LMdspec, uni20::MutableRankedMdspecLike< 2 > QMdspec, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspec>
requires LapackScalar<typename MatrixMdspec::value_type> && uni20::HostWritableMdspec<LMdspec> && uni20::HostWritableMdspec<QMdspec> && uni20::HostWritableMdspec<MatrixMdspec>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
lq_op const &  ,
LMdspec &  l,
QMdspec &  q,
MatrixMdspec &  matrix_work 
)

Resolve host access and compute reduced LQ through LAPACK gelqf and orglq/unglq.

◆ try_kernel() [47/74]

template<packed_detail::DecompositionMatrix A, class X , class Y , class... P>
requires packed_detail::SameMatrixScalar<A, X> && packed_detail::SameMatrixScalar<A, Y> && packed_detail::LqScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
lq_op const &  ,
X &  l,
Y &  q,
A &  a,
P...  precision 
)

Pack logical elements and compute reduced LQ through MPLAPACK.

◆ try_kernel() [48/74]

template<MutableRankedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
lu_factor_op const &  ,
A &  a,
std::span< std::size_t >  pivots,
LuNorms< float80 > *  norms,
SolveInfo &  info,
SolveOptions< float80 > const &  options 
)

Convert values at the backend boundary and compute portable owning factors.

◆ try_kernel() [49/74]

template<MutableRankedStridedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && LapackScalar<typename A::value_type> && DefaultAccessorMdspanLike<host_write_mdspan_t<A>>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
lu_factor_op const &  ,
A &  a,
std::span< std::size_t >  pivots,
LuNorms< make_real_t< typename A::value_type > > *  norms,
SolveInfo &  info,
SolveOptions< make_real_t< typename A::value_type > > const &  options 
)

Compute packed factors through GETRF, preserving all outputs on decline.

◆ try_kernel() [50/74]

template<MutableRankedMdspecLike< 2 > A>
requires HostWritableMdspec<A> && mpfr_detail::RuntimeScalar<typename A::value_type>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
lu_factor_op const &  ,
A &  a,
std::span< std::size_t >  pivots,
LuNorms< mpreal > *  norms,
SolveInfo &  info,
SolveOptions< mpreal > const &  options,
Precision  p 
)

Convert values at the backend boundary and compute portable owning factors.

◆ try_kernel() [51/74]

template<RankedMdspecLike< 2 > A, class... P>
requires HostReadableMdspec<A> && condition_detail::PrecisionArgs<typename A::value_type, P...> && (LapackScalar<typename A::value_type> || condition_detail::PackedGecon<typename A::value_type>)
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
lu_rcond_op const &  op,
make_real_t< typename A::value_type > &  output,
A &  a,
make_real_t< typename A::value_type > const &  original_norm,
SolveInfo &  info,
P...  precision 
)

Estimate reciprocal conditioning without modifying the factors.

Precondition
A contains successful square LU factors at the supplied precision; the original norm uses the same precision and the norm selected by the operation.

◆ try_kernel() [52/74]

template<RankedStridedMdspecLike< 2 > A, MutableRankedStridedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && LapackScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type> && DefaultAccessorMdspanLike<host_read_mdspan_t<A>> && DefaultAccessorMdspanLike<host_write_mdspan_t<B>>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
lu_solve_op const &  ,
A &  a,
std::span< std::size_t const >  pivots,
B &  b,
SolveInfo &  info 
)

Apply GETRS without modifying the factors.

Precondition
Factors and pivots describe a successful LU and do not overlap the RHS.

◆ try_kernel() [53/74]

template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && mplapack_binary80_detail::Binary80LuScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
lu_solve_op const &  ,
A &  a,
std::span< std::size_t const >  pivots,
B &  b,
SolveInfo &  info 
)

Solve using binary80 arithmetic; RHS failures leave the factors reusable.

Precondition
Factors and pivots describe a successful LU and do not overlap the RHS.

◆ try_kernel() [54/74]

template<RankedMdspecLike< 2 > A, MutableRankedMdspecLike< 2 > B>
requires HostReadableMdspec<A> && HostWritableMdspec<B> && mpfr_detail::RuntimeScalar<typename A::value_type> && std::same_as<typename A::value_type, typename B::value_type>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
lu_solve_op const &  ,
A &  a,
std::span< std::size_t const >  pivots,
B &  b,
SolveInfo &  info,
Precision  p 
)

Solve at the factors' precision; RHS failures leave the factors reusable.

Precondition
Factors and pivots describe a successful LU at p and do not overlap the RHS.

◆ try_kernel() [55/74]

template<class Output , uni20::RankedStridedMdspecLike< 2 > MatrixMdspec>
requires reduction_detail::HostOutput<Output> && uni20::HostReadableMdspec<MatrixMdspec>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
matrix_norm_op const &  operation,
Output &  output,
MatrixMdspec &  matrix 
)

Resolve host access and compute a matrix norm through LAPACK.

◆ try_kernel() [56/74]

template<packed_detail::DecompositionMatrix A, packed_detail::DecompositionMatrix R, class... P>
requires std::same_as<typename R::value_type, complex<make_real_t<typename A::value_type>>> && packed_detail::EigenScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
nonsymmetric_eigen_op const &  op,
A &  a,
std::span< typename R::value_type >  v,
R &  r,
P...  precision 
)

Unpack real conjugate pairs into complex columns; omit unread vector output when disabled.

◆ try_kernel() [57/74]

template<uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan, class EigenScalar , uni20::MutableRankedMdspecLike< 2 > RightEigenvectorMdspan>
requires LapackScalar<typename MatrixMdspan::value_type> && uni20::HostWritableMdspec<MatrixMdspan> && uni20::HostWritableMdspec<RightEigenvectorMdspan>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
nonsymmetric_eigen_op const &  operation,
MatrixMdspan &  matrix_work,
std::span< EigenScalar >  eigenvalues,
RightEigenvectorMdspan &  right_eigenvectors 
)

Resolve host access and run LAPACK nonsymmetric eigenanalysis.

◆ try_kernel() [58/74]

template<class Operation , uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan, class EigenScalar , uni20::MutableRankedStridedMdspecLike< 2 > SchurVectorMdspan>
requires (std::same_as<Operation, schur_op> || std::same_as<Operation, hessenberg_schur_op>) && uni20::HostWritableMdspec<MatrixMdspan> && uni20::HostWritableMdspec<SchurVectorMdspan>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
Operation const &  operation,
MatrixMdspan &  matrix_work,
std::span< EigenScalar >  eigenvalues,
SchurVectorMdspan &  schur_vectors 
)

Resolve host access and run a LAPACK Schur decomposition.

◆ try_kernel() [59/74]

template<lapack_detail::SvdOperation Operation, uni20::MutableStridedMdspecLike... Mdspans>
requires (LapackScalar<typename Mdspans::value_type> && ...) && (uni20::HostWritableMdspec<Mdspans> && ...) && requires { lapack_detail::svd_acceptance(Operation{}, std::type_identity<uni20::host_write_mdspan_t<Mdspans>>{}...); }
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
Operation const &  operation,
Mdspans &...  mdspans 
)

Resolve host access and run a LAPACK SVD operation.

◆ try_kernel() [60/74]

template<uni20::MutableRankedMdspecLike< 2 > QMdspec, uni20::MutableRankedMdspecLike< 2 > RMdspec, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspec>
requires LapackScalar<typename MatrixMdspec::value_type> && uni20::HostWritableMdspec<QMdspec> && uni20::HostWritableMdspec<RMdspec> && uni20::HostWritableMdspec<MatrixMdspec>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
qr_op const &  ,
QMdspec &  q,
RMdspec &  r,
MatrixMdspec &  matrix_work 
)

Resolve host access and compute reduced QR through LAPACK geqrf and orgqr/ungqr.

◆ try_kernel() [61/74]

template<packed_detail::DecompositionMatrix A, class X , class Y , class... P>
requires packed_detail::SameMatrixScalar<A, X> && packed_detail::SameMatrixScalar<A, Y> && packed_detail::QrScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
qr_op const &  ,
X &  q,
Y &  r,
A &  a,
P...  precision 
)

Pack logical elements and compute reduced QR through MPLAPACK.

◆ try_kernel() [62/74]

template<uni20::MutableRankedStridedMdspecLike< 2 > SchurFormMdspan, uni20::MutableRankedStridedMdspecLike< 2 > SchurVectorMdspan>
requires uni20::HostWritableMdspec<SchurFormMdspan> && uni20::HostWritableMdspec<SchurVectorMdspan>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
schur_reorder_op const &  operation,
SchurFormMdspan &  schur_form,
SchurVectorMdspan &  schur_vectors 
)

Resolve host access and run LAPACK Schur reordering.

◆ try_kernel() [63/74]

template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::EighScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
self_adjoint_eigh_op const &  op,
V &  v,
A &  a,
P...  precision 
)

Read only the selected triangle and return values and optional vectors at p.

◆ try_kernel() [64/74]

template<uni20::MutableRankedStridedMdspecLike< 1 > EigenvalueMdspan, uni20::MutableRankedStridedMdspecLike< 2 > MatrixMdspan>
requires LapackScalar<typename MatrixMdspan::value_type> && uni20::HostWritableMdspec<EigenvalueMdspan> && uni20::HostWritableMdspec<MatrixMdspan>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
self_adjoint_eigh_op const &  operation,
EigenvalueMdspan &  eigenvalues,
MatrixMdspan &  matrix_work 
)

Resolve host access and run LAPACK self-adjoint eigenanalysis.

◆ try_kernel() [65/74]

template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
singular_values_op const &  op,
V &  v,
A &  a,
P...  precision 
)

Compute the requested SVD factors through logical host packing.

◆ try_kernel() [66/74]

template<class X , class A , class B , class... P>
requires least_squares_detail::Operands<X, A, B> && least_squares_detail::PrecisionArgs<typename A::value_type, P...> && (LapackScalar<typename A::value_type> || least_squares_detail::PackedGelss<typename A::value_type>)
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
svd_least_squares_op const &  ,
X &  x,
A &  a,
B &  b,
std::span< make_real_t< typename A::value_type > >  residuals,
LeastSquaresInfo &  info,
SvdLeastSquaresDiagnostics< make_real_t< typename A::value_type > > &  diagnostics,
SvdLeastSquaresOptions< make_real_t< typename A::value_type > > const &  options,
P...  precision 
)

Solve through GELSS; numerical failure publishes only status, preserving fixed outputs.

◆ try_kernel() [67/74]

template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
svd_left_op const &  op,
V &  v,
A &  a,
P...  precision 
)

Compute the requested SVD factors through logical host packing.

◆ try_kernel() [68/74]

template<class V , packed_detail::DecompositionMatrix A, class L , class... P>
requires packed_detail::SameMatrixScalar<A, L> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
svd_left_op const &  op,
V &  v,
L &  l,
A &  a,
P...  precision 
)

Compute the requested SVD factors through logical host packing.

◆ try_kernel() [69/74]

template<class V , packed_detail::DecompositionMatrix A, class F , class... P>
requires packed_detail::SameMatrixScalar<A, F> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
svd_op const &  op,
V &  v,
F &  f,
A &  a,
P...  precision 
)

Compute the requested SVD factors through logical host packing.

◆ try_kernel() [70/74]

template<class V , packed_detail::DecompositionMatrix A, class L , class R , class... P>
requires packed_detail::SameMatrixScalar<A, L> && packed_detail::SameMatrixScalar<A, R> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
svd_op const &  op,
V &  v,
L &  l,
R &  r,
A &  a,
P...  precision 
)

Compute the requested SVD factors through logical host packing.

◆ try_kernel() [71/74]

template<class V , packed_detail::DecompositionMatrix A, class... P>
requires packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
svd_right_op const &  op,
V &  v,
A &  a,
P...  precision 
)

Compute the requested SVD factors through logical host packing.

◆ try_kernel() [72/74]

template<class V , packed_detail::DecompositionMatrix A, class R , class... P>
requires packed_detail::SameMatrixScalar<A, R> && packed_detail::SvdScalar<typename A::value_type> && packed_detail::KernelPrecision<typename A::value_type, P...> && packed_detail::DecompositionValues<V, A>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
svd_right_op const &  op,
V &  v,
R &  r,
A &  a,
P...  precision 
)

Compute the requested SVD factors through logical host packing.

◆ try_kernel() [73/74]

template<uni20::LapackReal Scalar, uni20::MutableRankedStridedMdspecLike< 2 > EigenvectorMdspan>
requires uni20::HostWritableMdspec<EigenvectorMdspan>
KernelAttempt uni20::linalg::try_kernel ( LapackBackend  ,
symmetric_tridiagonal_eigen_op const &  operation,
std::span< Scalar >  diagonal,
std::span< Scalar >  subdiagonal,
EigenvectorMdspan &  eigenvectors 
)

Resolve host access and run LAPACK tridiagonal eigenanalysis.

◆ try_kernel() [74/74]

template<class GemmSelector , std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, uni20::Scalar Scalar, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
requires (detail::looped_gemm_contraction_backend::gemm_dispatch_types_compatible<GemmSelector, OutputMdspec, Scalar, LhsMdspec, RhsMdspec>())
KernelAttempt uni20::linalg::try_kernel ( LoopedGemmContractionBackend< GemmSelector > const &  backend,
contract_op< LhsRank, RhsRank, ContractedRank > const &  operation,
OutputMdspec &  output,
Scalar  alpha,
LhsMdspec &  lhs,
RhsMdspec &  rhs,
Scalar  beta 
)

Execute one residual M or N loop through nested GEMM dispatch.

The first nested GEMM may cleanly decline before any output is modified. After it succeeds, later slices use terminal dispatch because the overall contraction is no longer eligible for outer fallback. Nested GEMM candidates may still cleanly decline within each later dispatch.

◆ try_make_direct_contraction_gemm_plan()

template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
auto uni20::linalg::try_make_direct_contraction_gemm_plan ( OutputMdspec const &  output,
LhsMdspec const &  lhs,
RhsMdspec const &  rhs,
ContractionAxes< LhsRank, RhsRank, ContractedRank > const &  axes 
) -> std::optional<DirectContractionGemmPlan>

Try to collapse merged contraction groups to three rank-two GEMM operands.

Returns
A direct plan when every group has at most one dimension and each projected matrix has positive strides and a unit-stride axis; otherwise std::nullopt.

◆ try_make_kernel_task() [1/4]

template<uni20::cublas::CublasScalar Scalar, uni20::MutableRankedTensorView< 2 > OutputTensor, class LhsMdspan , class RhsMdspan >
requires uni20::RankedMdspecLike<LhsMdspan, 2> && uni20::RankedMdspecLike<RhsMdspan, 2> && requires(async::shared_storage<OutputTensor>& storage, detail::matrix_product_extents const& shape, uni20::cuda::Device device) { uni20::prepare_output(storage, shape, device); }
auto uni20::linalg::try_make_kernel_task ( CublasBackend  ,
assign_product_op const &  ,
async::shared_storage< OutputTensor > &  output_storage,
Scalar const &  alpha,
LhsMdspan &  lhs,
RhsMdspan &  rhs 
) -> KernelTaskAttempt<async::CudaTask>

Prepare asynchronous cuBLAS assignment into deferred Tensor storage.

◆ try_make_kernel_task() [2/4]

template<uni20::cublas::CublasScalar Scalar, class OutputTensor , class LhsMdspan , class RhsMdspan >
requires uni20::MutableRankedTensorView<OutputTensor, 2> && uni20::RankedMdspecLike<LhsMdspan, 2> && uni20::RankedMdspecLike<RhsMdspan, 2>
auto uni20::linalg::try_make_kernel_task ( CublasBackend  ,
assign_product_op const &  ,
OutputTensor &  output,
Scalar const &  alpha,
LhsMdspan &  lhs,
RhsMdspan &  rhs 
) -> KernelTaskAttempt<async::CudaTask>

Prepare a replaceable output and lower normalized operands for asynchronous cuBLAS work.

◆ try_make_kernel_task() [3/4]

template<uni20::cublas::CublasScalar Scalar, class OutputMdspan , class LhsMdspan , class RhsMdspan >
requires uni20::MutableRankedMdspecLike<OutputMdspan, 2> && uni20::RankedMdspecLike<LhsMdspan, 2> && uni20::RankedMdspecLike<RhsMdspan, 2>
auto uni20::linalg::try_make_kernel_task ( CublasBackend  ,
gemm_op const &  ,
OutputMdspan &  output,
Scalar const &  alpha,
LhsMdspan &  lhs,
RhsMdspan &  rhs,
Scalar const &  beta 
) -> KernelTaskAttempt<async::CudaTask>

Prepare asynchronous cuBLAS work from normalized mdspecs.

◆ try_make_kernel_task() [4/4]

template<uni20::MutableMdspecLike OutputMdspan, uni20::MdspecLike InputMdspan>
requires (detail::cuda_reference::SupportedCopyMdspans<OutputMdspan, InputMdspan> && detail::cuda_reference::is_raw_cuda_mdspec<OutputMdspan> && detail::cuda_reference::is_supported_cuda_mdspan<InputMdspan>)
auto uni20::linalg::try_make_kernel_task ( CudaReferenceBackend  ,
copy_op const &  ,
OutputMdspan &  output,
InputMdspan &  input 
) -> KernelTaskAttempt<async::CudaTask>

Create a CUDA copy task from normalized mdspecs.

◆ try_make_looped_contraction_gemm_plan()

template<std::size_t LhsRank, std::size_t RhsRank, std::size_t ContractedRank, MutableRankedContractionMdspecLike< ContractionAxes< LhsRank, RhsRank, ContractedRank >::output_rank > OutputMdspec, RankedContractionMdspecLike< LhsRank > LhsMdspec, RankedContractionMdspecLike< RhsRank > RhsMdspec>
auto uni20::linalg::try_make_looped_contraction_gemm_plan ( OutputMdspec const &  output,
LhsMdspec const &  lhs,
RhsMdspec const &  rhs,
ContractionAxes< LhsRank, RhsRank, ContractedRank > const &  axes 
) -> std::optional<LoopedContractionGemmPlan>

Try to leave one residual M or N dimension around a GEMM projection.

The first implementation deliberately leaves K unlooped so every GEMM writes a disjoint output slice and uses the original beta. Exactly one of M or N must contain two merged stride descriptors; the other groups must each contain at most one. When either descriptor can serve as the loop, the plan with fewer GEMM calls is selected.

Returns
A looped plan for one residual M or N dimension, or std::nullopt.

Variable Documentation

◆ cuda_partitioned_fill_scalar

template<class Scalar >
constexpr bool uni20::linalg::cuda_partitioned_fill_scalar = detail::cuda_reference::supports_elementwise_arithmetic<Scalar>
inlineconstexpr

Whether allocation-wide CUDA fill operations support Scalar.

◆ cuda_partitioned_scale_scalars

template<class Scalar , class Factor >
constexpr bool uni20::linalg::cuda_partitioned_scale_scalars
inlineconstexpr
Initial value:
=
detail::cuda_reference::supports_elementwise_scale<Scalar, std::remove_cvref_t<Factor>>

Whether allocation-wide CUDA scale operations support this scalar pair.

◆ enable_backend_neutral_storage

template<class StoragePolicy >
constexpr bool uni20::linalg::enable_backend_neutral_storage = false
inlineconstexpr

Opt-in marker for storage policies that do not constrain backend selection.

Backend-neutral operands may be evaluated by any backend that accepts their resolved accessor. When concrete storage operands are also present, their common storage policy selects the default backend list.

◆ is_backend_list_v

template<class T >
constexpr bool uni20::linalg::is_backend_list_v = is_backend_list<std::remove_cvref_t<T>>::value
inlineconstexpr

◆ kernel_types_maybe

constexpr KernelAcceptance<KernelTypeAcceptance::maybe> uni20::linalg::kernel_types_maybe {}
inlineconstexpr

Report that runtime operand values determine backend acceptance.

◆ kernel_types_no

constexpr KernelAcceptance<KernelTypeAcceptance::no> uni20::linalg::kernel_types_no {}
inlineconstexpr

Report that a backend rejects the argument types.

◆ kernel_types_yes

constexpr KernelAcceptance<KernelTypeAcceptance::yes> uni20::linalg::kernel_types_yes {}
inlineconstexpr

Report that a backend accepts every instance of the argument types.