vecmem 1.18.0
Loading...
Searching...
No Matches
queue_wrapper.hpp
1/* VecMem project, part of the ACTS project (R&D line)
2 *
3 * (c) 2021-2025 CERN for the benefit of the ACTS project
4 *
5 * Mozilla Public License Version 2.0
6 */
7#pragma once
8
9// Local include(s).
10#include "vecmem/vecmem_sycl_export.hpp"
11
12// System include(s).
13#include <memory>
14#include <string>
15
16namespace vecmem::sycl {
17
24
25public:
35
41 queue_wrapper(queue_wrapper&& parent) noexcept;
42
46
53
56 void* queue();
59 const void* queue() const;
60
64
67 std::string device_name() const;
68
71 bool is_cpu() const;
74 bool is_gpu() const;
77 bool is_accelerator() const;
78
81 bool is_opencl() const;
84 bool is_level0() const;
87 bool is_cuda() const;
90 bool is_hip() const;
91
92private:
94 struct impl;
96 std::unique_ptr<impl> m_impl;
97
98}; // class queue_wrapper
99
100} // namespace vecmem::sycl
An allocator class that wraps a memory resource.
Definition allocator.hpp:37
Wrapper class for ::sycl::queue.
Definition queue_wrapper.hpp:23
VECMEM_SYCL_EXPORT queue_wrapper(queue_wrapper &&parent) noexcept
Move constructor.
VECMEM_SYCL_EXPORT queue_wrapper & operator=(const queue_wrapper &rhs)
Copy assignment.
VECMEM_SYCL_EXPORT queue_wrapper(const queue_wrapper &parent)
Copy constructor.
VECMEM_SYCL_EXPORT bool is_cpu() const
Check if it's a CPU queue.
VECMEM_SYCL_EXPORT const void * queue() const
Access a typeless pointer to the managed ::sycl::queue object.
VECMEM_SYCL_EXPORT bool is_accelerator() const
Check if it's an accelerator (FPGA) queue.
VECMEM_SYCL_EXPORT queue_wrapper()
Construct a queue for the default device.
VECMEM_SYCL_EXPORT std::string device_name() const
Get the name of the device that the queue operates on.
VECMEM_SYCL_EXPORT bool is_cuda() const
Check if it's a CUDA queue.
VECMEM_SYCL_EXPORT bool is_gpu() const
Check if it's a GPU queue.
VECMEM_SYCL_EXPORT queue_wrapper(void *queue)
Wrap an existing ::sycl::queue object.
VECMEM_SYCL_EXPORT void synchronize()
Wait for all tasks in the queue to complete.
VECMEM_SYCL_EXPORT bool is_hip() const
Check if it's a HIP queue.
VECMEM_SYCL_EXPORT bool is_level0() const
Check if it's a Level-0 queue.
VECMEM_SYCL_EXPORT ~queue_wrapper()
Destructor.
VECMEM_SYCL_EXPORT bool is_opencl() const
Check if it's an OpenCL queue.
VECMEM_SYCL_EXPORT void * queue()
Access a typeless pointer to the managed ::sycl::queue object.
VECMEM_SYCL_EXPORT queue_wrapper & operator=(queue_wrapper &&rhs) noexcept
Move assignment.
Namespace holding types that work on/with oneAPI/SYCL.
Definition sycl_builtin_device_atomic_ref.hpp:17