Function rcudnn::cudaExternalMemoryGetMappedMipmappedArray [−][src]
pub unsafe extern "C" fn cudaExternalMemoryGetMappedMipmappedArray(
mipmap: *mut *mut cudaMipmappedArray,
extMem: *mut CUexternalMemory_st,
mipmapDesc: *const cudaExternalMemoryMipmappedArrayDesc
) -> cudaError
Expand description
\brief Maps a CUDA mipmapped array onto an external memory object
Maps a CUDA mipmapped array onto an external object and returns a handle to it in \p mipmap.
The properties of the CUDA mipmapped array being mapped must be described in \p mipmapDesc. The structure ::cudaExternalMemoryMipmappedArrayDesc is defined as follows:
\code typedef struct cudaExternalMemoryMipmappedArrayDesc_st { unsigned long long offset; cudaChannelFormatDesc formatDesc; cudaExtent extent; unsigned int flags; unsigned int numLevels; } cudaExternalMemoryMipmappedArrayDesc; \endcode
where ::cudaExternalMemoryMipmappedArrayDesc::offset is the offset in the memory object where the base level of the mipmap chain is. ::cudaExternalMemoryMipmappedArrayDesc::formatDesc describes the format of the data. ::cudaExternalMemoryMipmappedArrayDesc::extent specifies the dimensions of the base level of the mipmap chain. ::cudaExternalMemoryMipmappedArrayDesc::flags are flags associated with CUDA mipmapped arrays. For further details, please refer to the documentation for ::cudaMalloc3DArray. Note that if the mipmapped array is bound as a color target in the graphics API, then the flag ::cudaArrayColorAttachment must be specified in ::cudaExternalMemoryMipmappedArrayDesc::flags. ::cudaExternalMemoryMipmappedArrayDesc::numLevels specifies the total number of levels in the mipmap chain.
The returned CUDA mipmapped array must be freed using ::cudaFreeMipmappedArray.
\param mipmap - Returned CUDA mipmapped array \param extMem - Handle to external memory object \param mipmapDesc - CUDA array descriptor
\return ::cudaSuccess, ::cudaErrorInvalidResourceHandle \notefnerr \note_init_rt \note_callback
\sa ::cudaImportExternalMemory, ::cudaDestroyExternalMemory, ::cudaExternalMemoryGetMappedBuffer
\note If ::cudaExternalMemoryHandleDesc::type is ::cudaExternalMemoryHandleTypeNvSciBuf, then ::cudaExternalMemoryMipmappedArrayDesc::numLevels must not be greater than 1.