vecmem 1.24.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vecmem::cuda::details::event_pool Class Reference

Pool of cudaEvent_t objects to use in the library. More...

#include </home/runner/work/vecmem/vecmem/cuda/src/utils/event_pool.hpp>

Public Member Functions

 event_pool (std::size_t size=8u)
 Constructor with the number of events to initially allocate.
 
 ~event_pool ()
 Destructor.
 
cudaEvent_t create ()
 Get an event from the pool, creating a new one if necessary.
 
void free (cudaEvent_t event)
 Return an event to the pool.
 

Detailed Description

Pool of cudaEvent_t objects to use in the library.

It allows vecmem::cuda::async_copy to reuse the cudaEvent_t objects that it uses for synchronization. Skipping the overhead associated with creating and destroying CUDA event objects.

This is based on code written by NVIDIA. Thanks to Andreas Hehn for sharing that code with us!


The documentation for this class was generated from the following files: