Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > nonfree-release > by-pkgid > d44b02ea46d82d6a48df31bbd1a088f3 > files > 1874

nvidia-cuda-toolkit-devel-6.5.14-6.mga5.nonfree.x86_64.rpm

.TH "Graphics Interoperability" 3 "7 Aug 2014" "Version 6.0" "Doxygen" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Graphics Interoperability \- 
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBCUresult\fP \fBcuGraphicsMapResources\fP (unsigned int count, \fBCUgraphicsResource\fP *resources, \fBCUstream\fP hStream)"
.br
.RI "\fIMap graphics resources for access by CUDA. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuGraphicsResourceGetMappedMipmappedArray\fP (\fBCUmipmappedArray\fP *pMipmappedArray, \fBCUgraphicsResource\fP resource)"
.br
.RI "\fIGet a mipmapped array through which to access a mapped graphics resource. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuGraphicsResourceGetMappedPointer\fP (\fBCUdeviceptr\fP *pDevPtr, size_t *pSize, \fBCUgraphicsResource\fP resource)"
.br
.RI "\fIGet a device pointer through which to access a mapped graphics resource. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuGraphicsResourceSetMapFlags\fP (\fBCUgraphicsResource\fP resource, unsigned int flags)"
.br
.RI "\fISet usage flags for mapping a graphics resource. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuGraphicsSubResourceGetMappedArray\fP (\fBCUarray\fP *pArray, \fBCUgraphicsResource\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 "\fBCUresult\fP \fBcuGraphicsUnmapResources\fP (unsigned int count, \fBCUgraphicsResource\fP *resources, \fBCUstream\fP hStream)"
.br
.RI "\fIUnmap graphics resources. \fP"
.ti -1c
.RI "\fBCUresult\fP \fBcuGraphicsUnregisterResource\fP (\fBCUgraphicsResource\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 low-level CUDA driver API (\fBcuda.h\fP)
.PP
This section describes the graphics interoperability functions of the low-level CUDA driver application programming interface. 
.SH "Function Documentation"
.PP 
.SS "\fBCUresult\fP cuGraphicsMapResources (unsigned int count, \fBCUgraphicsResource\fP * resources, \fBCUstream\fP hStream)"
.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 \fBcuGraphicsMapResources()\fP will complete before any subsequent CUDA work issued in \fCstream\fP begins.
.PP
If \fCresources\fP includes any duplicate entries then \fBCUDA_ERROR_INVALID_HANDLE\fP is returned. If any of \fCresources\fP are presently mapped for access by CUDA then \fBCUDA_ERROR_ALREADY_MAPPED\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIcount\fP - Number of resources to map 
.br
\fIresources\fP - Resources to map for CUDA usage 
.br
\fIhStream\fP - Stream with which to synchronize
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_ALREADY_MAPPED\fP, \fBCUDA_ERROR_UNKNOWN\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
\fBcuGraphicsResourceGetMappedPointer\fP, \fBcuGraphicsSubResourceGetMappedArray\fP, \fBcuGraphicsUnmapResources\fP 
.RE
.PP

.SS "\fBCUresult\fP cuGraphicsResourceGetMappedMipmappedArray (\fBCUmipmappedArray\fP * pMipmappedArray, \fBCUgraphicsResource\fP resource)"
.PP
Returns in \fC*pMipmappedArray\fP a mipmapped array through which the mapped graphics resource \fCresource\fP. The value set in \fC*pMipmappedArray\fP may change every time that \fCresource\fP is mapped.
.PP
If \fCresource\fP is not a texture then it cannot be accessed via a mipmapped array and \fBCUDA_ERROR_NOT_MAPPED_AS_ARRAY\fP is returned. If \fCresource\fP is not mapped then \fBCUDA_ERROR_NOT_MAPPED\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIpMipmappedArray\fP - Returned mipmapped array through which \fCresource\fP may be accessed 
.br
\fIresource\fP - Mapped resource to access
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_NOT_MAPPED\fP, \fBCUDA_ERROR_NOT_MAPPED_AS_ARRAY\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
\fBcuGraphicsResourceGetMappedPointer\fP 
.RE
.PP

