Sophie

Sophie

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

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

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

.in +1c
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEGLStreamConsumerAcquireFrame\fP (\fBcudaEglStreamConnection\fP *conn, \fBcudaGraphicsResource_t\fP *pCudaResource, \fBcudaStream_t\fP *pStream, unsigned int timeout)"
.br
.RI "\fIAcquire an image frame from the EGLStream with CUDA as a consumer. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEGLStreamConsumerConnect\fP (\fBcudaEglStreamConnection\fP *conn, EGLStreamKHR eglStream)"
.br
.RI "\fIConnect CUDA to EGLStream as a consumer. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEGLStreamConsumerConnectWithFlags\fP (\fBcudaEglStreamConnection\fP *conn, EGLStreamKHR eglStream, unsigned int flags)"
.br
.RI "\fIConnect CUDA to EGLStream as a consumer with given flags. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEGLStreamConsumerDisconnect\fP (\fBcudaEglStreamConnection\fP *conn)"
.br
.RI "\fIDisconnect CUDA as a consumer to EGLStream . \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEGLStreamConsumerReleaseFrame\fP (\fBcudaEglStreamConnection\fP *conn, \fBcudaGraphicsResource_t\fP pCudaResource, \fBcudaStream_t\fP *pStream)"
.br
.RI "\fIReleases the last frame acquired from the EGLStream. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEGLStreamProducerConnect\fP (\fBcudaEglStreamConnection\fP *conn, EGLStreamKHR eglStream, EGLint width, EGLint height)"
.br
.RI "\fIConnect CUDA to EGLStream as a producer. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEGLStreamProducerDisconnect\fP (\fBcudaEglStreamConnection\fP *conn)"
.br
.RI "\fIDisconnect CUDA as a producer to EGLStream . \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEGLStreamProducerPresentFrame\fP (\fBcudaEglStreamConnection\fP *conn, \fBcudaEglFrame\fP eglframe, \fBcudaStream_t\fP *pStream)"
.br
.RI "\fIPresent a CUDA eglFrame to the EGLStream with CUDA as a producer. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEGLStreamProducerReturnFrame\fP (\fBcudaEglStreamConnection\fP *conn, \fBcudaEglFrame\fP *eglframe, \fBcudaStream_t\fP *pStream)"
.br
.RI "\fIReturn the CUDA eglFrame to the EGLStream last released by the consumer. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaEventCreateFromEGLSync\fP (\fBcudaEvent_t\fP *phEvent, EGLSyncKHR eglSync, unsigned int flags)"
.br
.RI "\fICreates an event from EGLSync object. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaGraphicsEGLRegisterImage\fP (struct cudaGraphicsResource **pCudaResource, EGLImageKHR image, unsigned int flags)"
.br
.RI "\fIRegisters an EGL image. \fP"
.ti -1c
.RI "\fBcudaError_t\fP \fBcudaGraphicsResourceGetMappedEglFrame\fP (\fBcudaEglFrame\fP *eglFrame, \fBcudaGraphicsResource_t\fP resource, unsigned int index, unsigned int mipLevel)"
.br
.RI "\fIGet an eglFrame through which to access a registered EGL graphics resource. \fP"
.in -1c
.SH "Detailed Description"
.PP 
This section describes the EGL interoperability functions of the CUDA runtime application programming interface. Note that mapping of EGL resources is performed with the graphics API agnostic, resource mapping interface described in \fBGraphics Interopability\fP. 
.SH "Function Documentation"
.PP 
.SS "\fBcudaError_t\fP cudaEGLStreamConsumerAcquireFrame (\fBcudaEglStreamConnection\fP * conn, \fBcudaGraphicsResource_t\fP * pCudaResource, \fBcudaStream_t\fP * pStream, unsigned int timeout)"
.PP
Acquire an image frame from EGLStreamKHR. \fBcudaGraphicsResourceGetMappedEglFrame\fP can be called on \fCpCudaResource\fP to get \fBcudaEglFrame\fP.
.PP
\fBParameters:\fP
.RS 4
\fIconn\fP - Connection on which to acquire 
.br
\fIpCudaResource\fP - CUDA resource on which the EGLStream frame will be mapped for use. 
.br
\fIpStream\fP - CUDA stream for synchronization and any data migrations implied by \fBcudaEglResourceLocationFlags\fP. 
.br
\fItimeout\fP - Desired timeout in usec.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP, \fBcudaErrorLaunchTimeout\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaEGLStreamConsumerConnect\fP, \fBcudaEGLStreamConsumerDisconnect\fP, \fBcudaEGLStreamConsumerReleaseFrame\fP, cuEGLStreamConsumerAcquireFrame 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEGLStreamConsumerConnect (\fBcudaEglStreamConnection\fP * conn, EGLStreamKHR eglStream)"
.PP
Connect CUDA as a consumer to EGLStreamKHR specified by \fCeglStream\fP.
.PP
The EGLStreamKHR is an EGL object that transfers a sequence of image frames from one API to another.
.PP
\fBParameters:\fP
.RS 4
\fIconn\fP - Pointer to the returned connection handle 
.br
\fIeglStream\fP - EGLStreamKHR handle
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaEGLStreamConsumerDisconnect\fP, \fBcudaEGLStreamConsumerAcquireFrame\fP, \fBcudaEGLStreamConsumerReleaseFrame\fP, cuEGLStreamConsumerConnect 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEGLStreamConsumerConnectWithFlags (\fBcudaEglStreamConnection\fP * conn, EGLStreamKHR eglStream, unsigned int flags)"
.PP
Connect CUDA as a consumer to EGLStreamKHR specified by \fCstream\fP with specified \fCflags\fP defined by \fBcudaEglResourceLocationFlags\fP.
.PP
The flags specify whether the consumer wants to access frames from system memory or video memory. Default is \fBcudaEglResourceLocationVidmem\fP.
.PP
\fBParameters:\fP
.RS 4
\fIconn\fP - Pointer to the returned connection handle 
.br
\fIeglStream\fP - EGLStreamKHR handle 
.br
\fIflags\fP - Flags denote intended location - system or video.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaEGLStreamConsumerDisconnect\fP, \fBcudaEGLStreamConsumerAcquireFrame\fP, \fBcudaEGLStreamConsumerReleaseFrame\fP, cuEGLStreamConsumerConnectWithFlags 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEGLStreamConsumerDisconnect (\fBcudaEglStreamConnection\fP * conn)"
.PP
Disconnect CUDA as a consumer to EGLStreamKHR.
.PP
\fBParameters:\fP
.RS 4
\fIconn\fP - Conection to disconnect.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaEGLStreamConsumerConnect\fP, \fBcudaEGLStreamConsumerAcquireFrame\fP, \fBcudaEGLStreamConsumerReleaseFrame\fP, cuEGLStreamConsumerDisconnect 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEGLStreamConsumerReleaseFrame (\fBcudaEglStreamConnection\fP * conn, \fBcudaGraphicsResource_t\fP pCudaResource, \fBcudaStream_t\fP * pStream)"
.PP
Release the acquired image frame specified by \fCpCudaResource\fP to EGLStreamKHR.
.PP
\fBParameters:\fP
.RS 4
\fIconn\fP - Connection on which to release 
.br
\fIpCudaResource\fP - CUDA resource whose corresponding frame is to be released 
.br
\fIpStream\fP - CUDA stream on which release will be done.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaEGLStreamConsumerConnect\fP, \fBcudaEGLStreamConsumerDisconnect\fP, \fBcudaEGLStreamConsumerAcquireFrame\fP, cuEGLStreamConsumerReleaseFrame 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEGLStreamProducerConnect (\fBcudaEglStreamConnection\fP * conn, EGLStreamKHR eglStream, EGLint width, EGLint height)"
.PP
Connect CUDA as a producer to EGLStreamKHR specified by \fCstream\fP.
.PP
The EGLStreamKHR is an EGL object that transfers a sequence of image frames from one API to another.
.PP
\fBParameters:\fP
.RS 4
\fIconn\fP - Pointer to the returned connection handle 
.br
\fIeglStream\fP - EGLStreamKHR handle 
.br
\fIwidth\fP - width of the image to be submitted to the stream 
.br
\fIheight\fP - height of the image to be submitted to the stream
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaEGLStreamProducerDisconnect\fP, \fBcudaEGLStreamProducerPresentFrame\fP, \fBcudaEGLStreamProducerReturnFrame\fP, cuEGLStreamProducerConnect 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEGLStreamProducerDisconnect (\fBcudaEglStreamConnection\fP * conn)"
.PP
Disconnect CUDA as a producer to EGLStreamKHR.
.PP
\fBParameters:\fP
.RS 4
\fIconn\fP - Conection to disconnect.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaEGLStreamProducerConnect\fP, \fBcudaEGLStreamProducerPresentFrame\fP, \fBcudaEGLStreamProducerReturnFrame\fP, cuEGLStreamProducerDisconnect 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEGLStreamProducerPresentFrame (\fBcudaEglStreamConnection\fP * conn, \fBcudaEglFrame\fP eglframe, \fBcudaStream_t\fP * pStream)"
.PP
The \fBcudaEglFrame\fP is defined as: 
.PP
.nf
 typedef struct cudaEglFrame_st {
     union {
         cudaArray_t            pArray[CUDA_EGL_MAX_PLANES];
         struct cudaPitchedPtr  pPitch[CUDA_EGL_MAX_PLANES];
     } frame;
     cudaEglPlaneDesc planeDesc[CUDA_EGL_MAX_PLANES];
     unsigned int planeCount;
     cudaEglFrameType frameType;
     cudaEglColorFormat eglColorFormat;
 } cudaEglFrame;

