|
|
|||
File indexing completed on 2026-07-26 08:22:12
0001 /** TRACCC library, part of the ACTS project (R&D line) 0002 * 0003 * (c) 2022-2025 CERN for the benefit of the ACTS project 0004 * 0005 * Mozilla Public License Version 2.0 0006 */ 0007 0008 // Local include(s). 0009 #include "opaque_stream.hpp" 0010 0011 #include "hip_error_handling.hpp" 0012 0013 namespace traccc::hip::details { 0014 0015 opaque_stream::opaque_stream(int device) : m_device{device}, m_stream(nullptr) { 0016 TRACCC_HIP_ERROR_CHECK(hipStreamCreate(&m_stream)); 0017 } 0018 0019 opaque_stream::~opaque_stream() { 0020 // Don't check the return value of the stream destruction. This is because 0021 // if the holder of this opaque stream is only destroyed during the 0022 // termination of the application in which it was created, the HIP runtime 0023 // may have already deleted all streams by the time that this function would 0024 // try to delete it. 0025 // 0026 // This is not the most robust thing ever, but detecting reliably when this 0027 // destructor is executed as part of the final operations of an application, 0028 // would be too platform specific and fragile of an operation. 0029 [[maybe_unused]] auto code = hipStreamDestroy(m_stream); 0030 } 0031 0032 } // namespace traccc::hip::details
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|