// Copyright (c) 2012-2017 VideoStitch SAS // Copyright (c) 2018 stitchEm #include "gpu/event.hpp" #include #include #include namespace VideoStitch { namespace GPU { class Event::DeviceEvent { public: explicit DeviceEvent(cudaEvent_t e) : event{new cudaEvent_t(e), &EventDeleter} {} static Event create(cudaEvent_t cle); static void EventDeleter(cudaEvent_t *cudaPtr) { CUDA_ERROR(cudaEventDestroy(*cudaPtr)); delete cudaPtr; } friend class Event; std::shared_ptr event; }; } // namespace GPU } // namespace VideoStitch