I am writing to a program to create a 2D array on device. The concept of Pitch vis-a-vis Width is not clear to me.
I read some where that…
Why should a row be padded?
Why should the pitch be different from width?
What is this pitch afterall?
And Why should this pitch be passed to the CudaMemcpy2D() function???
Could somebody please explain the underlying idea in detail with an example or two??