.fi
.PP
.PP
For \fBcudaEglFrame\fP of type \fBcudaEglFrameTypePitch\fP, the application may present sub-region of a memory allocation. In that case, cudaPitchedPtr::ptr will specify the start address of the sub-region in the allocation and \fBcudaEglPlaneDesc\fP will specify the dimensions of the sub-region.
.PP
\fBParameters:\fP
.RS 4
\fIconn\fP - Connection on which to present the CUDA array 
.br
\fIeglframe\fP - CUDA Eglstream Proucer Frame handle to be sent to the consumer over EglStream. 
.br
\fIpStream\fP - CUDA stream on which to present the frame.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaEGLStreamProducerConnect\fP, \fBcudaEGLStreamProducerDisconnect\fP, \fBcudaEGLStreamProducerReturnFrame\fP, cuEGLStreamProducerPresentFrame 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEGLStreamProducerReturnFrame (\fBcudaEglStreamConnection\fP * conn, \fBcudaEglFrame\fP * eglframe, \fBcudaStream_t\fP * pStream)"
.PP
This API can potentially return cudaErrorLaunchTimeout if the consumer has not returned a frame to EGL stream. If timeout is returned the application can retry.
.PP
\fBParameters:\fP
.RS 4
\fIconn\fP - Connection on which to present the CUDA array 
.br
\fIeglframe\fP - CUDA Eglstream Proucer Frame handle returned from the consumer over EglStream. 
.br
\fIpStream\fP - CUDA stream on which to return the frame.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorLaunchTimeout\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaEGLStreamProducerConnect\fP, \fBcudaEGLStreamProducerDisconnect\fP, \fBcudaEGLStreamProducerPresentFrame\fP, cuEGLStreamProducerReturnFrame 
.RE
.PP

.SS "\fBcudaError_t\fP cudaEventCreateFromEGLSync (\fBcudaEvent_t\fP * phEvent, EGLSyncKHR eglSync, unsigned int flags)"
.PP
Creates an event *phEvent from an EGLSyncKHR eglSync with the flages specified via \fCflags\fP. Valid flags include:
.IP "\(bu" 2
\fBcudaEventDefault\fP: Default event creation flag.
.IP "\(bu" 2
\fBcudaEventBlockingSync\fP: Specifies that the created event should use blocking synchronization. A CPU thread that uses \fBcudaEventSynchronize()\fP to wait on an event created with this flag will block until the event has actually been completed.
.PP
.PP
\fBcudaEventRecord\fP and TimingData are not supported for events created from EGLSync.
.PP
The EGLSyncKHR is an opaque handle to an EGL sync object. typedef void* EGLSyncKHR
.PP
\fBParameters:\fP
.RS 4
\fIphEvent\fP - Returns newly created event 
.br
\fIeglSync\fP - Opaque handle to EGLSync object 
.br
\fIflags\fP - Event creation flags
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInitializationError\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorLaunchFailure\fP, \fBcudaErrorMemoryAllocation\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaEventQuery\fP, \fBcudaEventSynchronize\fP, \fBcudaEventDestroy\fP 
.RE
.PP

