incomplete type is not allowed

yang
2013-09-13
2013-09-24
  • yang

    yang - 2013-09-13

    When I include "viennacl/linalg/svd.hpp", I got compiling error:

    "~/viennalcl/include/viennacl/ocl/context.hpp", line 627: error:
    incomplete type is not allowed
    viennacl::ocl::kernel temp(kernel_handle, this, p_context_, kernel_name);

    Any suggestions?

    Thanks,
    Yang

     
    Last edit: yang 2013-09-13
  • Karl Rupp

    Karl Rupp - 2013-09-19

    Hi,

    did you compile with the OpenCL backend enabled? SVD is currently only available with the OpenCL backend, so this must be available in order to get the compilation going.

    Best regards,
    Karli

     
  • yang

    yang - 2013-09-20

    Thanks Karli. I enabled the CUDA, OpenCL and OpenMP. I got the same error in both my linux and mac. I'll keep updates.

    Thanks,
    Yang

     
  • yang

    yang - 2013-09-20

    Hi Karli,

    By adding "-DVIENNACL_WITH_OPENCL -fopenmp -DVIENNACL_WITH_OPENMP", I compile viennacl successfully in linux but still get errors in Mac:

    viennacl/ocl/kernel.hpp:192:16: error: request for member ‘handle’ in ‘val’, which is of non-class type ‘const long int’
    assert(&val.handle().opencl_handle().context() == &handle_.context() && bool("Kernel and memory object not in the same context!"));

    Also, the c++11 and pgi compiler seems not being able to compile viennacl.

    Thanks,
    Yang

     
  • yang

    yang - 2013-09-20

    After replacing long with cl_uint in some test cpp files, it makes viennacl compiled.

    Thanks,
    Yang

     
  • Karl Rupp

    Karl Rupp - 2013-09-23

    thanks for letting us know. Could you please let me know which cpp-files you had to edit? Any of the ones shipped in ViennaCL? I'd like to fix these problems so the others won't stumble over it again.

     
  • yang

    yang - 2013-09-23

    Please find all my local modifications as the following:

         if (run_test<viennacl::column_major, cl_uint>(epsilon) != EXIT_SUCCESS)
    

    .//matrix_col_int.cpp

         if (run_test<viennacl::row_major, cl_uint>(epsilon) != EXIT_SUCCESS)
    

    .//matrix_row_int.cpp

         retval = test<cl_uint, viennacl::row_major>(epsilon);
         retval = test<cl_uint, viennacl::column_major>(epsilon);
    

    .//matrix_vector_int.cpp

         result = std::max(double(result), double(*it));
    

    .//vector_operations.hpp

     
  • Karl Rupp

    Karl Rupp - 2013-09-24

    Thanks! Apparently this only affects the latest dev-branch, not the release version. I'll fix this as soon as I've got a Windows machine available again...

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks