1 #ifndef VIENNACL_LINALG_SPAI_HPP
2 #define VIENNACL_LINALG_SPAI_HPP
48 #include "boost/numeric/ublas/vector.hpp"
49 #include "boost/numeric/ublas/matrix.hpp"
50 #include "boost/numeric/ublas/matrix_proxy.hpp"
51 #include "boost/numeric/ublas/vector_proxy.hpp"
52 #include "boost/numeric/ublas/storage.hpp"
53 #include "boost/numeric/ublas/io.hpp"
54 #include "boost/numeric/ublas/lu.hpp"
55 #include "boost/numeric/ublas/triangular.hpp"
56 #include "boost/numeric/ublas/matrix_expression.hpp"
85 template <
typename MatrixType>
90 typedef typename boost::numeric::ublas::vector<ScalarType>
VectorType;
101 MatrixType pA(A.size1(), A.size2());
130 template <
typename ScalarType,
unsigned int MAT_ALIGNMENT>
134 typedef boost::numeric::ublas::compressed_matrix<ScalarType> UBLASSparseMatrixType;
138 typedef boost::numeric::ublas::vector<ScalarType> UBLASVectorType;
148 viennacl::linalg::kernels::spai<ScalarType, 1>::init();
151 UBLASSparseMatrixType ubls_A, ubls_spai_m;
152 UBLASSparseMatrixType ubls_At;
192 template <
typename MatrixType>
195 typedef typename MatrixType::value_type ScalarType;
196 typedef typename boost::numeric::ublas::vector<ScalarType> VectorType;
197 typedef typename boost::numeric::ublas::matrix<ScalarType> UBLASDenseMatrixType;
236 template <
typename ScalarType,
unsigned int MAT_ALIGNMENT>
242 typedef boost::numeric::ublas::compressed_matrix<ScalarType> UBLASSparseMatrixType;
243 typedef boost::numeric::ublas::vector<ScalarType> UBLASVectorType;
253 UBLASSparseMatrixType ublas_A(A.
size1(), A.
size2());
254 UBLASSparseMatrixType pA(A.
size1(), A.
size2());
255 UBLASSparseMatrixType ublas_L(A.
size1(), A.
size2());
256 UBLASSparseMatrixType ublas_L_trans(A.
size1(), A.
size2());