CUSP
Loading...
Searching...
No Matches
cg.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 <cusp/detail/execution_policy.h>
26
27namespace cusp
28{
29namespace krylov
30{
31
40/* \cond */
41template <typename DerivedPolicy,
42 typename LinearOperator,
43 typename VectorType1,
44 typename VectorType2,
45 typename Monitor,
46 typename Preconditioner>
47void cg(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
48 const LinearOperator& A,
49 VectorType1& x,
50 const VectorType2& b,
51 Monitor& monitor,
52 Preconditioner& M);
53
54template <typename LinearOperator,
55 typename VectorType1,
56 typename VectorType2,
57 typename Monitor>
58void cg(const LinearOperator& A,
59 VectorType1& x,
60 const VectorType2& b,
61 Monitor& monitor);
62
63template <typename LinearOperator,
64 typename VectorType1,
65 typename VectorType2>
66void cg(const LinearOperator& A,
67 VectorType1& x,
68 const VectorType2& b);
69/* \endcond */
70
134template <typename LinearOperator,
135 typename VectorType1,
136 typename VectorType2,
137 typename Monitor,
138 typename Preconditioner>
139void cg(const LinearOperator& A,
140 VectorType1& x,
141 const VectorType2& b,
142 Monitor& monitor,
143 Preconditioner& M);
147} // end namespace krylov
148} // end namespace cusp
149
150#include <cusp/krylov/detail/cg.inl>
Implements standard convergence criteria and reporting for iterative solvers.
Definition monitor.h:102
void cg(const LinearOperator &A, VectorType1 &x, const VectorType2 &b, Monitor &monitor, Preconditioner &M)
Conjugate Gradient method.