vecmem 1.18.0
Loading...
Searching...
No Matches
memory_resource_base.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/memory/memory_resource.hpp"
11#include "vecmem/utils/sycl/details/queue_holder.hpp"
12#include "vecmem/vecmem_sycl_export.hpp"
13
15namespace vecmem::sycl::details {
16
22class memory_resource_base : public memory_resource, public queue_holder {
23
24public:
27
28private:
31
34 void do_deallocate(void* ptr, std::size_t nbytes,
35 std::size_t alignment) final;
36
39 bool do_is_equal(const memory_resource& other) const noexcept final;
40
42
43}; // memory_resource_base
44
45} // namespace vecmem::sycl::details
An allocator class that wraps a memory resource.
Definition allocator.hpp:37
SYCL memory resource base class.
Definition memory_resource_base.hpp:22
VECMEM_SYCL_EXPORT bool do_is_equal(const memory_resource &other) const noexcept final
Function comparing two memory resource instances.
VECMEM_SYCL_EXPORT void do_deallocate(void *ptr, std::size_t nbytes, std::size_t alignment) final
Function performing the memory de-allocation.
Base class for all user-facing, sycl::queue using classes.
Definition queue_holder.hpp:19
VECMEM_SYCL_EXPORT queue_holder(const queue_wrapper &queue={})
Constructor on top of a user-provided queue.
Namespace for types that should not be used directly by clients.
Definition sycl_builtin_device_atomic_ref.hpp:18