xgboost
Classes | Namespaces | Macros | Typedefs | Variables
base.h File Reference

defines configuration macros of xgboost. More...

#include <dmlc/base.h>
#include <dmlc/omp.h>
#include <cmath>
#include <iostream>
#include <vector>
#include <string>
#include <utility>
Include dependency graph for base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  xgboost::detail::GradientPairInternal< T >
 Implementation of gradient statistics pair. Template specialisation may be used to overload different gradients types e.g. low precision, high precision, integer, floating point. More...
 
class  xgboost::GradientPairInt64
 Fixed point representation for high precision gradient pair. Has a different interface so we don't accidentally use it in gain calculations. More...
 

Namespaces

 xgboost
 namespace of xgboost
 
 xgboost::detail
 

Macros

#define XGBOOST_STRICT_R_MODE   0
 string flag for R library, to leave hooks when needed. More...
 
#define XGBOOST_LOG_WITH_TIME   1
 Whether always log console message with time. It will display like, with timestamp appended to head of the message. "[21:47:50] 6513x126 matrix with 143286 entries loaded from ../data/agaricus.txt.train". More...
 
#define XGBOOST_CUSTOMIZE_LOGGER   XGBOOST_STRICT_R_MODE
 Whether customize the logger outputs. More...
 
#define XGBOOST_CUSTOMIZE_GLOBAL_PRNG   XGBOOST_STRICT_R_MODE
 Whether to customize global PRNG. More...
 
#define XGBOOST_ALIGNAS(X)
 Check if alignas(*) keyword is supported. (g++ 4.8 or higher) More...
 
#define XGBOOST_PARALLEL_SORT(X, Y, Z)   std::sort((X), (Y), (Z))
 
#define XGBOOST_PARALLEL_STABLE_SORT(X, Y, Z)   std::stable_sort((X), (Y), (Z))
 
#define XGBOOST_EXPECT(cond, ret)   (cond)
 
#define XGBOOST_DEVICE
 Tag function as usable by device. More...
 
#define XGBOOST_HOST_DEV_INLINE
 
#define XGBOOST_DEV_INLINE
 

Typedefs

using xgboost::bst_uint = uint32_t
 unsigned integer type used for feature index. More...
 
using xgboost::bst_int = int32_t
 integer type. More...
 
using xgboost::bst_ulong = uint64_t
 unsigned long integers More...
 
using xgboost::bst_float = float
 float type, used for storing statistics More...
 
using xgboost::bst_cat_t = int32_t
 Categorical value type. More...
 
using xgboost::bst_feature_t = uint32_t
 Type for data column (feature) index. More...
 
using xgboost::bst_bin_t = int32_t
 Type for histogram bin index. More...
 
using xgboost::bst_row_t = std::size_t
 Type for data row index. More...
 
using xgboost::bst_node_t = int32_t
 Type for tree node index. More...
 
using xgboost::bst_group_t = uint32_t
 Type for ranking group index. More...
 
using xgboost::GradientPair = detail::GradientPairInternal< float >
 gradient statistics pair usually needed in gradient boosting More...
 
using xgboost::GradientPairPrecise = detail::GradientPairInternal< double >
 High precision gradient statistics pair. More...
 
using xgboost::Args = std::vector< std::pair< std::string, std::string > >
 
using xgboost::omp_ulong = dmlc::omp_ulong
 define unsigned long for openmp loop More...
 
using xgboost::bst_omp_uint = dmlc::omp_uint
 define unsigned int for openmp loop More...
 
using xgboost::XGBoostVersionT = int32_t
 Type used for representing version number in binary form. More...
 

Variables

constexpr bst_float xgboost::kRtEps = 1e-6f
 small eps gap for minimum split decision. More...
 

Detailed Description

defines configuration macros of xgboost.

Copyright (c) 2015 by Contributors

Macro Definition Documentation

◆ XGBOOST_ALIGNAS

#define XGBOOST_ALIGNAS (   X)

Check if alignas(*) keyword is supported. (g++ 4.8 or higher)

◆ XGBOOST_CUSTOMIZE_GLOBAL_PRNG

#define XGBOOST_CUSTOMIZE_GLOBAL_PRNG   XGBOOST_STRICT_R_MODE

Whether to customize global PRNG.

◆ XGBOOST_CUSTOMIZE_LOGGER

#define XGBOOST_CUSTOMIZE_LOGGER   XGBOOST_STRICT_R_MODE

Whether customize the logger outputs.

◆ XGBOOST_DEV_INLINE

#define XGBOOST_DEV_INLINE

◆ XGBOOST_DEVICE

#define XGBOOST_DEVICE

Tag function as usable by device.

◆ XGBOOST_EXPECT

#define XGBOOST_EXPECT (   cond,
  ret 
)    (cond)

◆ XGBOOST_HOST_DEV_INLINE

#define XGBOOST_HOST_DEV_INLINE

◆ XGBOOST_LOG_WITH_TIME

#define XGBOOST_LOG_WITH_TIME   1

Whether always log console message with time. It will display like, with timestamp appended to head of the message. "[21:47:50] 6513x126 matrix with 143286 entries loaded from ../data/agaricus.txt.train".

◆ XGBOOST_PARALLEL_SORT

#define XGBOOST_PARALLEL_SORT (   X,
  Y,
 
)    std::sort((X), (Y), (Z))

◆ XGBOOST_PARALLEL_STABLE_SORT

#define XGBOOST_PARALLEL_STABLE_SORT (   X,
  Y,
 
)    std::stable_sort((X), (Y), (Z))

◆ XGBOOST_STRICT_R_MODE

#define XGBOOST_STRICT_R_MODE   0

string flag for R library, to leave hooks when needed.