Hi Souhail,

yes, this looks good.

Please note that the Matlab interface of ViennaCL is fairly dated and uses a pretty old version of ViennaCL. You should benefit substantially from updating the ViennaCL sources to the latest version, yet there may be small changes required in the mex files.

Best regards,
Karli


On 11/22/2017 04:43 PM, Souhail HAGGUI wrote:
Dear Sir,


I think I solve it, in fact the call to the set function should be done as follow 😝


vcl_matrix.set(&(stl_cols[0]), &(stl_rows[0]), entries, static_cast<unsigned int>(num_cols), static_cast<unsigned int>(cols[num_cols]), static_cast<unsigned int>(nnzmax));


Do you agree ?


Best regards,


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*Souhail HAGGUI*
**Ph.D. student, GRESCOM Res.Lab
Engineering School of Communications of Tunis (Sup'Com)
University of Carthage - Web: www.supcom.mincom.tn <http://www.supcom.mincom.tn> mail:<mailto:baili.am...@gmail.com>_hagguisouh...@gmail.com <mailto:baili.am...@gmail.com>_ / _souhail.hag...@supcom.tn <mailto:amira.ba...@supcom.tn>_
------------------------------------------------------------------------
*De :* Souhail HAGGUI
*Envoyé :* mercredi 22 novembre 2017 16:34:51
*À :* viennacl-support@lists.sourceforge.net
*Objet :* Matlab mex compilation problems

Dear Sir,


I am intresseted to test the viennacl tool and I run it succefully with my CUDA card gtx 760 and under Visual Studio 2015. However, when I tried to mex the functions with Matlab. I was able to mes two function succefully(viennacl_gmres.cpp and viennacl_bicgstab.cpp). However with viennacl_cg.cpp I got the following error :


Error using mex
viennacl_cg.cpp
C:\ViennaCL-1.7.1\matlab\viennacl_cg.cpp(45): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data C:\ViennaCL-1.7.1\matlab\viennacl_cg.cpp(48): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data C:\ViennaCL-1.7.1\matlab\viennacl_cg.cpp(51): error C2660: 'viennacl::compressed_matrix<double,1>::set': function does not take 5
arguments

Can you help me please resolving this issue, because when I turned back to the function "set" from compressed_matrix.hpp I found that it accepts already until 6 parameters.

Thank you in advance.

Best regards,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*Souhail HAGGUI*
**Ph.D. student, GRESCOM Res.Lab
Engineering School of Communications of Tunis (Sup'Com)
University of Carthage - Web: www.supcom.mincom.tn <http://www.supcom.mincom.tn> mail:<mailto:baili.am...@gmail.com>_hagguisouh...@gmail.com <mailto:baili.am...@gmail.com>_ / _souhail.hag...@supcom.tn <mailto:amira.ba...@supcom.tn>_


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
ViennaCL-support mailing list
ViennaCL-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-support


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
ViennaCL-support mailing list
ViennaCL-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-support

Reply via email to