|
Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
|
#include <clustering/memory/linear_alloc.h>
Public Member Functions | |
| LinearAllocator (std::size_t count) | |
Reserves room for count objects of T from a single backing allocation. | |
| ~LinearAllocator () | |
| LinearAllocator (const LinearAllocator &)=delete | |
| LinearAllocator & | operator= (const LinearAllocator &)=delete |
| T * | allocate () |
Bump-allocates one T; throws std::bad_alloc when the arena is exhausted. | |
| void | deallocate (T *) |
| No-op: trivial destructibility lets per-element reclamation be skipped. | |
| void | reset () |
| Rewinds the bump pointer, reclaiming every outstanding allocation in one shot. | |
| bool | isDeallocSupported () |
Reports that per-element deallocate is not supported (false for this allocator). | |
Definition at line 9 of file linear_alloc.h.
|
inline |
Reserves room for count objects of T from a single backing allocation.
Definition at line 14 of file linear_alloc.h.
|
inline |
Definition at line 17 of file linear_alloc.h.
|
delete |
|
inline |
Bump-allocates one T; throws std::bad_alloc when the arena is exhausted.
Definition at line 23 of file linear_alloc.h.
|
inline |
No-op: trivial destructibility lets per-element reclamation be skipped.
Definition at line 36 of file linear_alloc.h.
|
inline |
Reports that per-element deallocate is not supported (false for this allocator).
Definition at line 44 of file linear_alloc.h.
|
delete |
|
inline |
Rewinds the bump pointer, reclaiming every outstanding allocation in one shot.
Definition at line 41 of file linear_alloc.h.