OmniSciDB  8fa3bf436f
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
quantile::detail::TDigest< RealType, IndexType > Class Template Reference

#include <quantile.h>

+ Collaboration diagram for quantile::detail::TDigest< RealType, IndexType >:

Public Types

using Memory = CentroidsMemory< RealType, IndexType >
 

Public Member Functions

 TDigest ()=default
 
DEVICE TDigest (Memory &mem)
 
DEVICE TDigest (SimpleAllocator *simple_allocator, IndexType buf_allocate, IndexType centroids_allocate)
 
DEVICE Centroids< RealType,
IndexType > & 
centroids ()
 
DEVICE void add (RealType value)
 
DEVICE void allocate ()
 
DEVICE void mergeBuffer ()
 
DEVICE void mergeSorted (RealType *sums, IndexType *counts, IndexType size)
 
DEVICE void mergeTDigest (TDigest &t_digest)
 
DEVICE RealType quantile (RealType const q)
 
DEVICE RealType quantile (IndexType *buf, RealType const q)
 
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
 

Private Member Functions

DEVICE RealType max () const
 
DEVICE RealType min () const
 
DEVICE IndexType maxCardinality (IndexType const sum, IndexType const total_weight)
 
DEVICE void mergeCentroids (Centroids< RealType, IndexType > &)
 
DEVICE RealType firstCentroid (RealType const x)
 
DEVICE RealType interiorCentroid (RealType const x, IndexType const idx1, IndexType const prefix_sum)
 
DEVICE RealType lastCentroid (RealType const x, IndexType const N)
 
DEVICE RealType oneCentroid (RealType const x)
 
DEVICE RealType slope (IndexType const idx1, IndexType const idx2)
 

Private Attributes

Centroids< RealType, IndexType > buf_
 
Centroids< RealType, IndexType > centroids_
 
bool forward_ {true}
 
SimpleAllocator *const simple_allocator_ {nullptr}
 
IndexType const buf_allocate_ {0}
 
IndexType const centroids_allocate_ {0}
 

Detailed Description

template<typename RealType, typename IndexType = size_t>
class quantile::detail::TDigest< RealType, IndexType >

Definition at line 182 of file quantile.h.

Member Typedef Documentation

template<typename RealType , typename IndexType = size_t>
using quantile::detail::TDigest< RealType, IndexType >::Memory = CentroidsMemory<RealType, IndexType>

Definition at line 210 of file quantile.h.

Constructor & Destructor Documentation

template<typename RealType , typename IndexType = size_t>
quantile::detail::TDigest< RealType, IndexType >::TDigest ( )
default
template<typename RealType , typename IndexType = size_t>
DEVICE quantile::detail::TDigest< RealType, IndexType >::TDigest ( Memory mem)
inline

Definition at line 214 of file quantile.h.

References quantile::detail::TDigest< RealType, IndexType >::centroids_.

215  : centroids_(mem.sums().data(), mem.counts().data(), mem.size()) {
216  centroids_.clear();
217  }
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184
template<typename RealType , typename IndexType = size_t>
DEVICE quantile::detail::TDigest< RealType, IndexType >::TDigest ( SimpleAllocator simple_allocator,
IndexType  buf_allocate,
IndexType  centroids_allocate 
)
inline

Definition at line 219 of file quantile.h.

222  : simple_allocator_(simple_allocator)
223  , buf_allocate_(buf_allocate)
224  , centroids_allocate_(centroids_allocate) {}
IndexType const buf_allocate_
Definition: quantile.h:189
SimpleAllocator *const simple_allocator_
Definition: quantile.h:188
IndexType const centroids_allocate_
Definition: quantile.h:190

Member Function Documentation

template<typename RealType , typename IndexType >
DEVICE void quantile::detail::TDigest< RealType, IndexType >::add ( RealType  value)

Definition at line 569 of file quantile.h.

569  {
570  if (buf_.sums_.full()) {
571  mergeBuffer();
572  }
573  buf_.sums_.push_back(value);
574  buf_.counts_.push_back(1);
575 }
DEVICE void mergeBuffer()
Definition: quantile.h:604
Centroids< RealType, IndexType > buf_
Definition: quantile.h:183
template<typename RealType , typename IndexType >
DEVICE void quantile::detail::TDigest< RealType, IndexType >::allocate ( )

