Sorry, this was a copy/paste failure : the code actually contains the
following lines :<br /><br /><br />rowsB=rowsA;<br />colsB=colsA;<br /><br
/>(in fact thereal code is here :<br /><a
href="http://gitweb.scilab.org/?p=cuda;a=blob;f=simd/sci_gateway/c/sci_simd.c;h=d480c8071070ae5596e1bde42babfc862a2f1620;hb=HEAD">http://gitweb.scilab.org/?p=cuda;a=blob;f=simd/sci_gateway/c/sci_simd.c;h=d480c8071070ae5596e1bde42babfc862a2f1620;hb=HEAD</a><br
/>but it did not work either, but using sciprint I can see that the value
returned by gpuCompute is the right one)<br /><br />Le Jeu 5 novembre 2009
09:44, Yann Collette a écrit : <br />> And what about this: the
value of rowsB and colsB is not defined ? <br />> <br />> <br />>
YC <br />> <br />> <br />> Vincent Lejeune a écrit : <br
/>> <br />>> <br />>> Hi, <br />>> <br />>> <br
/>>> I don't know if it's a bug or if something is missing in my
code... <br />>> The issue is : using the following code, I cannot
get scilab to <br />>> display the mB matrix : <br />>> <br
/>>> #include "stack-c.h" <br />>> #include
"api_scilab.h" <br />>> #include "Scierror.h"
<br />>> <br />>> <br />>> int oclexec(char* fname) {
<br />>> SciErr sciErr; <br />>> int *pB; int rowsB,colsB;
double* mB; int k; <br />>> <br />>>
mB=(double*)malloc(rowsB*colsB*sizeof(double)); <br />>> <br
/>>> <br />>> for(k=0;k<rowsB*colsB;++k) { <br />>>
mB[k]=1.0; } <br />>> <br />>> <br />>> sciErr =
createMatrixOfDouble(pvApiCtx, Rhs + 1, rowsB, colsB,mB ); <br />>>
if(sciErr.iErr) { <br />>> printError(&sciErr, 0); return 0; }
<br />>> <br />>> <br />>> LhsVar(1)=Rhs+1; <br
/>>> <br />>> <br />>> return 0; } <br />>> <br
/>>> <br />>> The gateway is compiling fine, but when I type
B=ocltest(A); , the B <br />>> matrix is equal to A, whereas it is
expected to be a ones matrix. <br />>> <br />>> On the other
hand, the unary test double_writing_api.tst works. <br />>> I'am
currently using the windows 1257195239 build (taken from the <br
/>>> nightly build of scilab 5.2) <br />>> <br />>>
Regards, <br />>> Vincent <br />>> <br />>> <br />>
<br />> <br />> -- <br />> ----------------------------- <br
/>> Yann COLLETTE <br />> Software Development Engineer <br />>
----------------------------- <br />> The Scilab Consortium <br />>
Digiteo Foundation <br />> Domaine de Voluceau <br />> Rocquencourt
- B.P. 105 <br />> 78153 Le Chesnay France <br />> Phone:
+33.1.39.63.57.82 <br />> <br />> <br />> <br />