I am trying to run this C++ console app project using cmakefile and I am getting this error for a cuda optimizer which was written in this project.
// wrap the existing CUDA CSR data in a viennacl::compressed_matrix:
viennacl::compressed_matrix<double> vcl_A(d_L_Row, d_L_Col, d_L, viennacl::CUDA_MEMORY, ncols, ncols, nnzL);
viennacl::vector<double> vcl_R(d_R, viennacl::CUDA_MEMORY, ncols);
viennacl::vector<double> vcl_X(X, viennacl::CUDA_MEMORY, ncols);
for above part of code shows this error:
no instance of constructor "viennacl::compressed_matrix<NumericT, AlignmentV>::compressed_matrix [with NumericT=double, AlignmentV=1U]" matches the argument list
what exactly this means? how to fix it?
The error message states that your line
does not match the expected signature. In this particular case the constructor is defined as
Since integer conversion to vcl_size_t is unlikely to cause this error, most likely the pointer types do not match. Make sure
d_L_Row
andd_L_Col
are pointers tounsigned int
andd_L
is a pointer todouble
. Your compiler has probably provided additional hints as to why the matching fails.Since you are using CUDA, also make sure that the preprocessor define
VIENNACL_WITH_CUDA
is set before the respective#include
statements for the ViennaCL headers.