Sophie

Sophie

distrib > Mageia > 7 > x86_64 > media > nonfree-updates > by-pkgid > b86a85131cc739c1c53d0b55840a4328 > files > 3736

nvidia-cuda-toolkit-devel-10.1.168-1.2.mga7.nonfree.x86_64.rpm

.TH "Graphics Interoperability" 3 "24 Apr 2019" "Version 6.0" "Doxygen" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Graphics Interoperability \- 
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaGraphicsMapResources\fP (int count, \fBcudaGraphicsResource_t\fP *resources, \fBcudaStream_t\fP stream=0)"
.br
.RI "\fIMap graphics resources for access by CUDA. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaGraphicsResourceGetMappedMipmappedArray\fP (\fBcudaMipmappedArray_t\fP *mipmappedArray, \fBcudaGraphicsResource_t\fP resource)"
.br
.RI "\fIGet a mipmapped array through which to access a mapped graphics resource. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaGraphicsResourceGetMappedPointer\fP (void **devPtr, size_t *size, \fBcudaGraphicsResource_t\fP resource)"
.br
.RI "\fIGet an device pointer through which to access a mapped graphics resource. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaGraphicsResourceSetMapFlags\fP (\fBcudaGraphicsResource_t\fP resource, unsigned int flags)"
.br
.RI "\fISet usage flags for mapping a graphics resource. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaGraphicsSubResourceGetMappedArray\fP (\fBcudaArray_t\fP *array, \fBcudaGraphicsResource_t\fP resource, unsigned int arrayIndex, unsigned int mipLevel)"
.br
.RI "\fIGet an array through which to access a subresource of a mapped graphics resource. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaGraphicsUnmapResources\fP (int count, \fBcudaGraphicsResource_t\fP *resources, \fBcudaStream_t\fP stream=0)"
.br
.RI "\fIUnmap graphics resources. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaGraphicsUnregisterResource\fP (\fBcudaGraphicsResource_t\fP resource)"
.br
.RI "\fIUnregisters a graphics resource for access by CUDA. \fP"
.in -1c
.SH "Detailed Description"
.PP 
\\brief graphics interoperability functions of the CUDA runtime API (cuda_runtime_api.h)
.PP
This section describes the graphics interoperability functions of the CUDA runtime application programming interface. 
.SH "Function Documentation"
.PP 
.SS "\fBcudaError_t\fP cudaGraphicsMapResources (int count, \fBcudaGraphicsResource_t\fP * resources, \fBcudaStream_t\fP stream = \fC0\fP)"
.PP
Maps the \fCcount\fP graphics resources in \fCresources\fP for access by CUDA.
.PP
The resources in \fCresources\fP may be accessed by CUDA until they are unmapped. The graphics API from which \fCresources\fP were registered should not access any resources while they are mapped by CUDA. If an application does so, the results are undefined.
.PP
This function provides the synchronization guarantee that any graphics calls issued before \fBcudaGraphicsMapResources()\fP will complete before any subsequent CUDA work issued in \fCstream\fP begins.
.PP
If \fCresources\fP contains any duplicate entries then \fBcudaErrorInvalidResourceHandle\fP is returned. If any of \fCresources\fP are presently mapped for access by CUDA then \fBcudaErrorUnknown\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIcount\fP - Number of resources to map 
.br
\fIresources\fP - Resources to map for CUDA 
.br
\fIstream\fP - Stream for synchronization
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorUnknown\fP 
.RE
.PP
\fBNote:\fP
.RS 4
This function uses standard  semantics. 
.PP
Note that this function may also return error codes from previous, asynchronous launches.  
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaGraphicsResourceGetMappedPointer\fP, \fBcudaGraphicsSubResourceGetMappedArray\fP, \fBcudaGraphicsUnmapResources\fP, cuGraphicsMapResources 
.RE
.PP

.SS "\fBcudaError_t\fP cudaGraphicsResourceGetMappedMipmappedArray (\fBcudaMipmappedArray_t\fP * mipmappedArray, \fBcudaGraphicsResource_t\fP resource)"
.PP
Returns in \fC*mipmappedArray\fP a mipmapped array through which the mapped graphics resource \fCresource\fP may be accessed. The value set in \fCmipmappedArray\fP may change every time that \fCresource\fP is mapped.
.PP
If \fCresource\fP is not a texture then it cannot be accessed via an array and \fBcudaErrorUnknown\fP is returned. If \fCresource\fP is not mapped then \fBcudaErrorUnknown\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fImipmappedArray\fP - Returned mipmapped array through which \fCresource\fP may be accessed 
.br
\fIresource\fP - Mapped resource to access
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorUnknown\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.  
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaGraphicsResourceGetMappedPointer\fP, cuGraphicsResourceGetMappedMipmappedArray 
.RE
.PP

.SS "\fBcudaError_t\fP cudaGraphicsResourceGetMappedPointer (void ** devPtr, size_t * size, \fBcudaGraphicsResource_t\fP resource)"
.PP
Returns in \fC*devPtr\fP a pointer through which the mapped graphics resource \fCresource\fP may be accessed. Returns in \fC*size\fP the size of the memory in bytes which may be accessed from that pointer. The value set in \fCdevPtr\fP may change every time that \fCresource\fP is mapped.
.PP
If \fCresource\fP is not a buffer then it cannot be accessed via a pointer and \fBcudaErrorUnknown\fP is returned. If \fCresource\fP is not mapped then \fBcudaErrorUnknown\fP is returned. * 
.PP
\fBParameters:\fP
.RS 4
\fIdevPtr\fP - Returned pointer through which \fCresource\fP may be accessed 
.br
\fIsize\fP - Returned size of the buffer accessible starting at \fC*devPtr\fP 
.br
\fIresource\fP - Mapped resource to access
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorUnknown\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.  
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaGraphicsMapResources\fP, \fBcudaGraphicsSubResourceGetMappedArray\fP, cuGraphicsResourceGetMappedPointer 
.RE
.PP

