<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
potrs.hpp
Go to the documentation of this file.
1
3//
4// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
5//
6// This file is part of <T>LAPACK.
7// <T>LAPACK is free software: you can redistribute it and/or modify it under
8// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
9
10#ifndef TLAPACK_LEGACY_POTRS_HH
11#define TLAPACK_LEGACY_POTRS_HH
12
14
15namespace tlapack {
16namespace legacy {
17
24 template <class uplo_t, typename T>
26 idx_t n,
27 idx_t nrhs,
28 const T* A,
29 idx_t lda,
30 T* B,
31 idx_t ldb)
32 {
33 using internal::create_matrix;
34
35 // Check arguments
36 tlapack_check_false(uplo != Uplo::Lower && uplo != Uplo::Upper);
37
38 // Matrix views
39 const auto A_ = create_matrix<T>((T*)A, n, n, lda);
40 auto B_ = create_matrix<T>(B, n, nrhs, ldb);
41
42 return potrs(uplo, A_, B_);
43 }
44
45} // namespace legacy
46} // namespace tlapack
47
48#endif // TLAPACK_LEGACY_POTRS_HH
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
int potrs(uplo_t uplo, idx_t n, idx_t nrhs, const T *A, idx_t lda, T *B, idx_t ldb)
Apply the Cholesky factorization to solve a linear system.
Definition potrs.hpp:25
Apply the Cholesky factorization to solve a linear system.
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113