Menu

error: ‘viennacl::compressed_matrix<float, 4u> has incomplete type

2014-01-07
2014-01-07
  • Daniel Estrela

    Daniel Estrela - 2014-01-07

    Hi,
    I've tried to to declare a compressed matrix in viennacl with this code snnipet:

    std::vector< std::map< unsigned int, ScalarType > > std_matrixM;
    viennacl::io::read_matrix_market_file(std_matrixM, myoptions.matrixM);
    viennacl::compressed_matrix<ScalarType, 4> vcl_matrixM(std_matrixM.size(), std_matrixM.size());
    

    But when I try to compile:

    g++ -fpermissive spmv.cpp -lOpenCL -o spmv_viennacl_cpu
    

    I got the error:

    error: ‘viennacl::compressed_matrix<float, 4u> vcl_matrixM’ has incomplete type
    

    Thanks in advance for any help,
    Daniel Estrela

     
  • Karl Rupp

    Karl Rupp - 2014-01-07

    Hi Daniel,

    it looks like you have not included

    #include "viennacl/compressed_matrix.hpp"
    

    in your source file.

    Best regards,
    Karli

     

Log in to post a comment.