Definition at line 579 of file quantile.h.

Referenced by agg_approx_median(), and approx_median_jit_rt().

579  {
580  if (buf_.capacity() == 0) {
581  auto* p0 = simple_allocator_->allocate(buf_allocate_ * sizeof(RealType));
582  auto* p1 = simple_allocator_->allocate(buf_allocate_ * sizeof(IndexType));
583  buf_ = Centroids<RealType, IndexType>(
584  VectorView<RealType>(reinterpret_cast<RealType*>(p0), 0, buf_allocate_),
585  VectorView<IndexType>(reinterpret_cast<IndexType*>(p1), 0, buf_allocate_));
586  p0 = simple_allocator_->allocate(centroids_allocate_ * sizeof(RealType));
587  p1 = simple_allocator_->allocate(centroids_allocate_ * sizeof(IndexType));
588  centroids_ = Centroids<RealType, IndexType>(
589  VectorView<RealType>(reinterpret_cast<RealType*>(p0), 0, centroids_allocate_),
590  VectorView<IndexType>(reinterpret_cast<IndexType*>(p1), 0, centroids_allocate_));
591  }
592 }
Centroids< RealType, IndexType > buf_
Definition: quantile.h:183
IndexType const buf_allocate_
Definition: quantile.h:189
virtual int8_t * allocate(const size_t num_bytes, const size_t thread_idx=0)=0
SimpleAllocator *const simple_allocator_
Definition: quantile.h:188
IndexType const centroids_allocate_
Definition: quantile.h:190
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184

+ Here is the caller graph for this function:

template<typename RealType , typename IndexType = size_t>
DEVICE Centroids<RealType, IndexType>& quantile::detail::TDigest< RealType, IndexType >::centroids ( )
inline

Definition at line 226 of file quantile.h.

References quantile::detail::TDigest< RealType, IndexType >::centroids_.

226 { return centroids_; }
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184
template<typename RealType , typename IndexType >
DEVICE RealType quantile::detail::TDigest< RealType, IndexType >::firstCentroid ( RealType const  x)
private

Definition at line 664 of file quantile.h.

References count.

664  {
665  if (x < 1) {
666  return min();
667  } else if (centroids_.size() == 1) {
668  return oneCentroid(x);
669  } else if (centroids_.counts_.front() == 2) {
670  RealType const sum = centroids_.sums_.front();
671  return x == 1 ? 0.5 * sum : sum - min();
672  } else {
673  RealType const count = centroids_.counts_.front();
674  RealType const dx = x - RealType(0.5) * (1 + count);
675  RealType const mean = (centroids_.sums_.front() - min()) / (count - 1);
676  return mean + slope(0, 0 < dx) * dx;
677  }
678 }
DEVICE RealType oneCentroid(RealType const x)
Definition: quantile.h:742
int count
DEVICE RealType slope(IndexType const idx1, IndexType const idx2)
Definition: quantile.h:792
DEVICE RealType min() const
Definition: quantile.h:193
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184
template<typename RealType , typename IndexType >
DEVICE RealType quantile::detail::TDigest< RealType, IndexType >::interiorCentroid ( RealType const  x,
IndexType const  idx1,
IndexType const  prefix_sum 
)
private

Definition at line 683 of file quantile.h.

References quantile::detail::anonymous_namespace{quantile.h}::isSingleton().

685  {
686  if (isSingleton(centroids_.counts_.begin() + idx1)) {
687  RealType const sum1 = centroids_.sums_[idx1];
688  if (x == prefix_sum - centroids_.counts_[idx1]) {
689  if (isSingleton(centroids_.counts_.begin() + idx1 - 1)) {
690  return 0.5 * (centroids_.sums_[idx1 - 1] + sum1);
691  } else if (idx1 == 1 && centroids_.counts_[0] == 2) {
692  return 0.5 * (centroids_.sums_[idx1 - 1] - min() + sum1);
693  }
694  }
695  return sum1;
696  } else {
697  RealType const dx = x + RealType(0.5) * centroids_.counts_[idx1] - prefix_sum;
698  IndexType const idx2 = idx1 + 2 * (0 < dx) - 1;
699  return centroids_.mean(idx1) + slope(idx1, idx2) * dx;
700  }
701 }
DEVICE RealType slope(IndexType const idx1, IndexType const idx2)
Definition: quantile.h:792
DEVICE RealType min() const
Definition: quantile.h:193
DEVICE bool isSingleton(CountsIterator itr)
Definition: quantile.h:657
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184

