This memory resource tries to allocate with several upstream resources and returns the first succesful one.
More...
#include <vecmem/memory/coalescing_memory_resource.hpp>
|
| VECMEM_CORE_EXPORT | coalescing_memory_resource (std::vector< std::reference_wrapper< memory_resource > > &&upstreams) |
| | Constructs the coalescing memory resource.
|
|
VECMEM_CORE_EXPORT | coalescing_memory_resource (coalescing_memory_resource &&parent) noexcept |
| | Move constructor.
|
|
| coalescing_memory_resource (const coalescing_memory_resource &)=delete |
| | Disallow copying the memory resource.
|
|
VECMEM_CORE_EXPORT | ~coalescing_memory_resource () override |
| | Destructor.
|
|
VECMEM_CORE_EXPORT coalescing_memory_resource & | operator= (coalescing_memory_resource &&rhs) noexcept |
| | Move assignment operator.
|
|
coalescing_memory_resource & | operator= (const coalescing_memory_resource &)=delete |
| | Disallow copying the memory resource.
|
|
| VECMEM_CORE_EXPORT bool | do_is_equal (const memory_resource &other) const noexcept override |
| | Compare the equality of *this memory resource with another.
|
|
|
VECMEM_CORE_EXPORT void * | do_allocate (std::size_t, std::size_t) override |
| | Allocate memory with one of the underlying resources.
|
|
VECMEM_CORE_EXPORT void | do_deallocate (void *p, std::size_t, std::size_t) override |
| | De-allocate a previously allocated memory block.
|
This memory resource tries to allocate with several upstream resources and returns the first succesful one.
◆ coalescing_memory_resource()
| vecmem::coalescing_memory_resource::coalescing_memory_resource |
( |
std::vector< std::reference_wrapper< memory_resource > > && | upstreams | ) |
|
|
explicit |
Constructs the coalescing memory resource.
- Note
- The memory resources passed to this constructed are given in order of decreasing priority. That is to say, the first one is tried first, then the second, etc.
- Parameters
-
| [in] | upstreams | The upstream memory resources to use. |
◆ do_is_equal()
| bool vecmem::details::memory_resource_base::do_is_equal |
( |
const memory_resource & | other | ) |
const |
|
overrideprotectednoexceptinherited |
Compare the equality of *this memory resource with another.
- Parameters
-
| other | The other memory resource to compare with |
- Returns
true if the two memory resources are equal, false otherwise
The documentation for this class was generated from the following files: