I want to calculate x'Ax and x is N x 1 array, A is a N x N matrix.
Because N is very big(about 10,000,000),so I have to make the type of A to be coo_matrix.
../../cusp/system/detail/generic/multiply.inl(131): error: no instance of overloaded function "cusp::system::detail::generic::multiply" matches the argument list
argument types are: (cusp::system::cpp::detail::par_t, const cusp::coo_matrix<int, float, cusp::host_memory>, const cusp::array2d<float, cusp::host_memory, cusp::row_major>, cusp::array2d<float, cusp::host_memory, cusp::row_major>, cusp::constant_functor<float>, thrust::multiplies<float>, thrust::plus<float>, Format1, Format2, Format3)
detected during:
instantiation of "thrust::detail::disable_if_convertible<UnaryFunction, cusp::known_format, void>::type cusp::system::detail::generic::multiply(thrust::execution_policy<DerivedPolicy> &, const LinearOperator &, const MatrixOrVector1 &, MatrixOrVector2 &, UnaryFunction, BinaryFunction1, BinaryFunction2) [with DerivedPolicy=cusp::system::cpp::detail::par_t, LinearOperator=cusp::coo_matrix<int, float, cusp::host_memory>, MatrixOrVector1=cusp::array2d<float, cusp::host_memory, cusp::row_major>, MatrixOrVector2=cusp::array2d<float, cusp::host_memory, cusp::row_major>, UnaryFunction=cusp::constant_functor<float>, BinaryFunction1=thrust::multiplies<float>, BinaryFunction2=thrust::plus<float>]"
../../cusp/detail/multiply.inl(78): here
instantiation of "void cusp::multiply(const thrust::detail::execution_policy_base<DerivedPolicy> &, const LinearOperator &, const MatrixOrVector1 &, MatrixOrVector2 &, UnaryFunction, BinaryFunction1, BinaryFunction2) [with DerivedPolicy=cusp::system::cpp::detail::par_t, LinearOperator=cusp::coo_matrix<int, float, cusp::host_memory>, MatrixOrVector1=cusp::array2d<float, cusp::host_memory, cusp::row_major>, MatrixOrVector2=cusp::array2d<float, cusp::host_memory, cusp::row_major>, UnaryFunction=cusp::constant_functor<float>, BinaryFunction1=thrust::multiplies<float>, BinaryFunction2=thrust::plus<float>]"
(104): here
instantiation of "thrust::detail::disable_if_convertible<LinearOperator::format, cusp::unknown_format, void>::type cusp::system::detail::generic::multiply(thrust::execution_policy<DerivedPolicy> &, const LinearOperator &, const MatrixOrVector1 &, MatrixOrVector2 &) [with DerivedPolicy=cusp::system::cpp::detail::par_t, LinearOperator=cusp::coo_matrix<int, float, cusp::host_memory>, MatrixOrVector1=cusp::array2d<float, cusp::host_memory, cusp::row_major>, MatrixOrVector2=cusp::array2d<float, cusp::host_memory, cusp::row_major>]"
../../cusp/detail/multiply.inl(38): here
instantiation of "void cusp::multiply(const thrust::detail::execution_policy_base<DerivedPolicy> &, const LinearOperator &, const MatrixOrVector1 &, MatrixOrVector2 &) [with DerivedPolicy=cusp::system::cpp::detail::par_t, LinearOperator=cusp::coo_matrix<int, float, cusp::host_memory>, MatrixOrVector1=cusp::array2d<float, cusp::host_memory, cusp::row_major>, MatrixOrVector2=cusp::array2d<float, cusp::host_memory, cusp::row_major>]"
../../cusp/detail/multiply.inl(58): here
instantiation of "void cusp::multiply(const LinearOperator &, const MatrixOrVector1 &, MatrixOrVector2 &) [with LinearOperator=cusp::coo_matrix<int, float, cusp::host_memory>, MatrixOrVector1=cusp::array2d<float, cusp::host_memory, cusp::row_major>, MatrixOrVector2=cusp::array2d<float, cusp::host_memory, cusp::row_major>]"
1 error detected in the compilation of "/tmp/tmpxft_00003c75_00000000-9_test.cpp1.ii".
I want to ask how can I calculate x'Ax while A is coo_matrix. Can you write a simple program to tell me the answer please? ( I am stupid and I am afraid I can't understand your answer if you just tell me to use some other funcion in the cusp libary)