used cudaMalloc for 1-row matrix instead of cudaMallocPitch