+ Here is the call graph for this function:

template<typename RealType , typename IndexType >
DEVICE RealType quantile::detail::TDigest< RealType, IndexType >::lastCentroid ( RealType const  x,
IndexType const  N 
)
private

Definition at line 705 of file quantile.h.

References quantile::detail::anonymous_namespace{quantile.h}::isSingleton().

706  {
707  if (N - 1 < x) {
708  return max();
709  }
710  IndexType const idx1 = centroids_.size() - 1;
711  RealType const sum1 = centroids_.sums_[idx1];
712  IndexType const count1 = centroids_.counts_[idx1];
713  if (count1 == 1) { // => x == N - 1
714  if (isSingleton(centroids_.counts_.begin() + (idx1 - 1))) {
715  return 0.5 * (centroids_.sums_[idx1 - 1] + sum1);
716  } else if (idx1 == 1 && centroids_.counts_[0] == 2) {
717  return 0.5 * (centroids_.sums_[idx1 - 1] - min() + sum1);
718  } else {
719  return sum1;
720  }
721  } else if (count1 == 2) { // => 3 <= N
722  if (x == N - 1) {
723  return 0.5 * sum1;
724  } else if (x == N - 2) {
725  RealType const sum2 = centroids_.sums_[idx1 - 1];
726  if (isSingleton(centroids_.counts_.begin() + (idx1 - 1))) {
727  return 0.5 * (sum2 + sum1 - max());
728  } else if (idx1 == 1 && centroids_.counts_[0] == 2) {
729  return 0.5 * (sum2 - min() + sum1 - max());
730  }
731  }
732  return sum1 - max();
733  } else { // => 3 <= count1
734  RealType const dx = x + RealType(0.5) * (count1 + 1) - N;
735  RealType const mean = (sum1 - max()) / (count1 - 1);
736  return mean + slope(idx1, idx1 - (dx < 0)) * dx;
737  }
738 }
DEVICE RealType max() const
Definition: quantile.h:192
DEVICE RealType slope(IndexType const idx1, IndexType const idx2)
Definition: quantile.h:792
DEVICE RealType min() const
Definition: quantile.h:193
DEVICE bool isSingleton(CountsIterator itr)
Definition: quantile.h:657
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184

+ Here is the call graph for this function:

template<typename RealType , typename IndexType = size_t>
DEVICE RealType quantile::detail::TDigest< RealType, IndexType >::max ( ) const
inlineprivate

Definition at line 192 of file quantile.h.

References quantile::detail::TDigest< RealType, IndexType >::centroids_.

192 { return centroids_.max_; }
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184
template<typename RealType , typename IndexType >
DEVICE IndexType quantile::detail::TDigest< RealType, IndexType >::maxCardinality ( IndexType const  sum,
IndexType const  total_weight 
)
private

Definition at line 596 of file quantile.h.

597  {
598  IndexType const max_bins = centroids_.capacity();
599  return max_bins < total_weight ? 2 * total_weight / max_bins : 0;
600 }
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184
template<typename RealType , typename IndexType >
DEVICE void quantile::detail::TDigest< RealType, IndexType >::mergeBuffer ( )

Definition at line 604 of file quantile.h.

References gpu_enabled::sort().

Referenced by ResultSet::calculateQuantile(), and quantile::detail::TDigest< RealType, IndexType >::mergeTDigest().