.SS "\fBCUresult\fP cuGraphicsResourceGetMappedPointer (\fBCUdeviceptr\fP * pDevPtr, size_t * pSize, \fBCUgraphicsResource\fP resource)"
.PP
Returns in \fC*pDevPtr\fP a pointer through which the mapped graphics resource \fCresource\fP may be accessed. Returns in \fCpSize\fP the size of the memory in bytes which may be accessed from that pointer. The value set in \fCpPointer\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 \fBCUDA_ERROR_NOT_MAPPED_AS_POINTER\fP is returned. If \fCresource\fP is not mapped then \fBCUDA_ERROR_NOT_MAPPED\fP is returned. * 
.PP
\fBParameters:\fP
.RS 4
\fIpDevPtr\fP - Returned pointer through which \fCresource\fP may be accessed 
.br
\fIpSize\fP - Returned size of the buffer accessible starting at \fC*pPointer\fP 
.br
\fIresource\fP - Mapped resource to access
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_NOT_MAPPED\fP, \fBCUDA_ERROR_NOT_MAPPED_AS_POINTER\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
\fBcuGraphicsMapResources\fP, \fBcuGraphicsSubResourceGetMappedArray\fP 
.RE
.PP

.SS "\fBCUresult\fP cuGraphicsResourceSetMapFlags (\fBCUgraphicsResource\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:
.PP
.IP "\(bu" 2
CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this resource will be used. It is therefore assumed that this resource will be read from and written to by CUDA kernels. This is the default value.
.IP "\(bu" 2
CU_GRAPHICS_MAP_RESOURCE_FLAGS_READONLY: Specifies that CUDA kernels which access this resource will not write to this resource.
.IP "\(bu" 2
CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITEDISCARD: Specifies that CUDA kernels which access this resource will not read from this resource and will write over the entire contents of the resource, so none of the data previously stored in the resource will be preserved.
.PP
.PP
If \fCresource\fP is presently mapped for access by CUDA then \fBCUDA_ERROR_ALREADY_MAPPED\fP is returned. If \fCflags\fP is not one of the above values then \fBCUDA_ERROR_INVALID_VALUE\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
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_ALREADY_MAPPED\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
\fBcuGraphicsMapResources\fP 
.RE
.PP

.SS "\fBCUresult\fP cuGraphicsSubResourceGetMappedArray (\fBCUarray\fP * pArray, \fBCUgraphicsResource\fP resource, unsigned int arrayIndex, unsigned int mipLevel)"
.PP
Returns in \fC*pArray\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 \fC*pArray\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 \fBCUDA_ERROR_NOT_MAPPED_AS_ARRAY\fP is returned. If \fCarrayIndex\fP is not a valid array index for \fCresource\fP then \fBCUDA_ERROR_INVALID_VALUE\fP is returned. If \fCmipLevel\fP is not a valid mipmap level for \fCresource\fP then \fBCUDA_ERROR_INVALID_VALUE\fP is returned. If \fCresource\fP is not mapped then \fBCUDA_ERROR_NOT_MAPPED\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIpArray\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 \fBCUarray_cubemap_face\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
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_VALUE\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_NOT_MAPPED\fP, \fBCUDA_ERROR_NOT_MAPPED_AS_ARRAY\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
\fBcuGraphicsResourceGetMappedPointer\fP 
.RE
.PP

.SS "\fBCUresult\fP cuGraphicsUnmapResources (unsigned int count, \fBCUgraphicsResource\fP * resources, \fBCUstream\fP hStream)"
.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 \fBcuGraphicsUnmapResources()\fP will complete before any subsequently issued graphics work begins.
.PP
If \fCresources\fP includes any duplicate entries then \fBCUDA_ERROR_INVALID_HANDLE\fP is returned. If any of \fCresources\fP are not presently mapped for access by CUDA then \fBCUDA_ERROR_NOT_MAPPED\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIcount\fP - Number of resources to unmap 
.br
\fIresources\fP - Resources to unmap 
.br
\fIhStream\fP - Stream with which to synchronize
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_NOT_MAPPED\fP, \fBCUDA_ERROR_UNKNOWN\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
\fBcuGraphicsMapResources\fP 
.RE
.PP

.SS "\fBCUresult\fP cuGraphicsUnregisterResource (\fBCUgraphicsResource\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 \fBCUDA_ERROR_INVALID_HANDLE\fP is returned.
.PP
\fBParameters:\fP
.RS 4
\fIresource\fP - Resource to unregister
.RE
.PP
\fBReturns:\fP
.RS 4
\fBCUDA_SUCCESS\fP, \fBCUDA_ERROR_DEINITIALIZED\fP, \fBCUDA_ERROR_NOT_INITIALIZED\fP, \fBCUDA_ERROR_INVALID_CONTEXT\fP, \fBCUDA_ERROR_INVALID_HANDLE\fP, \fBCUDA_ERROR_UNKNOWN\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
\fBcuGraphicsD3D9RegisterResource\fP, \fBcuGraphicsD3D10RegisterResource\fP, \fBcuGraphicsD3D11RegisterResource\fP, \fBcuGraphicsGLRegisterBuffer\fP, \fBcuGraphicsGLRegisterImage\fP 
.RE
.PP

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