Description Usage Arguments Value References See Also
Allocates at least width
(in bytes) * height
bytes of linear memory
on the device and returns a pointer to the allocated memory.
The function may pad the allocation to ensure that corresponding pointers
in any given row will continue to meet the alignment requirements for
coalescing as the address is updated from row to row. The pitch returned in
*pitch
by cudaMallocPitch
() is the width in bytes of the allocation.
The intended usage of pitch
is as a separate parameter of the allocation,
used to compute addresses within the 2D array. Given the row and column of
an array element of type T
, the address is computed as:
T* pElement = (T*)((char*)BaseAddress + Row * pitch) + Column;
1 |
width |
Requested pitched allocation width (in bytes) |
height |
Requested pitched allocation height |
devPtr pitch
http://docs.nvidia.com/cuda/cuda-driver-api/index.html
cudaMalloc
cudaFree
cudaMallocArray
cudaFreeArray
cudaMallocHost
cudaFreeHost
cudaMalloc3D
cudaMalloc3DArray
cudaHostAlloc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.