Hi all,
I want to allocate the memory of two arrays (dimension: nrows*ncols) using cudaMallocPitch and I was wondering if I can use a single variable safely for the pitch for both of them. Here is my code below:
float2 *A, *B;
size_t pitch_A, pitch_B ;
cudaMallocPitch((void**) &A, &pitch_A, ncols*sizeof(float2), nrows);
cudaMallocPitch((void**) &B, &pitch_B, ncols*sizeof(float2), nrows);
Is there a chance that pitch_A and pitch_B will be different ?
Thanks in advance.