604  {
605  if (buf_.size()) {
606  gpu_enabled::sort(buf_.sums_.begin(), buf_.sums_.end());
607  buf_.min_ = buf_.sums_.front();
608  buf_.max_ = buf_.sums_.back();
610  }
611 }
DEVICE void sort(ARGS &&...args)
Definition: gpu_enabled.h:105
Centroids< RealType, IndexType > buf_
Definition: quantile.h:183
DEVICE void mergeCentroids(Centroids< RealType, IndexType > &)
Definition: quantile.h:637

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename RealType , typename IndexType >
DEVICE void quantile::detail::TDigest< RealType, IndexType >::mergeCentroids ( Centroids< RealType, IndexType > &  buf)
private

Definition at line 637 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().

638  {
639  // Loop over sorted sequence of buf and centroids_.
640  // Some latter centroids may be merged into the current centroid, so the number
641  // of iterations is only at most equal to the number of initial centroids.
642  using CM = CentroidsMerger<RealType, IndexType>;
643  for (CM cm(&buf, &centroids_, forward_); cm.hasNext(); cm.next()) {
644  // cm.prefixSum() == 0 on first iteration.
645  // Max cardinality for current centroid to be fully merged based on scaling function.
646  IndexType const max_cardinality = maxCardinality(cm.prefixSum(), cm.totalWeight());
647  cm.merge(max_cardinality);
648  }
649  // Combine sorted centroids buf[0..curr_idx_] + centroids_[0..curr_idx_] if forward
650  centroids_.appendAndSortCurrent(buf);
651  buf.clear();
652  forward_ ^= true; // alternate merge direction on each call
653 }
DEVICE IndexType maxCardinality(IndexType const sum, IndexType const total_weight)
Definition: quantile.h:596
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename RealType , typename IndexType >
DEVICE void quantile::detail::TDigest< RealType, IndexType >::mergeSorted ( RealType *  sums,
IndexType *  counts,
IndexType  size 
)

Definition at line 614 of file quantile.h.

References gpu_enabled::fill(), VectorView< T >::set(), and quantile::detail::Centroids< RealType, IndexType >::sums_.

616  {
617  if (size) {
618  if (buf_.capacity() == 0) {
619  buf_ = Centroids<RealType, IndexType>(sums, counts, size); // Set capacity and size
620  } else {
621  buf_.sums_.set(sums, size); // Does not change capacity
622  buf_.counts_.set(counts, size);
623  }
624  gpu_enabled::fill(buf_.counts_.begin(), buf_.counts_.end(), IndexType(1));
625  buf_.min_ = buf_.sums_.front();
626  buf_.max_ = buf_.sums_.back();
628  }
629 }
DEVICE void fill(ARGS &&...args)
Definition: gpu_enabled.h:60
Centroids< RealType, IndexType > buf_
Definition: quantile.h:183
DEVICE void mergeCentroids(Centroids< RealType, IndexType > &)
Definition: quantile.h:637

+ Here is the call graph for this function:

template<typename RealType , typename IndexType = size_t>
DEVICE void quantile::detail::TDigest< RealType, IndexType >::mergeTDigest ( TDigest< RealType, IndexType > &  t_digest)
inline

Definition at line 239 of file quantile.h.

References quantile::detail::TDigest< RealType, IndexType >::centroids_, quantile::detail::TDigest< RealType, IndexType >::mergeBuffer(), and quantile::detail::TDigest< RealType, IndexType >::mergeCentroids().

239  {
240  mergeBuffer();
241  t_digest.mergeBuffer();
242  mergeCentroids(t_digest.centroids_);
243  }
DEVICE void mergeBuffer()
Definition: quantile.h:604
DEVICE void mergeCentroids(Centroids< RealType, IndexType > &)
Definition: quantile.h:637

+ Here is the call graph for this function:

template<typename RealType , typename IndexType = size_t>
DEVICE RealType quantile::detail::TDigest< RealType, IndexType >::min ( ) const
inlineprivate

Definition at line 193 of file quantile.h.

References quantile::detail::TDigest< RealType, IndexType >::centroids_.

193 { return centroids_.min_; }
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184
template<typename RealType , typename IndexType >
DEVICE RealType quantile::detail::TDigest< RealType, IndexType >::oneCentroid ( RealType const  x)
private

Definition at line 742 of file quantile.h.

