Hello , I want to use culatools functions.And they state that I must supply the data in column major order and also the output of data is in column major order.

So,I have a few questions.

1)Let’s say I am using culaDgels(‘N’,N,N, NRHS, A, N, B, N) and I want to access A and B and perform some calculations.

I want to multiply them.Which approach should I use in order to do it?

I mean ,A and B are already in column major order,so in order to multiply them I should do it like I do at row major order? ( I am arranging 2d arrays as 1d)

```
for (int i=0;i<N;i++){
for (int j=0;j<NRHS;j++){
result[i*NRHS+j]=0;
for (int k=0;k<N;k++){
result[i*NRHS+j]+=A[i*N+k]*B[k*NRHS+j];
}
}
}
```

- Also,if I want to generate some random numbers with curand and then want to pass these values to cula function (as A and B matrices) ,should I do something about supplying A and B as column major order?Because the data just pass from device to host,I can’t think of doing anything with them.

Thank you!