.SS "\fBcudaError_t\fP cudaGraphicsEGLRegisterImage (struct cudaGraphicsResource ** pCudaResource, EGLImageKHR image, unsigned int flags)"
.PP
Registers the EGLImageKHR specified by \fCimage\fP for access by CUDA. A handle to the registered object is returned as \fCpCudaResource\fP. Additional Mapping/Unmapping is not required for the registered resource and \fBcudaGraphicsResourceGetMappedEglFrame\fP can be directly called on the \fCpCudaResource\fP.
.PP
The application will be responsible for synchronizing access to shared objects. The application must ensure that any pending operation which access the objects have completed before passing control to CUDA. This may be accomplished by issuing and waiting for glFinish command on all GLcontexts (for OpenGL and likewise for other APIs). The application will be also responsible for ensuring that any pending operation on the registered CUDA resource has completed prior to executing subsequent commands in other APIs accesing the same memory objects. This can be accomplished by calling cuCtxSynchronize or cuEventSynchronize (preferably).
.PP
The surface's intended usage is specified using \fCflags\fP, as follows:
.PP
.IP "\(bu" 2
\fBcudaGraphicsRegisterFlagsNone\fP: 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. This is the default value.
.IP "\(bu" 2
\fBcudaGraphicsRegisterFlagsReadOnly\fP: Specifies that CUDA will not write to this resource.
.IP "\(bu" 2
\fBcudaGraphicsRegisterFlagsWriteDiscard\fP: Specifies that CUDA 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
The EGLImageKHR is an object which can be used to create EGLImage target resource. It is defined as a void pointer. typedef void* EGLImageKHR
.PP
\fBParameters:\fP
.RS 4
\fIpCudaResource\fP - Pointer to the returned object handle 
.br
\fIimage\fP - An EGLImageKHR image which can be used to create target resource. 
.br
\fIflags\fP - Map flags
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidResourceHandle\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaGraphicsUnregisterResource\fP, \fBcudaGraphicsResourceGetMappedEglFrame\fP, cuGraphicsEGLRegisterImage 
.RE
.PP

.SS "\fBcudaError_t\fP cudaGraphicsResourceGetMappedEglFrame (\fBcudaEglFrame\fP * eglFrame, \fBcudaGraphicsResource_t\fP resource, unsigned int index, unsigned int mipLevel)"
.PP
Returns in \fC*eglFrame\fP an eglFrame pointer through which the registered graphics resource \fCresource\fP may be accessed. This API can only be called for EGL graphics resources.
.PP
The \fBcudaEglFrame\fP is defined as 
.PP
.nf
 typedef struct cudaEglFrame_st {
     union {
         cudaArray_t             pArray[CUDA_EGL_MAX_PLANES];
         struct cudaPitchedPtr   pPitch[CUDA_EGL_MAX_PLANES];
     } frame;
     cudaEglPlaneDesc planeDesc[CUDA_EGL_MAX_PLANES];
     unsigned int planeCount;
     cudaEglFrameType frameType;
     cudaEglColorFormat eglColorFormat;
 } cudaEglFrame;

.fi
.PP
.PP
\fBParameters:\fP
.RS 4
\fIeglFrame\fP - Returned eglFrame. 
.br
\fIresource\fP - Registered resource to access. 
.br
\fIindex\fP - Index for cubemap surfaces. 
.br
\fImipLevel\fP - Mipmap level for the subresource to access.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBcudaSuccess\fP, \fBcudaErrorInvalidValue\fP, \fBcudaErrorUnknown\fP
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcudaGraphicsSubResourceGetMappedArray\fP, \fBcudaGraphicsResourceGetMappedPointer\fP, cuGraphicsResourceGetMappedEglFrame 
.RE
.PP

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