cufft and cublas

Hi

i am getting fft of two different data sets using cufft . I am keeping the data on device itself.

for example deviceData and rdeviceData are matrix of size 8k*8k and 8k

Now i want to take multiplication using cublas …

double *x_inc, *y_inc;
    
    cublasHandle_t h;
    cublasCreate(&h);
    cublasSetPointerMode(h, CUBLAS_POINTER_MODE_DEVICE);
    cublascdotc(deviceData, rdeviceData, x_, 1, y_, 1, deviceData);

will it work ?? please help me out

You can certainly run a cublas operation on data/results produced by cufft. You would want to leave the data on the device, as you suggest. Beyond that, it’s impossible to tell if your little snippet of code would “work” or not.

i wanted to chk for the parameters ?

r these ok?

no, it doesn’t look right. The first parameter to Cdotc is the cublas handle. The second paramter is N, the length of the vector. Have you looked at the documentation?

http://docs.nvidia.com/cuda/cublas/index.html#cublas-lt-t-gt-dot

Why don’t you start by creating code that will compile first, before asking if it is correct?

Are you wanting a dot product as a result of the multiplication (ie. a single scalar number?) Because that is what Cdotc will produce. So passing deviceData for the result pointer would probably work, but seems a little odd.