23#include <cusp/detail/config.h>
25#include <cusp/detail/format.h>
26#include <cusp/exception.h>
28#include <cusp/detail/matrix_base.h>
110template <
typename ValueType,
typename MemorySpace,
typename IndexType=
int>
111class linear_operator :
public cusp::detail::matrix_base<IndexType,ValueType,MemorySpace,cusp::unknown_format>
115 typedef cusp::detail::matrix_base<IndexType,ValueType,MemorySpace,cusp::unknown_format> Parent;
130 : Parent(num_rows, num_cols) {}
140 : Parent(num_rows, num_cols, num_entries) {}
182template <
typename ValueType,
typename MemorySpace,
typename IndexType=
int>
202 :
Parent(num_rows, num_cols) {}
213 template <
typename DerivedPolicy,
typename VectorType1,
typename VectorType2>
214 void operator()(thrust::execution_policy<DerivedPolicy>& exec,
const VectorType1& x, VectorType2& y)
const
216 cusp::blas::copy(exec, x, y);
227 template <
typename VectorType1,
typename VectorType2>
230 cusp::blas::copy(x, y);
Simple identity operator.
void operator()(thrust::execution_policy< DerivedPolicy > &exec, const VectorType1 &x, VectorType2 &y) const
Apply the identity operator to vector x using an explicit execution policy.
void operator()(const VectorType1 &x, VectorType2 &y) const
identity_operator(IndexType num_rows, IndexType num_cols)
Abstract representation of a linear operator.
linear_operator(IndexType num_rows, IndexType num_cols, IndexType num_entries)
linear_operator(IndexType num_rows, IndexType num_cols)