Search code examples
cudatextures

Is/was there such a function as cudaMalloc2DArray()?


While reading the book "The CUDA Handbook: A Comprehensive Guide to GPU Programming", I came across a confusion: In a table on section "10.13.2" there is a function called cudaMalloc2DArray() to allocate memory for a CUDA array. Is it just a simple mistake or a deprecated function which is not available in recent CUDA versions?

PS. I can't find cudaMalloc2DArray() on Nvidia's related CUDA references.

EDIT: My question is not about how to allocate 2D Array. Since it's a well known book and widely used by beginners around the world (also I have seen lectures and PPTs based on this book), I thought it's a good place to find out whether it's a mistake or just an obsolete function.


Solution

  • @AnderBiguri described what you should do. For historical reference, though - the answer is No, there wasn't a 2D version of this function - at least not in any CUDA version since 2.3. See:

    http://dirac.ruc.dk/manuals/cuda-2.3/CUDA_ReferenceManual_2.3.pdf

    That site has the CUDA documentation in PDF for multiple older versions.