-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathlinear_solvers.hpp
More file actions
36 lines (26 loc) · 1.76 KB
/
Copy pathlinear_solvers.hpp
File metadata and controls
36 lines (26 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef LINEAR_SOLVERS_HPP
#define LINEAR_SOLVERS_HPP
#include <vector>
/***********************************************/
/* FP64 API */
/***********************************************/
std::tuple<std::vector<std::vector<double>>, std::vector<std::vector<double>>, std::vector<std::vector<double>>>
lu_factorization_partial_pivot(std::vector<std::vector<double>> A);
std::vector<double> solve_lu_system_by_substitution(const std::vector<std::vector<double>> &L,
const std::vector<std::vector<double>> &U,
const std::vector<std::vector<double>> &P,
const std::vector<double> &b);
// Solve AX = b using LU factorization
std::vector<double> solve_system_with_LU(const std::vector<std::vector<double>> &A, const std::vector<double> &b);
/***********************************************/
/* FP32 API */
/***********************************************/
std::tuple<std::vector<std::vector<float>>, std::vector<std::vector<float>>, std::vector<std::vector<float>>>
lu_factorization_partial_pivot(std::vector<std::vector<float>> A);
std::vector<float> solve_lu_system_by_substitution(const std::vector<std::vector<float>> &L,
const std::vector<std::vector<float>> &U,
const std::vector<std::vector<float>> &P,
const std::vector<float> &b);
// Solve AX = b using LU factorization
std::vector<float> solve_system_with_LU(const std::vector<std::vector<float>> &A, const std::vector<float> &b);
#endif // LINEAR_SOLVERS_HPP