xgboost

Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
xgboost::detail::GradientPairInternal< T > Class Template Reference

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...

`#include <base.h>`

Collaboration diagram for xgboost::detail::GradientPairInternal< T >:

## Public Types
using | ValueT = T

## Public Member Functions
void | Add (const ValueT &grad, const ValueT &hess)
XGBOOST_DEVICE | GradientPairInternal ()
XGBOOST_DEVICE | GradientPairInternal (T grad, T hess)
| GradientPairInternal (const GradientPairInternal< T > &g)=default
template<typename T2 >
XGBOOST_DEVICE | GradientPairInternal (const GradientPairInternal< T2 > &g)
XGBOOST_DEVICE T | GetGrad () const
XGBOOST_DEVICE T | GetHess () const
XGBOOST_DEVICE GradientPairInternal< T > & | operator+= (const GradientPairInternal< T > &rhs)
XGBOOST_DEVICE GradientPairInternal< T > | operator+ (const GradientPairInternal< T > &rhs) const
XGBOOST_DEVICE GradientPairInternal< T > & | operator-= (const GradientPairInternal< T > &rhs)
XGBOOST_DEVICE GradientPairInternal< T > | operator- (const GradientPairInternal< T > &rhs) const
XGBOOST_DEVICE GradientPairInternal< T > & | operator*= (float multiplier)
XGBOOST_DEVICE GradientPairInternal< T > | operator* (float multiplier) const
XGBOOST_DEVICE GradientPairInternal< T > & | operator/= (float divisor)
XGBOOST_DEVICE GradientPairInternal< T > | operator/ (float divisor) const
XGBOOST_DEVICE bool | operator== (const GradientPairInternal< T > &rhs) const
XGBOOST_DEVICE | GradientPairInternal (int value)

## Static Public Member Functions
static void | Reduce (GradientPairInternal< T > &a, const GradientPairInternal< T > &b)

## Friends
std::ostream & | operator<< (std::ostream &os, const GradientPairInternal< T > &g)

## Detailed Description

### template<typename T>
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.

## Member Typedef Documentation

## ◆ ValueT

template<typename T>

using xgboost::detail::GradientPairInternal< T >::ValueT = T

## Constructor & Destructor Documentation

## ◆ GradientPairInternal() [1/5]

template<typename T>

XGBOOST_DEVICE xgboost::detail::GradientPairInternal< T >::GradientPairInternal | ( |  | ) |
| inline

## ◆ GradientPairInternal() [2/5]

template<typename T>

XGBOOST_DEVICE xgboost::detail::GradientPairInternal< T >::GradientPairInternal | ( | T | grad,
|  | T | hess
| ) |  |
| inline

## ◆ GradientPairInternal() [3/5]

template<typename T>

xgboost::detail::GradientPairInternal< T >::GradientPairInternal | ( | const GradientPairInternal< T > & | g | ) |
| default

## ◆ GradientPairInternal() [4/5]

template<typename T>
template<typename T2 >

XGBOOST_DEVICE xgboost::detail::GradientPairInternal< T >::GradientPairInternal | ( | const GradientPairInternal< T2 > & | g | ) |
| inline explicit

## ◆ GradientPairInternal() [5/5]

template<typename T>

XGBOOST_DEVICE xgboost::detail::GradientPairInternal< T >::GradientPairInternal | ( | int | value | ) |
| inline explicit

## Member Function Documentation

## ◆ Add()

template<typename T>

void xgboost::detail::GradientPairInternal< T >::Add | ( | const ValueT & | grad,
|  | const ValueT & | hess
| ) |  |
| inline

## ◆ GetGrad()

template<typename T>

XGBOOST_DEVICE T xgboost::detail::GradientPairInternal< T >::GetGrad | ( |  | ) | const
| inline

## ◆ GetHess()

template<typename T>

XGBOOST_DEVICE T xgboost::detail::GradientPairInternal< T >::GetHess | ( |  | ) | const
| inline

## ◆ operator*()

template<typename T>

XGBOOST_DEVICE GradientPairInternal<T> xgboost::detail::GradientPairInternal< T >::operator* | ( | float | multiplier | ) | const
| inline

## ◆ operator*=()

template<typename T>

XGBOOST_DEVICE GradientPairInternal<T>& xgboost::detail::GradientPairInternal< T >::operator*= | ( | float | multiplier | ) |
| inline

## ◆ operator+()

template<typename T>

XGBOOST_DEVICE GradientPairInternal<T> xgboost::detail::GradientPairInternal< T >::operator+ | ( | const GradientPairInternal< T > & | rhs | ) | const
| inline

## ◆ operator+=()

template<typename T>

XGBOOST_DEVICE GradientPairInternal<T>& xgboost::detail::GradientPairInternal< T >::operator+= | ( | const GradientPairInternal< T > & | rhs | ) |
| inline

## ◆ operator-()

template<typename T>

XGBOOST_DEVICE GradientPairInternal<T> xgboost::detail::GradientPairInternal< T >::operator- | ( | const GradientPairInternal< T > & | rhs | ) | const
| inline

## ◆ operator-=()

template<typename T>

XGBOOST_DEVICE GradientPairInternal<T>& xgboost::detail::GradientPairInternal< T >::operator-= | ( | const GradientPairInternal< T > & | rhs | ) |
| inline

## ◆ operator/()

template<typename T>

XGBOOST_DEVICE GradientPairInternal<T> xgboost::detail::GradientPairInternal< T >::operator/ | ( | float | divisor | ) | const
| inline

## ◆ operator/=()

template<typename T>

XGBOOST_DEVICE GradientPairInternal<T>& xgboost::detail::GradientPairInternal< T >::operator/= | ( | float | divisor | ) |
| inline

## ◆ operator==()

template<typename T>

XGBOOST_DEVICE bool xgboost::detail::GradientPairInternal< T >::operator== | ( | const GradientPairInternal< T > & | rhs | ) | const
| inline

## ◆ Reduce()

template<typename T>

static void xgboost::detail::GradientPairInternal< T >::Reduce | ( | GradientPairInternal< T > & | a,
|  | const GradientPairInternal< T > & | b
| ) |  |
| inline static

## Friends And Related Function Documentation

## ◆ operator<<

template<typename T>

std::ostream& operator<< | ( | std::ostream & | os,
|  | const GradientPairInternal< T > & | g
| ) |  |
| friend

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

- /workspace/include/xgboost/base.h