cudpp question

I just start writing my first program with cudpp.

I want to use the multiscan rows in my projects

So this is what I’m trying to do but reach memory violation error.

float d[10][10];

...

size_t dPitch = 0;

CUDA_SAFE_CALL(cudaMallocPitch((void**) &d_d, &dPitch, dCol*sizeof(float) ,dRow);

size_t dWidth = dPitch/sizeof(float);

CUDA_SAFE_CALL(cudaMemcpy2D(d_d, dPitch,h_d,dPitch, dCol*sizeof(float), dRow, cudaMemcpyHostToDevice));

CUDPPResult result1 = cudppPlan(&Dscanplan, config, dRow, dRow,dWidth);

cudppMultiScan(scanplan, d_res, d_d, dRow,dCol);

…then error!

Any help will be welcome.

I just start writing my first program with cudpp.

I want to use the multiscan rows in my projects

So this is what I’m trying to do but reach memory violation error.

float d[10][10];

...

size_t dPitch = 0;

CUDA_SAFE_CALL(cudaMallocPitch((void**) &d_d, &dPitch, dCol*sizeof(float) ,dRow);

size_t dWidth = dPitch/sizeof(float);

CUDA_SAFE_CALL(cudaMemcpy2D(d_d, dPitch,h_d,dPitch, dCol*sizeof(float), dRow, cudaMemcpyHostToDevice));

CUDPPResult result1 = cudppPlan(&Dscanplan, config, dRow, dRow,dWidth);

cudppMultiScan(scanplan, d_res, d_d, dRow,dCol);

…then error!

Any help will be welcome.