xgboost
|
Classes | |
struct | ArrayInterfaceHandler |
struct | AllTag |
struct | IntTag |
struct | RangeTag |
struct | Conjunction |
struct | Conjunction< B1 > |
struct | Conjunction< B1, Bn... > |
Typedefs | |
template<typename S > | |
using | RemoveCRType = std::remove_const_t< std::remove_reference_t< S > > |
template<typename S > | |
using | IndexToTag = std::conditional_t< std::is_integral< RemoveCRType< S > >::value, IntTag, S > |
template<typename... Index> | |
using | IsAllIntegral = Conjunction< std::is_integral< std::remove_reference_t< Index > >... > |
template<typename... Index> | |
using | EnableIfIntegral = std::enable_if_t< IsAllIntegral< Index... >::value > |
Functions | |
template<size_t dim, typename S , typename Head , size_t D> | |
constexpr size_t | Offset (S(&strides)[D], size_t n, Head head) |
template<size_t dim, typename S , size_t D, typename Head , typename... Tail> | |
constexpr std::enable_if_t< sizeof...(Tail) !=0, size_t > | Offset (S(&strides)[D], size_t n, Head head, Tail &&...rest) |
template<int32_t D, bool f_array = false> | |
constexpr void | CalcStride (size_t const (&shape)[D], size_t(&stride)[D]) |
template<typename T > | |
constexpr int32_t | CalcSliceDim () |
Calculate the dimension of sliced tensor. More... | |
template<typename T , typename... S> | |
constexpr std::enable_if_t< sizeof...(S) !=0, int32_t > | CalcSliceDim () |
template<int32_t D> | |
constexpr size_t | CalcSize (size_t(&shape)[D]) |
template<int32_t n, typename Fn > | |
constexpr LINALG_HD auto | UnrollLoop (Fn fn) |
template<typename T > | |
int32_t | NativePopc (T v) |
LINALG_HD int | Popc (uint32_t v) |
LINALG_HD int | Popc (uint64_t v) |
template<std::size_t D, typename Head > | |
LINALG_HD void | IndexToArr (std::size_t(&arr)[D], Head head) |
template<std::size_t D, typename Head , typename... Rest> | |
LINALG_HD void | IndexToArr (std::size_t(&arr)[D], Head head, Rest &&...index) |
Convert index from parameter pack to C-style array. More... | |
template<class T , std::size_t N, std::size_t... Idx> | |
constexpr auto | ArrToTuple (T(&arr)[N], std::index_sequence< Idx... >) |
template<class T , std::size_t N> | |
constexpr auto | ArrToTuple (T(&arr)[N]) |
Convert C-styple array to std::tuple. More... | |
template<typename I , std::int32_t D> | |
LINALG_HD auto | UnravelImpl (I idx, common::Span< size_t const, D > shape) |
template<size_t dim, typename I , int32_t D> | |
void | ReshapeImpl (size_t(&out_shape)[D], I s) |
template<size_t dim, int32_t D, typename... S, typename I , std::enable_if_t< sizeof...(S) !=0 > * = nullptr> | |
void | ReshapeImpl (size_t(&out_shape)[D], I &&s, S &&...rest) |
template<typename Fn , typename Tup , size_t... I> | |
decltype(auto) constexpr LINALG_HD | Apply (Fn &&f, Tup &&t, std::index_sequence< I... >) |
template<typename Fn , typename Tup > | |
decltype(auto) constexpr LINALG_HD | Apply (Fn &&f, Tup &&t) |
using xgboost::linalg::detail::EnableIfIntegral = typedef std::enable_if_t<IsAllIntegral<Index...>::value> |
using xgboost::linalg::detail::IndexToTag = typedef std::conditional_t<std::is_integral<RemoveCRType<S> >::value, IntTag, S> |
using xgboost::linalg::detail::IsAllIntegral = typedef Conjunction<std::is_integral<std::remove_reference_t<Index> >...> |
using xgboost::linalg::detail::RemoveCRType = typedef std::remove_const_t<std::remove_reference_t<S> > |
|
constexpr |
C++ 17 style apply.
f | function to apply |
t | tuple of arguments |
|
constexpr |
|
constexpr |
Convert C-styple array to std::tuple.
|
constexpr |
|
constexpr |
|
constexpr |
Calculate the dimension of sliced tensor.
|
constexpr |
|
constexpr |
LINALG_HD void xgboost::linalg::detail::IndexToArr | ( | std::size_t(&) | arr[D], |
Head | head | ||
) |
LINALG_HD void xgboost::linalg::detail::IndexToArr | ( | std::size_t(&) | arr[D], |
Head | head, | ||
Rest &&... | index | ||
) |
Convert index from parameter pack to C-style array.
int32_t xgboost::linalg::detail::NativePopc | ( | T | v | ) |
|
constexpr |
|
constexpr |
|
inline |
|
inline |
void xgboost::linalg::detail::ReshapeImpl | ( | size_t(&) | out_shape[D], |
I && | s, | ||
S &&... | rest | ||
) |
void xgboost::linalg::detail::ReshapeImpl | ( | size_t(&) | out_shape[D], |
I | s | ||
) |
LINALG_HD auto xgboost::linalg::detail::UnravelImpl | ( | I | idx, |
common::Span< size_t const, D > | shape | ||
) |
|
constexpr |