ViennaCL - The Vienna Computing Library  1.6.0
Free open-source GPU-accelerated linear algebra and solver library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
direct_solve.hpp
Go to the documentation of this file.
1 #ifndef VIENNACL_LINALG_DIRECT_SOLVE_HPP_
2 #define VIENNACL_LINALG_DIRECT_SOLVE_HPP_
3 
4 /* =========================================================================
5  Copyright (c) 2010-2014, Institute for Microelectronics,
6  Institute for Analysis and Scientific Computing,
7  TU Wien.
8  Portions of this software are copyright by UChicago Argonne, LLC.
9 
10  -----------------
11  ViennaCL - The Vienna Computing Library
12  -----------------
13 
14  Project Head: Karl Rupp rupp@iue.tuwien.ac.at
15 
16  (A list of authors and contributors can be found in the PDF manual)
17 
18  License: MIT (X11), see file LICENSE in the base directory
19 ============================================================================= */
20 
25 #include "viennacl/forwards.h"
27 #include "viennacl/vector.hpp"
29 #include "viennacl/matrix.hpp"
31 #include "viennacl/linalg/prod.hpp"
33 
34 #ifdef VIENNACL_WITH_OPENCL
36 #endif
37 
38 #ifdef VIENNACL_WITH_CUDA
40 #endif
41 
42 #define VIENNACL_DIRECT_SOLVE_BLOCKSIZE 64
43 
44 namespace viennacl
45 {
46 namespace linalg
47 {
48 
49 namespace detail
50 {
51 
52  //
53  // A \ B:
54  //
55 
61  template<typename NumericT, typename SolverTagT>
62  void inplace_solve_kernel(const matrix_base<NumericT> & A, const matrix_base<NumericT> & B, SolverTagT)
63  {
64  assert( (viennacl::traits::size1(A) == viennacl::traits::size2(A)) && bool("Size check failed in inplace_solve(): size1(A) != size2(A)"));
65  assert( (viennacl::traits::size1(A) == viennacl::traits::size1(B)) && bool("Size check failed in inplace_solve(): size1(A) != size1(B)"));
66  switch (viennacl::traits::handle(A).get_active_handle_id())
67  {
69  viennacl::linalg::host_based::inplace_solve(A, false, const_cast<matrix_base<NumericT> &>(B), false, SolverTagT());
70  break;
71  #ifdef VIENNACL_WITH_OPENCL
73  viennacl::linalg::opencl::inplace_solve(A, false, const_cast<matrix_base<NumericT> &>(B), false, SolverTagT());
74  break;
75  #endif
76  #ifdef VIENNACL_WITH_CUDA
78  viennacl::linalg::cuda::inplace_solve(A, false, const_cast<matrix_base<NumericT> &>(B), false, SolverTagT());
79  break;
80  #endif
82  throw memory_exception("not initialised!");
83  default:
84  throw memory_exception("not implemented");
85  }
86  }
87 
93  template<typename NumericT, typename SolverTagT>
96  SolverTagT)
97  {
98  assert( (viennacl::traits::size1(A) == viennacl::traits::size2(A)) && bool("Size check failed in inplace_solve(): size1(A) != size2(A)"));
99  assert( (viennacl::traits::size1(A) == viennacl::traits::size1(proxy_B)) && bool("Size check failed in inplace_solve(): size1(A) != size1(B^T)"));
100 
101  switch (viennacl::traits::handle(A).get_active_handle_id())
102  {
104  viennacl::linalg::host_based::inplace_solve(A, false, const_cast<matrix_base<NumericT> &>(proxy_B.lhs()), true, SolverTagT());
105  break;
106  #ifdef VIENNACL_WITH_OPENCL
108  viennacl::linalg::opencl::inplace_solve(A, false, const_cast<matrix_base<NumericT> &>(proxy_B.lhs()), true, SolverTagT());
109  break;
110  #endif
111  #ifdef VIENNACL_WITH_CUDA
113  viennacl::linalg::cuda::inplace_solve(A, false, const_cast<matrix_base<NumericT> &>(proxy_B.lhs()), true, SolverTagT());
114  break;
115  #endif
117  throw memory_exception("not initialised!");
118  default:
119  throw memory_exception("not implemented");
120  }
121  }
122 
123  //upper triangular solver for transposed lower triangular matrices
129  template<typename NumericT, typename SolverTagT>
132  SolverTagT)
133  {
134  assert( (viennacl::traits::size1(proxy_A) == viennacl::traits::size2(proxy_A)) && bool("Size check failed in inplace_solve(): size1(A) != size2(A)"));
135  assert( (viennacl::traits::size1(proxy_A) == viennacl::traits::size1(B)) && bool("Size check failed in inplace_solve(): size1(A^T) != size1(B)"));
136 
137  switch (viennacl::traits::handle(proxy_A.lhs()).get_active_handle_id())
138  {
140  viennacl::linalg::host_based::inplace_solve(const_cast<matrix_base<NumericT> &>(proxy_A.lhs()), true, B, false, SolverTagT());
141  break;
142  #ifdef VIENNACL_WITH_OPENCL
144  viennacl::linalg::opencl::inplace_solve(const_cast<matrix_base<NumericT> &>(proxy_A.lhs()), true, B, false, SolverTagT());
145  break;
146  #endif
147  #ifdef VIENNACL_WITH_CUDA
149  viennacl::linalg::cuda::inplace_solve(const_cast<matrix_base<NumericT> &>(proxy_A.lhs()), true, B, false, SolverTagT());
150  break;
151  #endif
153  throw memory_exception("not initialised!");
154  default:
155  throw memory_exception("not implemented");
156  }
157  }
158 
164  template<typename NumericT, typename SolverTagT>
167  SolverTagT)
168  {
169  assert( (viennacl::traits::size1(proxy_A) == viennacl::traits::size2(proxy_A)) && bool("Size check failed in inplace_solve(): size1(A) != size2(A)"));
170  assert( (viennacl::traits::size1(proxy_A) == viennacl::traits::size1(proxy_B)) && bool("Size check failed in inplace_solve(): size1(A^T) != size1(B^T)"));
171 
172  switch (viennacl::traits::handle(proxy_A.lhs()).get_active_handle_id())
173  {
175  viennacl::linalg::host_based::inplace_solve(const_cast<matrix_base<NumericT> &>(proxy_A.lhs()), true,
176  const_cast<matrix_base<NumericT> &>(proxy_B.lhs()), true, SolverTagT());
177 
178  break;
179  #ifdef VIENNACL_WITH_OPENCL
181  viennacl::linalg::opencl::inplace_solve(const_cast<matrix_base<NumericT> &>(proxy_A.lhs()), true,
182  const_cast<matrix_base<NumericT> &>(proxy_B.lhs()), true, SolverTagT());
183  break;
184  #endif
185  #ifdef VIENNACL_WITH_CUDA
187  viennacl::linalg::cuda::inplace_solve(const_cast<matrix_base<NumericT> &>(proxy_A.lhs()), true,
188  const_cast<matrix_base<NumericT> &>(proxy_B.lhs()), true, SolverTagT());
189  break;
190  #endif
192  throw memory_exception("not initialised!");
193  default:
194  throw memory_exception("not implemented");
195  }
196  }
197 
198  //
199  // A \ b
200  //
201 
202  template<typename NumericT, typename SolverTagT>
204  const vector_base<NumericT> & vec,
205  SolverTagT)
206  {
207  assert( (mat.size1() == vec.size()) && bool("Size check failed in inplace_solve(): size1(A) != size(b)"));
208  assert( (mat.size2() == vec.size()) && bool("Size check failed in inplace_solve(): size2(A) != size(b)"));
209 
211  {
213  viennacl::linalg::host_based::inplace_solve(mat, false, const_cast<vector_base<NumericT> &>(vec), SolverTagT());
214  break;
215  #ifdef VIENNACL_WITH_OPENCL
217  viennacl::linalg::opencl::inplace_solve(mat, false, const_cast<vector_base<NumericT> &>(vec), SolverTagT());
218  break;
219  #endif
220  #ifdef VIENNACL_WITH_CUDA
222  viennacl::linalg::cuda::inplace_solve(mat, false, const_cast<vector_base<NumericT> &>(vec), SolverTagT());
223  break;
224  #endif
226  throw memory_exception("not initialised!");
227  default:
228  throw memory_exception("not implemented");
229  }
230  }
231 
237  template<typename NumericT, typename SolverTagT>
239  const vector_base<NumericT> & vec,
240  SolverTagT)
241  {
242  assert( (proxy.lhs().size1() == vec.size()) && bool("Size check failed in inplace_solve(): size1(A) != size(b)"));
243  assert( (proxy.lhs().size2() == vec.size()) && bool("Size check failed in inplace_solve(): size2(A) != size(b)"));
244 
245  switch (viennacl::traits::handle(proxy.lhs()).get_active_handle_id())
246  {
248  viennacl::linalg::host_based::inplace_solve(proxy.lhs(), true, const_cast<vector_base<NumericT> &>(vec), SolverTagT());
249  break;
250  #ifdef VIENNACL_WITH_OPENCL
252  viennacl::linalg::opencl::inplace_solve(proxy.lhs(), true, const_cast<vector_base<NumericT> &>(vec), SolverTagT());
253  break;
254  #endif
255  #ifdef VIENNACL_WITH_CUDA
257  viennacl::linalg::cuda::inplace_solve(proxy.lhs(), true, const_cast<vector_base<NumericT> &>(vec), SolverTagT());
258  break;
259  #endif
261  throw memory_exception("not initialised!");
262  default:
263  throw memory_exception("not implemented");
264  }
265  }
266 
267 
268  template<typename MatrixT1, typename MatrixT2, typename SolverTagT>
269  void inplace_solve_lower_impl(MatrixT1 const & A, MatrixT2 & B, SolverTagT)
270  {
272  if (A.size1() <= blockSize)
273  inplace_solve_kernel(A, B, SolverTagT());
274  else
275  {
276  for (vcl_size_t i = 0; i < A.size1(); i = i + blockSize)
277  {
278  vcl_size_t Apos1 = i;
279  vcl_size_t Apos2 = i + blockSize;
280  vcl_size_t Bpos = B.size2();
281  if (Apos2 > A.size1())
282  {
283  inplace_solve_kernel(viennacl::project(A, viennacl::range(Apos1, A.size1()), viennacl::range(Apos1, A.size2())),
284  viennacl::project(B, viennacl::range(Apos1, A.size1()), viennacl::range(0, Bpos)),
285  SolverTagT());
286  break;
287  }
289  viennacl::project(B, viennacl::range(Apos1, Apos2), viennacl::range(0, Bpos)),
290  SolverTagT());
291  if (Apos2 < A.size1())
292  {
293  viennacl::project(B, viennacl::range(Apos2, B.size1()), viennacl::range(0, Bpos)) -=
294  viennacl::linalg::prod(viennacl::project(const_cast<MatrixT1 &>(A), viennacl::range(Apos2, A.size1()), viennacl::range(Apos1, Apos2)),
295  viennacl::project(B, viennacl::range(Apos1, Apos2), viennacl::range(0, Bpos)));
296  }
297  }
298  }
299  }
300 
301  template<typename MatrixT1, typename MatrixT2>
302  void inplace_solve_impl(MatrixT1 const & A, MatrixT2 & B, viennacl::linalg::lower_tag)
303  {
305  }
306 
307  template<typename MatrixT1, typename MatrixT2>
308  void inplace_solve_impl(MatrixT1 const & A, MatrixT2 & B, viennacl::linalg::unit_lower_tag)
309  {
311  }
312 
313  template<typename MatrixT1, typename MatrixT2, typename SolverTagT>
314  void inplace_solve_upper_impl(MatrixT1 const & A, MatrixT2 & B, SolverTagT)
315  {
316  int blockSize = VIENNACL_DIRECT_SOLVE_BLOCKSIZE;
317  if (static_cast<int>(A.size1()) <= blockSize)
318  inplace_solve_kernel(A, B, SolverTagT());
319  else
320  {
321  for (int i = static_cast<int>(A.size1()); i > 0; i = i - blockSize)
322  {
323  int Apos1 = i - blockSize;
324  vcl_size_t Apos2 = vcl_size_t(i);
325  vcl_size_t Bpos = B.size2();
326  if (Apos1 < 0)
327  {
329  viennacl::project(B, viennacl::range(0, Apos2), viennacl::range(0, Bpos)),
330  SolverTagT());
331  break;
332  }
334  viennacl::project(B, viennacl::range(vcl_size_t(Apos1), Apos2), viennacl::range(0, Bpos)),
335  SolverTagT());
336  if (Apos1 > 0)
337  {
338  viennacl::project(B, viennacl::range(0, vcl_size_t(Apos1)), viennacl::range(0, Bpos)) -=
339  viennacl::linalg::prod(viennacl::project(const_cast<MatrixT1 &>(A), viennacl::range(0, vcl_size_t(Apos1)), viennacl::range(vcl_size_t(Apos1), Apos2)),
340  viennacl::project(B, viennacl::range(vcl_size_t(Apos1), Apos2), viennacl::range(0, Bpos)));
341  }
342  }
343  }
344  }
345 
346  template<typename MatrixT1, typename MatrixT2>
347  void inplace_solve_impl(MatrixT1 const & A, MatrixT2 & B, viennacl::linalg::upper_tag)
348  {
350  }
351 
352  template<typename MatrixT1, typename MatrixT2>
353  void inplace_solve_impl(MatrixT1 const & A, MatrixT2 & B, viennacl::linalg::unit_upper_tag)
354  {
356  }
357 
358 } // namespace detail
359 
365 template<typename NumericT, typename SolverTagT>
368  SolverTagT)
369 {
370  detail::inplace_solve_impl(A,B,SolverTagT());
371 }
372 
378 template<typename NumericT, typename SolverTagT>
381  SolverTagT)
382 {
383  matrix_base<NumericT> B(proxy_B);
384  detail::inplace_solve_impl(A,B,SolverTagT());
385  B=trans(B);
386  const_cast<matrix_base<NumericT> &>(proxy_B.lhs()) = B;
387 }
388 
389 //upper triangular solver for transposed lower triangular matrices
395 template<typename NumericT, typename SolverTagT>
398  SolverTagT)
399 {
400  matrix_base<NumericT> A(proxy_A);
401  detail::inplace_solve_impl(A,B,SolverTagT());
402 }
403 
409 template<typename NumericT, typename SolverTagT>
412  SolverTagT)
413 {
414  matrix_base<NumericT> A(proxy_A);
415  matrix_base<NumericT> B(proxy_B);
416  detail::inplace_solve_impl(A,B,SolverTagT());
417  B=trans(B);
418  const_cast<matrix_base<NumericT> &>(proxy_B.lhs()) = B;
419 }
420 
421 
423 
424 
431 template<typename NumericT, typename SolverTagT>
433  const matrix_base<NumericT> & B,
434  SolverTagT tag)
435 {
436  // do an inplace solve on the result vector:
437  matrix_base<NumericT> result(B);
438  inplace_solve(A, result, tag);
439  return result;
440 }
441 
448 template<typename NumericT, typename SolverTagT>
451  SolverTagT tag)
452 {
453  // do an inplace solve on the result vector:
454  matrix_base<NumericT> result(proxy);
455  inplace_solve(A, result, tag);
456  return result;
457 }
458 
465 template<typename NumericT, typename SolverTagT>
467  const matrix_base<NumericT> & B,
468  SolverTagT tag)
469 {
470  // do an inplace solve on the result vector:
471  matrix_base<NumericT> result(B);
472  inplace_solve(proxy, result, tag);
473  return result;
474 }
475 
482 template<typename NumericT, typename SolverTagT>
485  SolverTagT tag)
486 {
487  // run an inplace solve on the result vector:
488  matrix_base<NumericT> result(proxy_B);
489  inplace_solve(proxy_A, result, tag);
490  return result;
491 }
492 
493 //
495 //
496 
497 namespace detail
498 {
499  template<typename MatrixT1, typename VectorT, typename SolverTagT>
500  void inplace_solve_lower_vec_impl(MatrixT1 const & A, VectorT & B, SolverTagT)
501  {
503  if (A.size1() < blockSize)
504  inplace_solve_vec_kernel(A, B, SolverTagT());
505  else
506  {
507  for (vcl_size_t i = 0; i < A.size1(); i = i + blockSize)
508  {
509  vcl_size_t Apos1 = i;
510  vcl_size_t Apos2 = i + blockSize;
511  if (i > A.size2())
512  {
513  inplace_solve_vec_kernel(viennacl::project(A, viennacl::range(Apos1, A.size1()), viennacl::range(Apos1, A.size2())),
514  viennacl::project(B, viennacl::range(Apos1, A.size1())),
515  SolverTagT());
516  break;
517  }
519  viennacl::project(B, viennacl::range(Apos1, Apos2)),
520  SolverTagT());
521  if (Apos2 < A.size1())
522  {
523  VectorT temp(viennacl::linalg::prod(viennacl::project(A, viennacl::range(Apos2, A.size1()), viennacl::range(Apos1, Apos2)),
524  viennacl::project(B, viennacl::range(Apos1, Apos2))));
525  viennacl::project(B, viennacl::range(Apos2, A.size1())) -= temp;
526  }
527  }
528  }
529  }
530 
531  template<typename MatrixT1, typename VectorT>
532  void inplace_solve_vec_impl(MatrixT1 const & A, VectorT & B, viennacl::linalg::lower_tag)
533  {
535  }
536 
537  template<typename MatrixT1, typename VectorT>
538  void inplace_solve_vec_impl(MatrixT1 const & A, VectorT & B, viennacl::linalg::unit_lower_tag)
539  {
541  }
542 
543  template<typename MatrixT1, typename VectorT, typename SolverTagT>
544  void inplace_solve_upper_vec_impl(MatrixT1 const & A, VectorT & B, SolverTagT)
545  {
546  int blockSize = VIENNACL_DIRECT_SOLVE_BLOCKSIZE;
547  if (static_cast<int>(A.size1()) < blockSize)
548  inplace_solve_vec_kernel(A, B, SolverTagT());
549  else
550  {
551  for (int i = static_cast<int>(A.size1()); i > 0; i = i - blockSize)
552  {
553  int Apos1 = i - blockSize;
554  vcl_size_t Apos2 = vcl_size_t(i);
555  if (Apos1 < 0)
556  {
558  viennacl::project(B, viennacl::range(0, Apos2)),
559  SolverTagT());
560  break;
561  }
563  viennacl::project(B, viennacl::range(vcl_size_t(Apos1), Apos2)),
564  SolverTagT());
565  if (Apos1 > 0)
566  {
568  viennacl::project(B, viennacl::range(vcl_size_t(Apos1), Apos2))));
569  viennacl::project(B, viennacl::range(0, vcl_size_t(Apos1))) -= temp;
570  }
571  }
572  }
573  }
574 
575  template<typename MatrixT1, typename VectorT>
576  void inplace_solve_vec_impl(MatrixT1 const & A, VectorT & B, viennacl::linalg::upper_tag)
577  {
579  }
580 
581  template<typename MatrixT1, typename VectorT>
582  void inplace_solve_vec_impl(MatrixT1 const & A, VectorT & B, viennacl::linalg::unit_upper_tag)
583  {
585  }
586 
587 } // namespace detail
588 
595 template<typename NumericT, typename SolverTagT>
597  vector_base<NumericT> & vec,
598  SolverTagT const & tag)
599 {
600 
601  detail::inplace_solve_vec_impl(mat, vec, tag);
602 }
603 
610 template<typename NumericT, typename SolverTagT>
612  vector_base<NumericT> & vec,
613  SolverTagT const & tag)
614 {
615  matrix_base<NumericT> mat(proxy);
616  detail::inplace_solve_vec_impl(mat, vec, tag);
617 }
618 
619 
628 template<typename NumericT>
630  const vector_base<NumericT> & vec,
631  viennacl::linalg::upper_tag const & tag)
632 {
633  // run an inplace solve on the result vector:
634  vector<NumericT> result(vec);
635  inplace_solve(mat, result, tag);
636  return result;
637 }
638 
647 template<typename NumericT>
649  const vector_base<NumericT> & vec,
651 {
652  // run an inplace solve on the result vector:
653  vector<NumericT> result(vec);
654  inplace_solve(mat, result, tag);
655  return result;
656 }
657 
666 template<typename NumericT>
668  const vector_base<NumericT> & vec,
669  viennacl::linalg::lower_tag const & tag)
670 {
671  // run an inplace solve on the result vector:
672  vector<NumericT> result(vec);
673  inplace_solve(mat, result, tag);
674  return result;
675 }
676 
685 template<typename NumericT>
687  const vector_base<NumericT> & vec,
689 {
690  // run an inplace solve on the result vector:
691  vector<NumericT> result(vec);
692  inplace_solve(mat, result, tag);
693  return result;
694 }
695 
702 template<typename NumericT, typename SolverTagT>
704  const vector_base<NumericT> & vec,
705  SolverTagT const & tag)
706 {
707  // run an inplace solve on the result vector:
708  vector<NumericT> result(vec);
709  inplace_solve(proxy, result, tag);
710  return result;
711 }
712 
713 
714 }
715 }
716 
717 #endif
Implementations of dense direct triangular solvers are found here.
void inplace_solve(const matrix_base< NumericT > &A, matrix_base< NumericT > &B, SolverTagT)
Direct inplace solver for triangular systems with multiple right hand sides, i.e. A \ B (MATLAB notat...
void inplace_solve_upper_impl(MatrixT1 const &A, MatrixT2 &B, SolverTagT)
Exception class in case of memory errors.
Definition: forwards.h:571
Generic interface for matrix-vector and matrix-matrix products. See viennacl/linalg/vector_operations...
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 tag class representing a lower triangular matrix.
Definition: forwards.h:809
void inplace_solve(const matrix_base< NumericT > &A, bool trans_A, matrix_base< NumericT > &B, bool trans_B, SolverTagT)
Direct inplace solver for triangular systems with multiple right hand sides, i.e. A \ B (MATLAB notat...
Expression template class for representing a tree of expressions which ultimately result in a matrix...
Definition: forwards.h:340
This file provides the forward declarations for the main types used within ViennaCL.
void inplace_solve_upper_vec_impl(MatrixT1 const &A, VectorT &B, SolverTagT)
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
basic_range range
Definition: forwards.h:423
VectorT prod(std::vector< std::vector< T, A1 >, A2 > const &matrix, VectorT const &vector)
Definition: prod.hpp:91
void inplace_solve_vec_impl(MatrixT1 const &A, VectorT &B, viennacl::linalg::lower_tag)
A tag class representing an upper triangular matrix.
Definition: forwards.h:814
void inplace_solve_lower_vec_impl(MatrixT1 const &A, VectorT &B, SolverTagT)
void inplace_solve(const matrix_base< NumericT > &A, bool trans_A, matrix_base< NumericT > &B, bool trans_B, SolverTagT tag)
Direct inplace solver for triangular systems with multiple right hand sides, i.e. A \ B (MATLAB notat...
void inplace_solve(const matrix_base< NumericT > &A, bool A_trans, matrix_base< NumericT > &B, bool B_trans, SolverTagT)
Direct inplace solver for dense triangular systems. Matlab notation: A \ B.
void inplace_solve_kernel(const matrix_base< NumericT > &A, const matrix_base< NumericT > &B, SolverTagT)
Direct inplace solver for dense triangular systems using a single kernel launch. Matlab notation: A \...
matrix_range< MatrixType > project(MatrixType const &A, viennacl::range const &r1, viennacl::range const &r2)
std::size_t vcl_size_t
Definition: forwards.h:74
size_type size2() const
Returns the number of columns.
Definition: matrix_def.hpp:217
void trans(const matrix_expression< const matrix_base< NumericT, SizeT, DistanceT >, const matrix_base< NumericT, SizeT, DistanceT >, op_trans > &proxy, matrix_base< NumericT > &temp_trans)
void inplace_solve_impl(MatrixT1 const &A, MatrixT2 &B, viennacl::linalg::lower_tag)
size_type size1() const
Returns the number of rows.
Definition: matrix_def.hpp:215
Proxy classes for vectors.
#define VIENNACL_DIRECT_SOLVE_BLOCKSIZE
Proxy classes for matrices.
void inplace_solve_lower_impl(MatrixT1 const &A, MatrixT2 &B, SolverTagT)
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
size_type size() const
Returns the length of the vector (cf. std::vector)
Definition: vector_def.hpp:118
Implementations of dense direct solvers using CUDA are found here.
A range class that refers to an interval [start, stop), where 'start' is included, and 'stop' is excluded.
Definition: forwards.h:423
A tag class representing a lower triangular matrix with unit diagonal.
Definition: forwards.h:819
A tag class representing transposed matrices.
Definition: forwards.h:219
viennacl::backend::mem_handle & handle(T &obj)
Returns the generic memory handle of an object. Non-const version.
Definition: handle.hpp:41
void inplace_solve_vec_kernel(const matrix_base< NumericT > &mat, const vector_base< NumericT > &vec, SolverTagT)
Implementations of dense direct solvers are found here.
Simple enable-if variant that uses the SFINAE pattern.
A tag class representing an upper triangular matrix with unit diagonal.
Definition: forwards.h:824
viennacl::vector< NumericT > solve(MatrixT const &A, viennacl::vector_base< NumericT > const &rhs, bicgstab_tag const &tag, viennacl::linalg::no_precond)
Implementation of a pipelined stabilized Bi-conjugate gradient solver.
Definition: bicgstab.hpp:88
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:118