11.01.2014 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

20 Module Documentation<br />

4.6 Event Management<br />

Functions<br />

• cudaError_t cudaEventCreate (cudaEvent_t ∗event)<br />

Creates an event object.<br />

• cudaError_t cudaEventCreateWithFlags (cudaEvent_t ∗event, int flags)<br />

Creates an event object with the specified flags.<br />

• cudaError_t cudaEventDestroy (cudaEvent_t event)<br />

Destroys an event object.<br />

• cudaError_t cudaEventElapsedTime (float ∗ms, cudaEvent_t start, cudaEvent_t end)<br />

Computes the elapsed time between events.<br />

• cudaError_t cudaEventQuery (cudaEvent_t event)<br />

Query if an event has been recorded.<br />

• cudaError_t cudaEventRecord (cudaEvent_t event, cudaStream_t stream)<br />

Records an event.<br />

• cudaError_t cudaEventSynchronize (cudaEvent_t event)<br />

Wait for an event to be recorded.<br />

4.6.1 Detailed Description<br />

This section describes the event management functions of the <strong>CUDA</strong> runtime application programming interface.<br />

4.6.2 Function Documentation<br />

4.6.2.1 cudaError_t cudaEventCreate (cudaEvent_t ∗ event)<br />

Creates an event object using cudaEventDefault.<br />

Parameters:<br />

event - Newly created event<br />

Returns:<br />

Note:<br />

cudaSuccess, cudaErrorInitializationError, cudaErrorPriorLaunchFailure, cudaErrorInvalidValue, cudaErrorMemoryAllocation<br />

See also:<br />

Note that this function may also return error codes from previous, asynchronous launches.<br />

cudaEventCreateWithFlags, cudaEventRecord, cudaEventQuery, cudaEventSynchronize, cudaEventDestroy, cudaEventElapsedTime<br />

Generated for <strong>NVIDIA</strong> <strong>CUDA</strong> Library by Doxygen

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!