742  {
743  IndexType const N = centroids_.counts_.front();
744  if (N - 1 < x) { // includes case N == 1
745  return max();
746  } else if (N == 2) { // x == 1
747  return 0.5 * centroids_.sums_.front();
748  } else if (N == 3) { // 1 <= x <= 2
749  if (x == 2) {
750  return 0.5 * (centroids_.sums_.front() - min());
751  } else {
752  RealType const s = centroids_.sums_.front() - max();
753  return x == 1 ? 0.5 * s : s - min();
754  }
755  } else { // 3 < N
756  RealType const dx = x - RealType(0.5) * N;
757  RealType const mean = (centroids_.sums_.front() - (min() + max())) / (N - 2);
758  RealType const slope = 2 * (0 < dx ? max() - mean : mean - min()) / (N - 2);
759  return mean + slope * dx;
760  }
761 }
DEVICE RealType max() const
Definition: quantile.h:192
DEVICE RealType slope(IndexType const idx1, IndexType const idx2)
Definition: quantile.h:792
DEVICE RealType min() const
Definition: quantile.h:193
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184
template<typename RealType , typename IndexType = size_t>
DEVICE RealType quantile::detail::TDigest< RealType, IndexType >::quantile ( RealType const  q)
inline

Definition at line 246 of file quantile.h.

References quantile::detail::TDigest< RealType, IndexType >::buf_, and quantile::detail::TDigest< RealType, IndexType >::centroids_.

Referenced by ResultSet::calculateQuantile().

246  {
247  assert(centroids_.size() <= buf_.capacity());
248  return quantile(buf_.counts_.data(), q);
249  }
DEVICE RealType quantile(RealType const q)
Definition: quantile.h:246
Centroids< RealType, IndexType > buf_
Definition: quantile.h:183
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184

+ Here is the caller graph for this function:

template<typename RealType , typename IndexType >
DEVICE RealType quantile::detail::TDigest< RealType, IndexType >::quantile ( IndexType *  buf,
RealType const  q 
)

Definition at line 765 of file quantile.h.

References gpu_enabled::partial_sum(), and gpu_enabled::upper_bound().

765  {
766  if (centroids_.size()) {
769  centroids_.counts_.begin(), centroids_.counts_.end(), partial_sum.begin());
770  IndexType const N = partial_sum.back();
771  RealType const x = q * N;
772  auto const it1 = gpu_enabled::upper_bound(partial_sum.begin(), partial_sum.end(), x);
773  if (it1 == partial_sum.begin()) {
774  return firstCentroid(x);
775  } else if (it1 == partial_sum.end()) { // <==> 1 <= q
776  return max();
777  } else if (it1 + 1 == partial_sum.end()) {
778  return lastCentroid(x, N);
779  } else {
780  return interiorCentroid(x, it1 - partial_sum.begin(), *it1);
781  }
782  } else {
783  return centroids_.nan;
784  }
785 }
DEVICE auto upper_bound(ARGS &&...args)
Definition: gpu_enabled.h:123
DEVICE RealType lastCentroid(RealType const x, IndexType const N)
Definition: quantile.h:705
DEVICE RealType firstCentroid(RealType const x)
Definition: quantile.h:664
DEVICE RealType max() const
Definition: quantile.h:192
DEVICE void partial_sum(ARGS &&...args)
Definition: gpu_enabled.h:87
DEVICE RealType interiorCentroid(RealType const x, IndexType const idx1, IndexType const prefix_sum)
Definition: quantile.h:683
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184

+ Here is the call graph for this function:

template<typename RealType , typename IndexType = size_t>
DEVICE void quantile::detail::TDigest< RealType, IndexType >::setBuffer ( Memory mem)
inline

Definition at line 255 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().

255  {
256  buf_ = Centroids<RealType, IndexType>(
257  mem.sums().data(), mem.counts().data(), mem.size());
258  buf_.clear();
259  }
Centroids< RealType, IndexType > buf_
Definition: quantile.h:183

+ Here is the call graph for this function:

template<typename RealType , typename IndexType = size_t>
DEVICE void quantile::detail::TDigest< RealType, IndexType >::setCentroids ( Memory mem)
inline

Definition at line 262 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().

262  {
263  centroids_ = Centroids<RealType, IndexType>(
264  mem.sums().data(), mem.counts().data(), mem.size());
265  centroids_.clear();
266  }
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184

