23 #include <cusp/detail/config.h>
25 #include <cusp/execution_policy.h>
37 template <
typename DerivedPolicy,
38 typename LinearOperator,
39 typename MatrixOrVector1,
40 typename MatrixOrVector2>
41 void multiply(
const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
42 const LinearOperator& A,
43 const MatrixOrVector1& B,
99 template <
typename LinearOperator,
100 typename MatrixOrVector1,
101 typename MatrixOrVector2>
102 void multiply(
const LinearOperator& A,
103 const MatrixOrVector1& B,
107 template <
typename DerivedPolicy,
108 typename LinearOperator,
109 typename MatrixOrVector1,
110 typename MatrixOrVector2,
111 typename UnaryFunction,
112 typename BinaryFunction1,
113 typename BinaryFunction2>
114 typename thrust::detail::disable_if_convertible<UnaryFunction,cusp::known_format,void>::type
115 multiply(
const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
116 const LinearOperator& A,
117 const MatrixOrVector1& B,
119 UnaryFunction initialize,
120 BinaryFunction1 combine,
121 BinaryFunction2 reduce);
186 template <
typename LinearOperator,
187 typename MatrixOrVector1,
188 typename MatrixOrVector2,
189 typename UnaryFunction,
190 typename BinaryFunction1,
191 typename BinaryFunction2>
192 void multiply(
const LinearOperator& A,
193 const MatrixOrVector1& B,
195 UnaryFunction initialize,
196 BinaryFunction1 combine,
197 BinaryFunction2 reduce);
200 template <
typename DerivedPolicy,
201 typename LinearOperator,
202 typename MatrixOrVector1,
203 typename MatrixOrVector2,
204 typename UnaryFunction,
205 typename BinaryFunction1,
206 typename BinaryFunction2>
207 void generalized_spgemm(
const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
208 const LinearOperator& A,
209 const MatrixOrVector1& B,
211 UnaryFunction initialize,
212 BinaryFunction1 combine,
213 BinaryFunction2 reduce);
282 template <
typename LinearOperator,
283 typename MatrixOrVector1,
284 typename MatrixOrVector2,
285 typename UnaryFunction,
286 typename BinaryFunction1,
287 typename BinaryFunction2>
289 const MatrixOrVector1& B,
291 UnaryFunction initialize,
292 BinaryFunction1 combine,
293 BinaryFunction2 reduce);
296 template <
typename DerivedPolicy,
297 typename LinearOperator,
301 typename BinaryFunction1,
302 typename BinaryFunction2>
303 void generalized_spmv(
const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
304 const LinearOperator& A,
308 BinaryFunction1 combine,
309 BinaryFunction2 reduce);
373 template <
typename LinearOperator,
377 typename BinaryFunction1,
378 typename BinaryFunction2>
383 BinaryFunction1 combine,
384 BinaryFunction2 reduce);
390 #include <cusp/detail/multiply.inl>
void generalized_spgemm(const LinearOperator &A, const MatrixOrVector1 &B, MatrixOrVector2 &C, UnaryFunction initialize, BinaryFunction1 combine, BinaryFunction2 reduce)
Implements generalized matrix-matrix multiplication.
void generalized_spmv(const LinearOperator &A, const Vector1 &x, const Vector2 &y, Vector3 &z, BinaryFunction1 combine, BinaryFunction2 reduce)
Implements generalized matrix-vector multiplication.
void multiply(const LinearOperator &A, const MatrixOrVector1 &B, MatrixOrVector2 &C, UnaryFunction initialize, BinaryFunction1 combine, BinaryFunction2 reduce)
Implements matrix-vector multiplication with custom combine and reduce functionality.