OmniSciDB
a5dc49c757
|
#include <quantile.h>
Public Types | |
using | Memory = CentroidsMemory< RealType, IndexType > |
Public Member Functions | |
TDigest ()=default | |
DEVICE | TDigest (Memory &mem) |
DEVICE | TDigest (RealType q, SimpleAllocator *simple_allocator, IndexType buf_allocate, IndexType centroids_allocate) |
TDigest & | operator= (TDigest &&rhs) |
DEVICE Centroids< RealType, IndexType > & | centroids () |
DEVICE void | add (RealType value) |
DEVICE void | allocate () |
DEVICE void | mergeBuffer () |
DEVICE void | mergeBufferFinal () |
DEVICE void | mergeSorted (RealType *sums, IndexType *counts, IndexType size) |
DEVICE void | mergeTDigest (TDigest &t_digest) |
DEVICE VectorView< IndexType const > | partialSumOfCounts (IndexType *const buf) const |
DEVICE RealType | quantile (VectorView< IndexType const > const partial_sum, RealType const q) const |
DEVICE RealType | quantile (RealType const q) const |
DEVICE RealType | quantile () |
DEVICE void | setBuffer (Memory &mem) |
DEVICE void | setCentroids (Memory &mem) |
DEVICE void | setCentroids (VectorView< RealType > const sums, VectorView< IndexType > const counts) |
DEVICE IndexType | totalWeight () const |
Static Public Member Functions | |
static IndexType | nbytes (IndexType buf_allocate, IndexType centroids_allocate) |
Private Member Functions | |
DEVICE RealType | max () const |
DEVICE RealType | min () const |
DEVICE IndexType | maxCardinality (IndexType const sum, IndexType const total_weight, RealType const c) |
DEVICE void | mergeCentroids (Centroids< RealType, IndexType > &) |
DEVICE RealType | firstCentroid (RealType const x) const |
DEVICE RealType | interiorCentroid (RealType const x, IndexType const idx1, IndexType const prefix_sum) const |
DEVICE RealType | lastCentroid (RealType const x, IndexType const N) const |
DEVICE RealType | oneCentroid (RealType const x) const |
DEVICE RealType | slope (IndexType const idx1, IndexType const idx2) const |
Private Attributes | |
Centroids< RealType, IndexType > | buf_ |
Centroids< RealType, IndexType > | centroids_ |
bool | forward_ {true} |
std::mutex | merge_buffer_final_called_mutex_ |
bool | merge_buffer_final_called_ {false} |
std::optional< RealType > | q_ {std::nullopt} |
bool | use_linear_scaling_function_ {false} |
SimpleAllocator * | simple_allocator_ {nullptr} |
IndexType | buf_allocate_ {0} |
IndexType | centroids_allocate_ {0} |
Definition at line 184 of file quantile.h.
using quantile::detail::TDigest< RealType, IndexType >::Memory = CentroidsMemory<RealType, IndexType> |
Definition at line 227 of file quantile.h.
|
default |
|
inline |
Definition at line 231 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::centroids_.
|
inline |
Definition at line 236 of file quantile.h.
DEVICE void quantile::detail::TDigest< RealType, IndexType >::add | ( | RealType | value | ) |
Definition at line 623 of file quantile.h.
DEVICE void quantile::detail::TDigest< RealType, IndexType >::allocate | ( | ) |
Definition at line 633 of file quantile.h.
Referenced by agg_approx_quantile().
|
inline |
Definition at line 265 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::centroids_.
|
private |
Definition at line 749 of file quantile.h.
|
private |
Definition at line 768 of file quantile.h.
References quantile::detail::anonymous_namespace{quantile.h}::isSingleton().
|
private |
Definition at line 790 of file quantile.h.
References quantile::detail::anonymous_namespace{quantile.h}::isSingleton().
|
inlineprivate |
Definition at line 203 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::centroids_.
|
private |
Definition at line 651 of file quantile.h.
DEVICE void quantile::detail::TDigest< RealType, IndexType >::mergeBuffer | ( | ) |
Definition at line 672 of file quantile.h.
References gpu_enabled::sort().
Referenced by quantile::detail::TDigest< RealType, IndexType >::mergeTDigest().
DEVICE void quantile::detail::TDigest< RealType, IndexType >::mergeBufferFinal | ( | ) |
Definition at line 683 of file quantile.h.
Referenced by ResultSet::calculateQuantile().
|
private |
Definition at line 719 of file quantile.h.
References quantile::detail::Centroids< RealType, IndexType >::clear(), and quantile::detail::CentroidsMerger< RealType, IndexType >::merge().
Referenced by quantile::detail::TDigest< RealType, IndexType >::mergeTDigest().
DEVICE void quantile::detail::TDigest< RealType, IndexType >::mergeSorted | ( | RealType * | sums, |
IndexType * | counts, | ||
IndexType | size | ||
) |
Definition at line 696 of file quantile.h.
References gpu_enabled::fill(), VectorView< T >::set(), and quantile::detail::Centroids< RealType, IndexType >::sums_.
|
inline |
Definition at line 283 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::centroids_, quantile::detail::TDigest< RealType, IndexType >::mergeBuffer(), and quantile::detail::TDigest< RealType, IndexType >::mergeCentroids().
|
inlineprivate |
Definition at line 206 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::centroids_.
|
inlinestatic |
Definition at line 261 of file quantile.h.
Referenced by anonymous_namespace{QueryMemoryInitializer.cpp}::AddNbytes::operator()().
|
private |
Definition at line 827 of file quantile.h.
References anonymous_namespace{Utm.h}::N.
|
inline |
Definition at line 247 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::buf_, quantile::detail::TDigest< RealType, IndexType >::buf_allocate_, quantile::detail::TDigest< RealType, IndexType >::centroids_, quantile::detail::TDigest< RealType, IndexType >::centroids_allocate_, quantile::detail::TDigest< RealType, IndexType >::forward_, quantile::detail::TDigest< RealType, IndexType >::merge_buffer_final_called_, quantile::detail::TDigest< RealType, IndexType >::q_, quantile::detail::TDigest< RealType, IndexType >::simple_allocator_, and quantile::detail::TDigest< RealType, IndexType >::use_linear_scaling_function_.
DEVICE VectorView< IndexType const > quantile::detail::TDigest< RealType, IndexType >::partialSumOfCounts | ( | IndexType *const | buf | ) | const |
Definition at line 850 of file quantile.h.
References gpu_enabled::partial_sum().
DEVICE RealType quantile::detail::TDigest< RealType, IndexType >::quantile | ( | VectorView< IndexType const > const | partial_sum, |
RealType const | q | ||
) | const |
Definition at line 858 of file quantile.h.
References VectorView< T >::back(), VectorView< T >::begin(), VectorView< T >::end(), anonymous_namespace{Utm.h}::N, and gpu_enabled::upper_bound().
Referenced by ResultSet::calculateQuantile().
|
inline |
Definition at line 296 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::buf_, quantile::detail::TDigest< RealType, IndexType >::centroids_, and quantile::detail::TDigest< RealType, IndexType >::quantile().
|
inline |
Definition at line 300 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::centroids_, and quantile::detail::TDigest< RealType, IndexType >::q_.
Referenced by quantile::detail::TDigest< RealType, IndexType >::quantile().
|
inline |
Definition at line 305 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::buf_, quantile::detail::CentroidsMemory< RealType, IndexType >::counts(), VectorView< T >::data(), quantile::detail::CentroidsMemory< RealType, IndexType >::size(), and quantile::detail::CentroidsMemory< RealType, IndexType >::sums().
|
inline |
Definition at line 312 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::centroids_, quantile::detail::CentroidsMemory< RealType, IndexType >::counts(), VectorView< T >::data(), quantile::detail::CentroidsMemory< RealType, IndexType >::size(), and quantile::detail::CentroidsMemory< RealType, IndexType >::sums().
|
inline |
Definition at line 318 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::centroids_.
|
private |
Definition at line 883 of file quantile.h.
References quantile::detail::anonymous_namespace{quantile.h}::isSingleton(), and anonymous_namespace{Utm.h}::n.
|
inline |
Definition at line 325 of file quantile.h.
References quantile::detail::TDigest< RealType, IndexType >::centroids_.
|
private |
Definition at line 188 of file quantile.h.
Referenced by quantile::detail::TDigest< RealType, IndexType >::operator=(), quantile::detail::TDigest< RealType, IndexType >::quantile(), and quantile::detail::TDigest< RealType, IndexType >::setBuffer().
|
private |
Definition at line 200 of file quantile.h.
Referenced by quantile::detail::TDigest< RealType, IndexType >::operator=().
|
private |
Definition at line 189 of file quantile.h.
Referenced by quantile::detail::TDigest< RealType, IndexType >::centroids(), quantile::detail::TDigest< RealType, IndexType >::max(), quantile::detail::TDigest< RealType, IndexType >::mergeTDigest(), quantile::detail::TDigest< RealType, IndexType >::min(), quantile::detail::TDigest< RealType, IndexType >::operator=(), quantile::detail::TDigest< RealType, IndexType >::quantile(), quantile::detail::TDigest< RealType, IndexType >::setCentroids(), quantile::detail::TDigest< RealType, IndexType >::TDigest(), and quantile::detail::TDigest< RealType, IndexType >::totalWeight().
|
private |
Definition at line 201 of file quantile.h.
Referenced by quantile::detail::TDigest< RealType, IndexType >::operator=().
|
private |
Definition at line 190 of file quantile.h.
Referenced by quantile::detail::TDigest< RealType, IndexType >::operator=().
|
private |
Definition at line 194 of file quantile.h.
Referenced by quantile::detail::TDigest< RealType, IndexType >::operator=().
|
private |
Definition at line 192 of file quantile.h.
|
private |
Definition at line 197 of file quantile.h.
Referenced by quantile::detail::TDigest< RealType, IndexType >::operator=(), and quantile::detail::TDigest< RealType, IndexType >::quantile().
|
private |
Definition at line 199 of file quantile.h.
Referenced by quantile::detail::TDigest< RealType, IndexType >::operator=().
|
private |
Definition at line 198 of file quantile.h.
Referenced by quantile::detail::TDigest< RealType, IndexType >::operator=().