Class histogram_data¶
class histogram_data<Bins, TCount> base¶
template <size_t Bins = 0, typename TCount = uint32_t>
struct histogram_data { … } Holds the bin counts for a histogram.
| Bins | Number of bins, or 0 for runtime-sized bins. |
| TCount | Integer type used for bin counts. |
typedef vector_type ¶
using vector_type = univector<TCount, Bins == 0 ? tag_dynamic_vector : 2 + Bins> Fully qualified name: kfr::histogram_data<Bins, TCount>::vector_type
Declared at base/reduce.hpp:270
constructor histogram_data<Bins, TCount>(size_t) ¶
Constructs a runtime-sized histogram.
| steps | Number of bins. Only used when Bins is 0. |
Fully qualified name: kfr::histogram_data<Bins, TCount>::histogram_data<Bins, TCount>(size_t)
Declared at base/reduce.hpp:276
function operator[](size_t) ¶
Returns the count in bin n.
| n | Bin index, must be less than size . |
The count in bin n. |
Fully qualified name: kfr::histogram_data<Bins, TCount>::operator[](size_t)
Declared at base/reduce.hpp:289
function below() ¶
Returns the count of values that fell below the histogram range.
Fully qualified name: kfr::histogram_data<Bins, TCount>::below()
Declared at base/reduce.hpp:297
function above() ¶
Returns the count of values that fell above the histogram range.
Fully qualified name: kfr::histogram_data<Bins, TCount>::above()
Declared at base/reduce.hpp:301
function size() ¶
Returns the number of bins.
Fully qualified name: kfr::histogram_data<Bins, TCount>::size()
Declared at base/reduce.hpp:305
function values() ¶
Returns a reference to the bin counts, excluding the below/above counters.
Fully qualified name: kfr::histogram_data<Bins, TCount>::values()
Declared at base/reduce.hpp:309
function total() ¶
Returns the total number of values added to the histogram.
Fully qualified name: kfr::histogram_data<Bins, TCount>::total()
Declared at base/reduce.hpp:313
function put(const vec<T, N> &) ¶
template <typename T, size_t N>
KFR_MEM_INTRINSIC void put(const vec<T, N>& value) Adds a vector of values to the histogram, incrementing the appropriate bins.
| value | Vector of values to add. Floating-point values should be in [0, 1]. |
Fully qualified name: kfr::histogram_data<Bins, TCount>::put(const vec<T, N> &)
Declared at base/reduce.hpp:320
function put(T) ¶
template <typename T>
KFR_MEM_INTRINSIC void put(T value) Adds a single value to the histogram.
| value | Value to add. |
Fully qualified name: kfr::histogram_data<Bins, TCount>::put(T)
Declared at base/reduce.hpp:348
Fully qualified name: kfr::histogram_data<Bins, TCount>
Declared at base/reduce.hpp:268