Fork me on GitHub
 All Classes Files Functions Variables Groups Pages
cg_m.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 
17 
22 #pragma once
23 
24 #include <cusp/detail/config.h>
25 #include <cusp/detail/format.h>
26 
27 #include <thrust/execution_policy.h>
28 
29 namespace cusp
30 {
31 namespace krylov
32 {
33 
40 /* \cond */
41 template <typename DerivedPolicy,
42  class LinearOperator,
43  class VectorType1,
44  class VectorType2,
45  class VectorType3>
46 void cg_m(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
47  LinearOperator& A,
48  VectorType1& x,
49  VectorType2& b,
50  VectorType3& sigma);
51 
64 template <class LinearOperator,
65  class VectorType1,
66  class VectorType2,
67  class VectorType3>
68 void cg_m(LinearOperator& A,
69  VectorType1& x,
70  VectorType2& b,
71  VectorType3& sigma);
72 
73 template <typename DerivedPolicy,
74  class LinearOperator,
75  class VectorType1,
76  class VectorType2,
77  class VectorType3,
78  class Monitor>
79 void cg_m(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
80  LinearOperator& A,
81  VectorType1& x,
82  VectorType2& b,
83  VectorType3& sigma,
84  Monitor& monitor);
85 /* \endcond */
86 
151 template <class LinearOperator,
152  class VectorType1,
153  class VectorType2,
154  class VectorType3,
155  class Monitor>
156 typename thrust::detail::enable_if_convertible<typename LinearOperator::format,cusp::known_format>::type
157 cg_m(LinearOperator& A,
158  VectorType1& x,
159  VectorType2& b,
160  VectorType3& sigma,
161  Monitor& monitor);
165 } // end namespace krylov
166 } // end namespace cusp
167 
168 #include <cusp/krylov/detail/cg_m.inl>
169 
thrust::detail::enable_if_convertible< typename LinearOperator::format, cusp::known_format >::type cg_m(LinearOperator &A, VectorType1 &x, VectorType2 &b, VectorType3 &sigma, Monitor &monitor)
Multi-mass Conjugate Gradient method.