<T>LAPACK 0.1.1
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
getrf.hpp
Go to the documentation of this file.
1
4//
5// Copyright (c) 2021-2023, University of Colorado Denver. All rights reserved.
6//
7// This file is part of <T>LAPACK.
8// <T>LAPACK is free software: you can redistribute it and/or modify it under
9// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
10
11#ifndef TLAPACK_GETRF_HH
12#define TLAPACK_GETRF_HH
13
17
18namespace tlapack {
19
21enum class GetrfVariant : char { Level0 = '0', Recursive = 'R' };
22
24struct GetrfOpts {
25 GetrfVariant variant = GetrfVariant::Recursive;
26};
27
63template <TLAPACK_MATRIX matrix_t, TLAPACK_VECTOR piv_t>
64int getrf(matrix_t& A, piv_t& piv, const GetrfOpts& opts = {})
65{
66 // Call variant
67 if (opts.variant == GetrfVariant::Recursive)
68 return getrf_recursive(A, piv);
69 else
70 return getrf_level0(A, piv);
71}
72
73} // namespace tlapack
74
75#endif // TLAPACK_GETRF_HH
GetrfVariant
Variants of the algorithm to compute the LU factorization.
Definition getrf.hpp:21
int getrf_recursive(matrix_t &A, piv_t &piv)
getrf_recursive computes an LU factorization of a general m-by-n matrix A using partial pivoting with...
Definition getrf_recursive.hpp:56
int getrf_level0(matrix_t &A, piv_t &piv)
getrf computes an LU factorization of a general m-by-n matrix A using partial pivoting with row inter...
Definition getrf_level0.hpp:50
int getrf(matrix_t &A, piv_t &piv, const GetrfOpts &opts={})
getrf computes an LU factorization of a general m-by-n matrix A.
Definition getrf.hpp:64
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
Options struct for getrf()
Definition getrf.hpp:24