.SS "\fBcudaError_t\fP cudaGraphicsResourceSetMapFlags (\fBcudaGraphicsResource_t\fP resource, unsigned int flags)"
.PP
Set \fCflags\fP for mapping the graphics resource \fCresource\fP.
.PP
Changes to \fCflags\fP will take effect the next time \fCresource\fP is mapped. The \fCflags\fP argument may be any of the following:
.IP "\(bu" 2
\fBcudaGraphicsMapFlagsNone\fP: Specifies no hints about how \fCresource\fP will be used. It is therefore assumed that CUDA may read from or write to \fCresource\fP.
.IP "\(bu" 2
\fBcudaGraphicsMapFlagsReadOnly\fP: Specifies that CUDA will not write to \fCresource\fP.
.IP "\(bu" 2
\fBcudaGraphicsMapFlagsWriteDiscard\fP: Specifies CUDA will not read from \fCresource\fP and will write over the entire contents of \fCresource\fP, so none of the data previously stored in \fCresource\fP will be preserved.
.PP
.PP
If \fCresource\fP is presently mapped for access by CUDA then \fBcudaErrorUnknown\fP is returned. If \fCflags\fP is not one of the above values then \fBcudaErrorInvalidValue\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIresource\fP - Registered resource to set flags for 
.br
\fIflags\fP - Parameters for resource mapping
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorUnknown\fP, 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.  
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaGraphicsMapResources\fP, cuGraphicsResourceSetMapFlags 
.RE
.PP

.SS "\fBcudaError_t\fP cudaGraphicsSubResourceGetMappedArray (\fBcudaArray_t\fP * array, \fBcudaGraphicsResource_t\fP resource, unsigned int arrayIndex, unsigned int mipLevel)"
.PP
Returns in \fC*array\fP an array through which the subresource of the mapped graphics resource \fCresource\fP which corresponds to array index \fCarrayIndex\fP and mipmap level \fCmipLevel\fP may be accessed. The value set in \fCarray\fP may change every time that \fCresource\fP is mapped.
.PP
If \fCresource\fP is not a texture then it cannot be accessed via an array and \fBcudaErrorUnknown\fP is returned. If \fCarrayIndex\fP is not a valid array index for \fCresource\fP then \fBcudaErrorInvalidValue\fP is returned. If \fCmipLevel\fP is not a valid mipmap level for \fCresource\fP then \fBcudaErrorInvalidValue\fP is returned. If \fCresource\fP is not mapped then \fBcudaErrorUnknown\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIarray\fP - Returned array through which a subresource of \fCresource\fP may be accessed 
.br
\fIresource\fP - Mapped resource to access 
.br
\fIarrayIndex\fP - Array index for array textures or cubemap face index as defined by \fBcudaGraphicsCubeFace\fP for cubemap textures for the subresource to access 
.br
\fImipLevel\fP - Mipmap level for the subresource to access
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorUnknown\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.  
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaGraphicsResourceGetMappedPointer\fP, cuGraphicsSubResourceGetMappedArray 
.RE
.PP

.SS "\fBcudaError_t\fP cudaGraphicsUnmapResources (int count, \fBcudaGraphicsResource_t\fP * resources, \fBcudaStream_t\fP stream = \fC0\fP)"
.PP
Unmaps the \fCcount\fP graphics resources in \fCresources\fP.
.PP
Once unmapped, the resources in \fCresources\fP may not be accessed by CUDA until they are mapped again.
.PP
This function provides the synchronization guarantee that any CUDA work issued in \fCstream\fP before \fBcudaGraphicsUnmapResources()\fP will complete before any subsequently issued graphics work begins.
.PP
If \fCresources\fP contains any duplicate entries then \fBcudaErrorInvalidResourceHandle\fP is returned. If any of \fCresources\fP are not presently mapped for access by CUDA then \fBcudaErrorUnknown\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIcount\fP - Number of resources to unmap 
.br
\fIresources\fP - Resources to unmap 
.br
\fIstream\fP - Stream for synchronization
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorUnknown\fP 
.RE
.PP
\fBNote:\fP
.RS 4
This function uses standard  semantics. 
.PP
Note that this function may also return error codes from previous, asynchronous launches.  
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaGraphicsMapResources\fP, cuGraphicsUnmapResources 
.RE
.PP

.SS "\fBcudaError_t\fP cudaGraphicsUnregisterResource (\fBcudaGraphicsResource_t\fP resource)"
.PP
Unregisters the graphics resource \fCresource\fP so it is not accessible by CUDA unless registered again.
.PP
If \fCresource\fP is invalid then \fBcudaErrorInvalidResourceHandle\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIresource\fP - Resource to unregister
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorUnknown\fP 
.RE
.PP
\fBNote:\fP
.RS 4
Note that this function may also return error codes from previous, asynchronous launches.  
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaGraphicsD3D9RegisterResource\fP, \fBcudaGraphicsD3D10RegisterResource\fP, \fBcudaGraphicsD3D11RegisterResource\fP, \fBcudaGraphicsGLRegisterBuffer\fP, \fBcudaGraphicsGLRegisterImage\fP, cuGraphicsUnregisterResource 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen from the source code.