1 #ifndef VIENNACL_LINALG_DIRECT_SOLVE_HPP_
2 #define VIENNACL_LINALG_DIRECT_SOLVE_HPP_
31 #ifdef VIENNACL_WITH_OPENCL
35 #ifdef VIENNACL_WITH_CUDA
53 template <
typename NumericT,
typename F1,
typename F2,
typename SOLVERTAG>
64 #ifdef VIENNACL_WITH_OPENCL
69 #ifdef VIENNACL_WITH_CUDA
86 template <
typename NumericT,
typename F1,
typename F2,
typename SOLVERTAG>
99 #ifdef VIENNACL_WITH_OPENCL
104 #ifdef VIENNACL_WITH_CUDA
122 template <
typename NumericT,
typename F1,
typename F2,
typename SOLVERTAG>
135 #ifdef VIENNACL_WITH_OPENCL
140 #ifdef VIENNACL_WITH_CUDA
157 template <
typename NumericT,
typename F1,
typename F2,
typename SOLVERTAG>
170 #ifdef VIENNACL_WITH_OPENCL
175 #ifdef VIENNACL_WITH_CUDA
191 template <
typename NumericT,
typename F,
typename SOLVERTAG>
196 assert( (mat.
size1() == vec.
size()) &&
bool(
"Size check failed in inplace_solve(): size1(A) != size(b)"));
197 assert( (mat.
size2() == vec.
size()) &&
bool(
"Size check failed in inplace_solve(): size2(A) != size(b)"));
204 #ifdef VIENNACL_WITH_OPENCL
209 #ifdef VIENNACL_WITH_CUDA
226 template <
typename NumericT,
typename F,
typename SOLVERTAG>
231 assert( (proxy.lhs().size1() == vec.
size()) &&
bool(
"Size check failed in inplace_solve(): size1(A) != size(b)"));
232 assert( (proxy.lhs().size2() == vec.
size()) &&
bool(
"Size check failed in inplace_solve(): size2(A) != size(b)"));
239 #ifdef VIENNACL_WITH_OPENCL
244 #ifdef VIENNACL_WITH_CUDA
265 template <
typename NumericT,
typename F1,
typename F2,
typename SOLVERTAG>
287 template <
typename NumericT,
typename F1,
typename F2,
typename SOLVERTAG>
306 template <
typename NumericT,
typename F1,
typename SOLVERTAG>
309 SOLVERTAG
const & tag)
327 template <
typename NumericT,
typename F1,
typename F2,
typename SOLVERTAG>
347 template <
typename NumericT,
typename F1,
typename F2,
typename SOLVERTAG>
366 template <
typename NumericT,
typename F1,
typename SOLVERTAG>
369 SOLVERTAG
const & tag)
Implementations of dense direct triangular solvers are found here.
size_type size1() const
Returns the number of rows.
Definition: matrix.hpp:625
size_type size() const
Returns the length of the vector (cf. std::vector)
Definition: vector.hpp:859
Definition: forwards.h:478
Exception class in case of memory errors.
Definition: forwards.h:485
void inplace_solve(const matrix_base< NumericT, F1 > &A, matrix_base< NumericT, F2 > &B, SOLVERTAG)
Direct inplace solver for dense triangular systems. Matlab notation: A \ B.
Definition: direct_solve.hpp:54
Implementation of the dense matrix class.
vcl_size_t size1(MatrixType const &mat)
Generic routine for obtaining the number of rows of a matrix (ViennaCL, uBLAS, etc.)
Definition: size.hpp:216
A dense matrix class.
Definition: forwards.h:290
Expression template class for representing a tree of expressions which ultimately result in a matrix...
Definition: forwards.h:283
void inplace_solve(const matrix_base< NumericT, F1 > &A, matrix_base< NumericT, F2 > &B, SOLVERTAG tag)
Direct inplace solver for triangular systems with multiple right hand sides, i.e. A \ B (MATLAB notat...
Definition: direct_solve.hpp:297
This file provides the forward declarations for the main types used within ViennaCL.
A dense matrix class.
Definition: forwards.h:293
result_of::size_type< MatrixType >::type size2(MatrixType const &mat)
Generic routine for obtaining the number of columns of a matrix (ViennaCL, uBLAS, etc...
Definition: size.hpp:245
size_type size2() const
Returns the number of columns.
Definition: matrix.hpp:627
Definition: forwards.h:481
void inplace_solve(const matrix_base< NumericT, F1 > &A, matrix_base< NumericT, F2 > &B, SOLVERTAG)
Direct inplace solver for triangular systems with multiple right hand sides, i.e. A \ B (MATLAB notat...
Definition: direct_solve.hpp:130
memory_types get_active_handle_id() const
Returns an ID for the currently active memory buffer. Other memory buffers might contain old or no da...
Definition: mem_handle.hpp:91
Definition: forwards.h:480
Common base class for dense vectors, vector ranges, and vector slices.
Definition: forwards.h:205
A vector class representing a linear memory sequence on the GPU. Inspired by boost::numeric::ublas::v...
Definition: forwards.h:208
void inplace_solve(const matrix_base< NumericT, F1 > &A, matrix_base< NumericT, F2 > &B, SOLVERTAG)
Direct inplace solver for dense triangular systems. Matlab notation: A \ B.
Definition: direct_solve.hpp:75
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
Definition: forwards.h:479
Implementations of dense direct solvers using CUDA are found here.
A tag class representing transposed matrices.
Definition: forwards.h:165
viennacl::backend::mem_handle & handle(T &obj)
Returns the generic memory handle of an object. Non-const version.
Definition: handle.hpp:41
VectorType solve(const MatrixType &matrix, VectorType const &rhs, bicgstab_tag const &tag)
Implementation of the stabilized Bi-conjugate gradient solver.
Definition: bicgstab.hpp:92
Implementations of dense direct solvers are found here.
Simple enable-if variant that uses the SFINAE pattern.