SenK
SenK is a C++ library for high-performance linear solvers.
senk_blas2.hpp
Go to the documentation of this file.
1
7#ifndef SENK_BLAS2_HPP
8#define SENK_BLAS2_HPP
9
10namespace senk {
14namespace blas2 {
24template <typename T> inline
25void Trsv(T *U, T *b, T *x, int n, int m)
26{
27 for(int i=m-1; i>=0; i--) {
28 T temp = b[i];
29 for(int j=m-1; j>i; j--) {
30 temp -= U[j*n+i] * x[j];
31 }
32 x[i] = temp / U[i*n+i];
33 }
34}
35
36}
37
38}
39
40#endif
void Trsv(T *U, T *b, T *x, int n, int m)
Upper triangular solver.
Definition: senk_blas2.hpp:25
The top-level namespace of SenK.