+ Here is the call graph for this function:

template<typename RealType , typename IndexType = size_t>
DEVICE void quantile::detail::TDigest< RealType, IndexType >::setCentroids ( VectorView< RealType > const  sums,
VectorView< IndexType > const  counts 
)
inline

Definition at line 268 of file quantile.h.

References quantile::detail::TDigest< RealType, IndexType >::centroids_.

269  {
270  centroids_ = Centroids<RealType, IndexType>(sums, counts);
271  centroids_.clear();
272  }
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184
template<typename RealType , typename IndexType >
DEVICE RealType quantile::detail::TDigest< RealType, IndexType >::slope ( IndexType const  idx1,
IndexType const  idx2 
)
private

Definition at line 792 of file quantile.h.

References quantile::detail::anonymous_namespace{quantile.h}::isSingleton().

792  {
793  IndexType const M = centroids_.size();
794  if (idx1 == idx2) { // Line segment is contained in either the first or last centroid.
795  RealType const n = static_cast<RealType>(centroids_.counts_[idx1]);
796  RealType const s = centroids_.sums_[idx1];
797  return idx1 == 0 ? 2 * (s - n * min()) / ((n - 1) * (n - 1))
798  : 2 * (n * max() - s) / ((n - 1) * (n - 1));
799  } else {
800  bool const min1 = idx1 == 0; // idx1 is the min centroid
801  bool const max1 = idx1 == M - 1; // idx1 is the max centroid
802  bool const min2 = idx2 == 0; // idx2 is the min centroid
803  bool const max2 = idx2 == M - 1; // idx2 is the max centroid
804  RealType const n1 = static_cast<RealType>(centroids_.counts_[idx1] - min1 - max1);
805  RealType const s1 = centroids_.sums_[idx1] - (min1 ? min() : max1 ? max() : 0);
806  RealType const s2 = centroids_.sums_[idx2] - (min2 ? min() : max2 ? max() : 0);
807  if (isSingleton(centroids_.counts_.begin() + idx2)) {
808  return (idx1 < idx2 ? 2 : -2) * (n1 * s2 - s1) / (n1 * n1);
809  } else {
810  RealType const n2 = static_cast<RealType>(centroids_.counts_[idx2] - min2 - max2);
811  return (idx1 < idx2 ? 2 : -2) * (n1 * s2 - n2 * s1) / (n1 * n2 * (n1 + n2));
812  }
813  }
814 }
DEVICE RealType max() const
Definition: quantile.h:192
DEVICE RealType min() const
Definition: quantile.h:193
DEVICE bool isSingleton(CountsIterator itr)
Definition: quantile.h:657
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184

+ Here is the call graph for this function:

template<typename RealType , typename IndexType = size_t>
DEVICE IndexType quantile::detail::TDigest< RealType, IndexType >::totalWeight ( ) const
inline

Definition at line 275 of file quantile.h.

References quantile::detail::TDigest< RealType, IndexType >::centroids_.

275 { return centroids_.totalWeight(); }
Centroids< RealType, IndexType > centroids_
Definition: quantile.h:184

Member Data Documentation

template<typename RealType , typename IndexType = size_t>
Centroids<RealType, IndexType> quantile::detail::TDigest< RealType, IndexType >::buf_
private
template<typename RealType , typename IndexType = size_t>
IndexType const quantile::detail::TDigest< RealType, IndexType >::buf_allocate_ {0}
private

Definition at line 189 of file quantile.h.

template<typename RealType , typename IndexType = size_t>
IndexType const quantile::detail::TDigest< RealType, IndexType >::centroids_allocate_ {0}
private

Definition at line 190 of file quantile.h.

template<typename RealType , typename IndexType = size_t>
bool quantile::detail::TDigest< RealType, IndexType >::forward_ {true}
private

Definition at line 185 of file quantile.h.

template<typename RealType , typename IndexType = size_t>
SimpleAllocator* const quantile::detail::TDigest< RealType, IndexType >::simple_allocator_ {nullptr}
private

Definition at line 188 of file quantile.h.


The documentation for this class was generated from the following file: