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

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

#include </home/runner/work/vecmem/vecmem/hip/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.
 
hipEvent_t create ()
 Get an event from the pool, creating a new one if necessary.
 
void free (hipEvent_t event)
 Return an event to the pool.
 

Detailed Description

Pool of hipEvent_t objects to use in the library.

It allows vecmem::hip::async_copy to reuse the hipEvent_t objects that it uses for synchronization. Skipping the overhead associated with creating and destroying HIP 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: