|
template<class T , std::size_t X, class U , std::size_t Y> |
XGBOOST_DEVICE bool | operator== (Span< T, X > l, Span< U, Y > r) |
|
template<class T , std::size_t X, class U , std::size_t Y> |
XGBOOST_DEVICE constexpr bool | operator!= (Span< T, X > l, Span< U, Y > r) |
|
template<class T , std::size_t X, class U , std::size_t Y> |
XGBOOST_DEVICE constexpr bool | operator< (Span< T, X > l, Span< U, Y > r) |
|
template<class T , std::size_t X, class U , std::size_t Y> |
XGBOOST_DEVICE constexpr bool | operator<= (Span< T, X > l, Span< U, Y > r) |
|
template<class T , std::size_t X, class U , std::size_t Y> |
XGBOOST_DEVICE constexpr bool | operator> (Span< T, X > l, Span< U, Y > r) |
|
template<class T , std::size_t X, class U , std::size_t Y> |
XGBOOST_DEVICE constexpr bool | operator>= (Span< T, X > l, Span< U, Y > r) |
|
template<class T , std::size_t E> |
XGBOOST_DEVICE auto | as_bytes (Span< T, E > s) __span_noexcept -> Span< const byte, detail::ExtentAsBytesValue< T, E >::value > |
|
template<class T , std::size_t E> |
XGBOOST_DEVICE auto | as_writable_bytes (Span< T, E > s) __span_noexcept -> Span< byte, detail::ExtentAsBytesValue< T, E >::value > |
|
bool | CheckNAN (double v) |
|
double | LogGamma (double v) |
|
template<typename It , typename Idx > |
auto | SegmentId (It first, It last, Idx idx) |
|
template<typename Iter , typename Comp > |
void | StableSort (Context const *ctx, Iter begin, Iter end, Comp &&comp) |
|
template<typename Iter , typename Comp > |
void | Sort (Context const *ctx, Iter begin, Iter end, Comp comp) |
|
template<typename Idx , typename Iter , typename V = typename std::iterator_traits<Iter>::value_type, typename Comp = std::less<V>> |
std::vector< Idx > | ArgSort (Context const *ctx, Iter begin, Iter end, Comp comp=std::less< V >{}) |
|
template<typename T > |
XGBOOST_DEVICE bst_cat_t | AsCat (T const &v) |
|
XGBOOST_DEVICE bool | IsCat (Span< FeatureType const > ft, bst_feature_t fidx) |
|
constexpr bst_cat_t | OutOfRangeCat () |
|
XGBOOST_DEVICE bool | InvalidCat (float cat) |
|
XGBOOST_DEVICE bool | Decision (common::Span< CatBitField::value_type const > cats, float cat) |
| Whether should it traverse to left branch of a tree.
|
|
void | InvalidCategory () |
|
void | CheckMaxCat (float max_cat, size_t n_categories) |
|
XGBOOST_DEVICE bool | UseOneHot (uint32_t n_cats, uint32_t max_cat_to_onehot) |
| Whether should we use onehot encoding for categorical data.
|
|
GlobalRandomEngine & | GlobalRandom () |
| global singleton of a random engine. This random engine is thread-local and only visible to current thread.
|
|
void | EscapeU8 (std::string const &string, std::string *p_buffer) |
|
int | AllVisibleGPUs () |
|
std::vector< std::string > | Split (const std::string &s, char delim) |
| Split a string by delimiter.
|
|
template<typename T > |
XGBOOST_DEVICE T | Max (T a, T b) |
|
template<typename T1 , typename T2 > |
XGBOOST_DEVICE T1 | DivRoundUp (const T1 a, const T2 b) |
|
template<class T , std::size_t N> |
constexpr auto | UnpackArr (std::array< T, N > &&arr) |
|
void | AssertGPUSupport () |
|
void | AssertOneAPISupport () |
|
void | SetDevice (std::int32_t device) |
|
template<typename Indexable > |
XGBOOST_DEVICE size_t | LastOf (size_t group, Indexable const &indptr) |
| Last index of a group in a CSR style of index pointer.
|
|
HistogramCuts | SketchOnDMatrix (Context const *ctx, DMatrix *m, bst_bin_t max_bins, bool use_sorted=false, Span< float const > hessian={}) |
| Run CPU sketching on DMatrix.
|
|
void | IncrementHist (GHistRow dst, ConstGHistRow add, std::size_t begin, std::size_t end) |
| Increment hist as dst += add in range [begin, end)
|
|
void | CopyHist (GHistRow dst, const GHistRow src, size_t begin, size_t end) |
| Copy hist from src to dst in range [begin, end)
|
|
void | SubtractionHist (GHistRow dst, const GHistRow src1, const GHistRow src2, size_t begin, size_t end) |
| Compute Subtraction: dst = src1 - src2 in range [begin, end)
|
|
template<bool do_prefetch, class BuildingManager > |
void | RowsWiseBuildHistKernel (Span< GradientPair const > gpair, const RowSetCollection::Elem row_indices, const GHistIndexMatrix &gmat, GHistRow hist) |
|
template<class BuildingManager > |
void | ColsWiseBuildHistKernel (Span< GradientPair const > gpair, const RowSetCollection::Elem row_indices, const GHistIndexMatrix &gmat, GHistRow hist) |
|
template<class BuildingManager > |
void | BuildHistDispatch (Span< GradientPair const > gpair, const RowSetCollection::Elem row_indices, const GHistIndexMatrix &gmat, GHistRow hist) |
|
template<bool any_missing> |
void | BuildHist (Span< GradientPair const > gpair, const RowSetCollection::Elem row_indices, const GHistIndexMatrix &gmat, GHistRow hist, bool force_read_by_column) |
|
template void | BuildHist< true > (Span< GradientPair const > gpair, const RowSetCollection::Elem row_indices, const GHistIndexMatrix &gmat, GHistRow hist, bool force_read_by_column) |
|
template void | BuildHist< false > (Span< GradientPair const > gpair, const RowSetCollection::Elem row_indices, const GHistIndexMatrix &gmat, GHistRow hist, bool force_read_by_column) |
|
template<typename Fn > |
auto | DispatchBinType (BinTypeSize type, Fn &&fn) |
| Dispatch for bin type, fn is a function that accepts a scalar of the bin type.
|
|
template<typename GradientIndex > |
bst_bin_t XGBOOST_HOST_DEV_INLINE | BinarySearchBin (std::size_t begin, std::size_t end, GradientIndex const &data, bst_feature_t const fidx_begin, bst_feature_t const fidx_end) |
|
std::string | LoadSequentialFile (std::string uri, bool stream=false) |
| Helper function for loading consecutive file to avoid dmlc Stream when possible.
|
|
std::string | FileExtension (std::string fname, bool lower=true) |
| Get file extension from file name.
|
|
std::unique_ptr< MMAPFile > | Open (std::string path, std::size_t offset, std::size_t length) |
|
std::string | ReadAll (dmlc::Stream *fi, PeekableInStream *fp) |
| Read the whole buffer from dmlc stream.
|
|
std::string | ReadAll (std::string const &path) |
| Read the whole file content into a string.
|
|
constexpr std::size_t | IOAlignment () |
|
template<typename T > |
XGBOOST_DEVICE T | Sqr (T const &w) |
|
XGBOOST_DEVICE float | Sigmoid (float x) |
| calculate the sigmoid of the input.
|
|
XGBOOST_DEVICE double | Sigmoid (double x) |
|
template<typename T , typename U > |
XGBOOST_DEVICE constexpr bool | CloseTo (T a, U b) |
| Equality test for both integer and floating point.
|
|
template<typename Iterator > |
XGBOOST_DEVICE void | Softmax (Iterator start, Iterator end) |
| Do inplace softmax transformaton on start to end.
|
|
template<typename Iterator > |
XGBOOST_DEVICE Iterator | FindMaxIndex (Iterator begin, Iterator end) |
| Find the maximum iterator within the iterators.
|
|
float | LogSum (float x, float y) |
| perform numerically safe logsum
|
|
template<typename Iterator > |
float | LogSum (Iterator begin, Iterator end) |
| perform numerically safe logsum
|
|
template<typename T > |
XGBOOST_DEVICE std::enable_if< std::numeric_limits< T >::is_integer, bool >::type | CheckNAN (T) |
|
XGBOOST_DEVICE bool | CheckNAN (float x) |
|
template<typename T > |
XGBOOST_DEVICE T | LogGamma (T v) |
|
double | Reduce (Context const *ctx, HostDeviceVector< float > const &values) |
| Reduction on host device vector.
|
|
template<typename Iter , typename Idx > |
void | RunLengthEncode (Iter begin, Iter end, std::vector< Idx > *p_out) |
| Run length encode on CPU, input must be sorted.
|
|
template<typename InIt , typename OutIt , typename T > |
void | PartialSum (int32_t n_threads, InIt begin, InIt end, T init, OutIt out_it) |
| Varient of std::partial_sum, out_it should point to a container that has n + 1 elements.
|
|
template<typename It > |
void | Iota (Context const *ctx, It first, It last, typename std::iterator_traits< It >::value_type const &value) |
|
OptionalWeights | MakeOptionalWeights (Context const *ctx, HostDeviceVector< float > const &weights) |
|
template<typename SketchType > |
void | AddCutPoint (typename SketchType::SummaryContainer const &summary, int max_bin, HistogramCuts *cuts) |
|
auto | AddCategories (std::set< float > const &categories, HistogramCuts *cuts) |
|
template<typename Batch , typename IsValid > |
std::vector< bst_row_t > | CalcColumnSize (Batch const &batch, bst_feature_t const n_columns, size_t const n_threads, IsValid &&is_valid) |
|
template<typename Batch , typename IsValid > |
std::vector< bst_feature_t > | LoadBalance (Batch const &batch, size_t nnz, bst_feature_t n_columns, size_t const nthreads, IsValid &&is_valid) |
|
std::ostream & | operator<< (std::ostream &os, const ParamFloatArray &array) |
|
std::istream & | operator>> (std::istream &is, ParamFloatArray &array) |
|
| DMLC_REGISTER_PARAMETER (QuantileLossParam) |
|
template<typename T > |
std::vector< T > | WeightedSamplingWithoutReplacement (Context const *ctx, std::vector< T > const &array, std::vector< float > const &weights, size_t n) |
|
template<typename Vec > |
bool | ReadVec (common::AlignedResourceReadStream *fi, Vec *vec) |
| Read a vector from stream.
|
|
template<typename Vec > |
std::size_t | WriteVec (AlignedFileWriteStream *fo, Vec const &vec) |
| Write a vector to stream.
|
|
template<typename T > |
RefResourceView< T > | MakeFixedVecWithMalloc (std::size_t n_elements, T const &init) |
| Make a fixed size RefResourceView with malloc resource.
|
|
void | Median (Context const *ctx, linalg::Tensor< float, 2 > const &t, HostDeviceVector< float > const &weights, linalg::Tensor< float, 1 > *out) |
| Calculate medians for each column of the input matrix.
|
|
void | Mean (Context const *ctx, linalg::Vector< float > const &v, linalg::Vector< float > *out) |
|
template<typename Iter > |
float | Quantile (Context const *ctx, double alpha, Iter const &begin, Iter const &end) |
| Quantile using linear interpolation.
|
|
template<typename Iter , typename WeightIter > |
float | WeightedQuantile (Context const *ctx, double alpha, Iter begin, Iter end, WeightIter w_begin) |
| Calculate the weighted quantile with step function.
|
|
| DMLC_REGISTER_PARAMETER (AFTParam) |
|
std::int32_t | GetCGroupV1Count (std::filesystem::path const "a_path, std::filesystem::path const &peroid_path) |
| Modified from github.com/psiha/sweater/blob/master/include/boost/sweater/hardware_concurrency.hpp.
|
|
std::int32_t | GetCGroupV2Count (std::filesystem::path const &bandwidth_path) noexcept(true) |
|
std::int32_t | GetCfsCPUCount () noexcept |
| Get thread limit from CFS.
|
|
std::int32_t | OmpGetNumThreads (std::int32_t n_threads) |
| Get the number of available threads based on n_threads specified by users.
|
|
template<typename Func > |
void | ParallelFor2d (const BlockedSpace2d &space, int n_threads, Func &&func) |
|
template<typename Index , typename Func > |
void | ParallelFor (Index size, int32_t n_threads, Sched sched, Func fn) |
|
template<typename Index , typename Func > |
void | ParallelFor (Index size, int32_t n_threads, Func fn) |
|
std::int32_t | OmpGetThreadLimit () |
|
std::int32_t constexpr | DefaultMaxThreads () |
| Constant that can be used for initializing static thread local memory.
|
|
template<typename Fn > |
auto | MakeIndexTransformIter (Fn &&fn) |
|
| TEST (Algorithm, ArgSort) |
|
| TEST (Algorithm, Sort) |
|
| TEST (Categorical, Decision) |
|
| TEST (Categorical, MinimalSet) |
| Test for running inference with input category greater than the one stored in tree.
|
|
| TEST (ColumnMatrix, Basic) |
|
template<typename BinIdxType > |
void | CheckSparseColumn (SparseColumnIter< BinIdxType > *p_col, const GHistIndexMatrix &gmat) |
|
| TEST (ColumnMatrix, SparseColumn) |
|
template<typename BinIdxType > |
void | CheckColumWithMissingValue (const DenseColumnIter< BinIdxType, true > &col, const GHistIndexMatrix &gmat) |
|
| TEST (ColumnMatrix, DenseColumnWithMissing) |
|
| TEST (ColumnMatrix, GrowMissing) |
|
| TEST (CompressedIterator, Test) |
|
| TEST (ConfigParser, NormalizeConfigEOL) |
|
| TEST (ConfigParser, TrimWhitespace) |
|
| TEST (ConfigParser, ParseKeyValuePair) |
|
| TEST (GroupData, ParallelGroupBuilder) |
|
void | ParallelGHistBuilderReset () |
|
void | ParallelGHistBuilderReduceHist () |
|
| TEST (ParallelGHistBuilder, Reset) |
|
| TEST (ParallelGHistBuilder, ReduceHist) |
|
| TEST (CutsBuilder, SearchGroupInd) |
|
| TEST (HistUtil, DenseCutsCategorical) |
|
| TEST (HistUtil, DenseCutsAccuracyTest) |
|
| TEST (HistUtil, DenseCutsAccuracyTestWeights) |
|
void | TestQuantileWithHessian (bool use_sorted) |
|
| TEST (HistUtil, QuantileWithHessian) |
|
| TEST (HistUtil, DenseCutsExternalMemory) |
|
| TEST (HistUtil, IndexBinBound) |
|
template<typename T > |
void | CheckIndexData (T const *data_ptr, uint32_t const *offsets, const GHistIndexMatrix &hmat, size_t n_cols) |
|
| TEST (HistUtil, IndexBinData) |
|
void | TestSketchFromWeights (bool with_group) |
|
| TEST (HistUtil, SketchFromWeights) |
|
| TEST (HistUtil, SketchCategoricalFeatures) |
|
std::vector< float > | GenerateRandom (int num_rows, int num_columns) |
|
std::vector< float > | GenerateRandomWeights (int num_rows) |
|
std::shared_ptr< data::SimpleDMatrix > | GetDMatrixFromData (const std::vector< float > &x, int num_rows, int num_columns) |
|
std::shared_ptr< DMatrix > | GetExternalMemoryDMatrixFromData (const std::vector< float > &x, int num_rows, int num_columns, const dmlc::TemporaryDirectory &tempdir) |
|
void | TestBinDistribution (const HistogramCuts &cuts, int column_idx, const std::vector< float > &sorted_column, const std::vector< float > &sorted_weights) |
|
void | TestRank (const std::vector< float > &column_cuts, const std::vector< float > &sorted_x, const std::vector< float > &sorted_weights) |
|
void | ValidateColumn (const HistogramCuts &cuts, int column_idx, const std::vector< float > &sorted_column, const std::vector< float > &sorted_weights, size_t num_bins) |
|
void | ValidateCuts (const HistogramCuts &cuts, DMatrix *dmat, int num_bins) |
|
template<typename Fn > |
void | TestCategoricalSketch (size_t n, size_t num_categories, int32_t num_bins, bool weighted, Fn sketch) |
| Test for sketching on categorical data.
|
|
| TEST (MemoryFixSizeBuffer, Seek) |
|
| TEST (IO, FileExtension) |
|
| TEST (IO, FixedSizeStream) |
|
| TEST (IO, LoadSequentialFile) |
|
| TEST (IO, Resource) |
|
| TEST (IO, PrivateMmapStream) |
|
| TEST (Monitor, Logging) |
|
| TEST (Numeric, PartialSum) |
|
| TEST (Numeric, Reduce) |
|
| TEST (OptionalWeight, Basic) |
|
| TEST (PartitionBuilder, BasicTest) |
|
template<typename Distribution > |
void | RunDistributionGenericTest () |
|
| TEST (ProbabilityDistribution, DistributionGeneric) |
|
| TEST (ProbabilityDistribution, NormalDist) |
|
| TEST (ProbabilityDistribution, LogisticDist) |
|
| TEST (ProbabilityDistribution, ExtremeDist) |
|
| TEST (Quantile, LoadBalance) |
|
| TEST (Quantile, DistributedBasic) |
|
| TEST (Quantile, Distributed) |
|
| TEST (Quantile, SortedDistributedBasic) |
|
| TEST (Quantile, SortedDistributed) |
|
| TEST (Quantile, ColSplitBasic) |
|
| TEST (Quantile, ColSplit) |
|
| TEST (Quantile, ColSplitSortedBasic) |
|
| TEST (Quantile, ColSplitSorted) |
|
| TEST (Quantile, SameOnAllWorkers) |
|
template<typename Fn > |
void | RunWithSeedsAndBins (size_t rows, Fn fn) |
|
| TEST (QuantileLossParam, Basic) |
|
| TEST (ColumnSampler, Test) |
|
| TEST (ColumnSampler, ThreadSynchronisation) |
|
| TEST (ColumnSampler, WeightedSampling) |
|
| TEST (ColumnSampler, WeightedMultiSampling) |
|
| TEST (RefResourceView, Basic) |
|
| TEST (RefResourceView, IO) |
|
| TEST (RefResourceView, IOAligned) |
|
| TEST (Span, TestStatus) |
|
| TEST (Span, DlfConstructors) |
|
| TEST (Span, FromNullPtr) |
|
| TEST (Span, FromPtrLen) |
|
| TEST (SpanDeathTest, FromPtrLen) |
|
| TEST (Span, FromFirstLast) |
|
| TEST (Span, FromOther) |
|
| TEST (Span, FromArray) |
|
| TEST (Span, FromContainer) |
|
| TEST (Span, Assignment) |
|
| TEST (SpanIter, Construct) |
|
| TEST (SpanIter, Ref) |
|
| TEST (SpanIter, Calculate) |
|
| TEST (SpanIter, Compare) |
|
| TEST (Span, BeginEnd) |
|
| TEST (Span, RBeginREnd) |
|
| TEST (Span, ElementAccess) |
|
| TEST (SpanDeathTest, ElementAccess) |
|
| TEST (Span, Obversers) |
|
| TEST (Span, FrontBack) |
|
| TEST (SpanDeathTest, FrontBack) |
|
| TEST (Span, FirstLast) |
|
| TEST (SpanDeathTest, FirstLast) |
|
| TEST (Span, Subspan) |
|
| TEST (SpanDeathTest, Subspan) |
|
| TEST (Span, Compare) |
|
| TEST (Span, AsBytes) |
|
| TEST (Span, AsWritableBytes) |
|
| TEST (Span, Empty) |
|
| TEST (SpanDeathTest, Empty) |
|
| TEST (IterSpan, Basic) |
|
| TEST (Stats, Quantile) |
|
| TEST (Stats, WeightedQuantile) |
|
| TEST (Stats, Median) |
|
| TEST (Stats, Mean) |
|
| TEST (AFTLoss, RobustGradientPair) |
|
| TEST (ParallelFor2d, CreateBlockedSpace2d) |
|
| TEST (ParallelFor2d, Test) |
|
| TEST (ParallelFor2d, NonUniform) |
|
| TEST (ParallelFor, Basic) |
|
| TEST (IndexTransformIter, Basic) |
|
| TEST (Transform, DeclareUnifiedTest(Basic)) |
|
| TEST (TransformDeathTest, Exception) |
|
| TEST (AFTLoss, Uncensored) |
|
| TEST (AFTLoss, LeftCensored) |
|
| TEST (AFTLoss, RightCensored) |
|
| TEST (AFTLoss, IntervalCensored) |
|
void | CheckDeterministicMetricElementWise (StringView name, int32_t device) |
|
void | VerifyAFTNegLogLik (DataSplitMode data_split_mode=DataSplitMode::kRow) |
|
void | VerifyIntervalRegressionAccuracy (DataSplitMode data_split_mode=DataSplitMode::kRow) |
|
| TEST (Objective, DeclareUnifiedTest(AFTObjConfiguration)) |
|
| TEST (Objective, DeclareUnifiedTest(AFTObjGPairUncensoredLabels)) |
|
| TEST (Objective, DeclareUnifiedTest(AFTObjGPairLeftCensoredLabels)) |
|
| TEST (Objective, DeclareUnifiedTest(AFTObjGPairRightCensoredLabels)) |
|
| TEST (Objective, DeclareUnifiedTest(AFTObjGPairIntervalCensoredLabels)) |
|
| TEST_F (FederatedMetricTest, AFTNegLogLikRowSplit) |
|
| TEST_F (FederatedMetricTest, AFTNegLogLikColumnSplit) |
|
| TEST_F (FederatedMetricTest, IntervalRegressionAccuracyRowSplit) |
|
| TEST_F (FederatedMetricTest, IntervalRegressionAccuracyColumnSplit) |
|