|
|
|||
File indexing completed on 2026-05-27 07:24:17
0001 // This file is part of the ACTS project. 0002 // 0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 0011 namespace detray::sycl { 0012 0013 /// Wrapper class for @c sycl::queue 0014 /// 0015 /// It is necessary for passing around SYCL queue objects in code that should 0016 /// not be directly exposed to the SYCL headers. 0017 /// 0018 /// Note that unlike @c vecmem::sycl::queue_wrapper, this type can not own a 0019 /// queue of its own. It can only view a queue that is owned by "somebody else". 0020 /// 0021 class queue_wrapper { 0022 public: 0023 /// Wrap an existing @c sycl::queue object, without taking ownership 0024 queue_wrapper(void* queue) : m_queue(queue) {} 0025 0026 /// Copy constructor 0027 queue_wrapper(const queue_wrapper& parent) = default; 0028 /// Move constructor 0029 queue_wrapper(queue_wrapper&& parent) = default; 0030 0031 /// Copy assignment 0032 queue_wrapper& operator=(const queue_wrapper& rhs) = default; 0033 /// Move assignment 0034 queue_wrapper& operator=(queue_wrapper&& rhs) = default; 0035 0036 /// Access a typeless pointer to the managed @c sycl::queue object 0037 void* queue() { return m_queue; } 0038 /// Access a typeless pointer to the managed @c sycl::queue object 0039 const void* queue() const { return m_queue; } 0040 0041 private: 0042 /// Bare pointer to the wrapped @c sycl::queue object 0043 void* m_queue; 0044 0045 }; // class queue_wrapper 0046 0047 } // namespace detray::sycl
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|