Hi karl For these days, I tried to combine Mathematica and viennaCL to get a develop platform. However, Mathematica use its exclusive CudaMemory mechanism provided a integer ID from which I can't get raw device pointers not right now, anyway. I have to change to Matlab and it offers a ready mxGPUArray methods to extract raw device pointer and wrap it again to Matlab's gpuArray object. But when I test a easy example like c = a+b (a,b,c are device vectors), I face errors:
D:/DevelopeTools/Workspace/Matlab_ViennaCL/test.cu(84): error: no instance
of constructor "viennacl::vector<NumericT, AlignmentV>::vector [with
NumericT=double,
AlignmentV=1U]" matches the argument list
argument types are: (const double *, viennacl::memory_types,
int)
....
My point is, in matlabthe mexfunction
void mexFunction(int nlhs, mxArray *plhs[],
int nrhs, mxArray const *prhs[]){
...}, the *prhs[] must const to avoid unpredictable errors. but in viennaCL
vector.hpp/matrix.hpp/compressed_matrix..., there are not constructor to
include const double * type. Am I right? How to add a match statement in
these .hpp files to solve the problem?
I attached my test files.
Best wishes
Jingbo
test.cu
Description: Binary data
test.m
Description: application/vnd.wolfram.mathematica.package
------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________ ViennaCL-support mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/viennacl-support
