Clustering
C++20 header-only: DBSCAN, HDBSCAN, k-means.
Loading...
Searching...
No Matches
clustering::detail Namespace Reference

Classes

struct  BorrowedTag
 Tag type used to disambiguate the private borrowed-view constructor on NDArray.
class  AlignedAllocator
 Stateless allocator that returns Align -byte aligned blocks from std::aligned_alloc.

Functions

std::atomic< std::uint64_t > & alignedAllocCallCount () noexcept
 Process-global counter of non-empty AlignedAllocator::allocate calls.
template<class T, class U, std::size_t Align>
bool operator== (const AlignedAllocator< T, Align > &, const AlignedAllocator< U, Align > &) noexcept
template<class T, class U, std::size_t Align>
bool operator!= (const AlignedAllocator< T, Align > &, const AlignedAllocator< U, Align > &) noexcept

Function Documentation

◆ alignedAllocCallCount()

std::atomic< std::uint64_t > & clustering::detail::alignedAllocCallCount ( )
inlinenoexcept

Process-global counter of non-empty AlignedAllocator::allocate calls.

Test-only surface. Incremented on every allocate that actually issues a backing std::aligned_alloc (the n == 0 short-circuit does not count). Empty-allocation short-circuits leave the counter untouched so caller-side reads are stable.

Callers wrap an instrumented region with a read before and after, asserting the delta falls within their budget. Relaxed ordering is enough because the counter is a tally, not a synchronization primitive.

Definition at line 44 of file ndarray.h.

◆ operator!=()

template<class T, class U, std::size_t Align>
bool clustering::detail::operator!= ( const AlignedAllocator< T, Align > & ,
const AlignedAllocator< U, Align > &  )
noexcept

Definition at line 100 of file ndarray.h.

◆ operator==()

template<class T, class U, std::size_t Align>
bool clustering::detail::operator== ( const AlignedAllocator< T, Align > & ,
const AlignedAllocator< U, Align > &  )
noexcept

Definition at line 95 of file ndarray.h.