Fork me on GitHub
 All Classes Files Functions Variables Groups Pages
cr.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2014 NVIDIA Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
21 #pragma once
22 
23 #include <cusp/detail/config.h>
24 
25 #include <thrust/execution_policy.h>
26 
27 namespace cusp
28 {
29 namespace krylov
30 {
31 
38 /* \cond */
39 
40 template <typename DerivedPolicy,
41  class LinearOperator,
42  class Vector>
43 void cr(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
44  LinearOperator& A,
45  Vector& x,
46  Vector& b);
47 
53 template <class LinearOperator,
54  class Vector>
55 void cr(LinearOperator& A,
56  Vector& x,
57  Vector& b);
58 
63 template <class LinearOperator,
64  class Vector,
65  class Monitor>
66 void cr(LinearOperator& A,
67  Vector& x,
68  Vector& b,
69  Monitor& monitor);
70 
71 template <typename DerivedPolicy,
72  class LinearOperator,
73  class Vector,
74  class Monitor>
75 void cr(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
76  LinearOperator& A,
77  Vector& x,
78  Vector& b,
79  Monitor& monitor);
80 
81 template <typename DerivedPolicy,
82  class LinearOperator,
83  class Vector,
84  class Monitor,
85  class Preconditioner>
86 void cr(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
87  LinearOperator& A,
88  Vector& x,
89  Vector& b,
90  Monitor& monitor,
91  Preconditioner& M);
92 /* \endcond */
93 
155 template <class LinearOperator,
156  class Vector,
157  class Monitor,
158  class Preconditioner>
159 void cr(LinearOperator& A,
160  Vector& x,
161  Vector& b,
162  Monitor& monitor,
163  Preconditioner& M);
167 } // end namespace krylov
168 } // end namespace cusp
169 
170 #include <cusp/krylov/detail/cr.inl>
171 
void cr(LinearOperator &A, Vector &x, Vector &b, Monitor &monitor, Preconditioner &M)
Conjugate Residual method.