cudaMalloc error :(

Hey dudes, here is my code

float *hst_matData2=new int[hst_totalSze];

	cudaMemcpy( hst_matData2,dev_matData2, hst_totalSze * sizeof(int),cudaMemcpyDeviceToHost);

calculation on dev_matData2 will be done in kernel but the problem is with cudaMemcpy

how can i do this thing ???

This shouldn’t compile at all:

float *hst_matData2=new int[hst_totalSze];

But I am somewhat confused. You are reporting a cudaMalloc error, but there is no cudaMalloc call in code you posted.

sorry my fault i was in a bit hurry :P

on serious note my apology