|
constexpr detail::AllTag | All () |
| Specify all elements in the axis for slicing.
|
|
template<typename I > |
constexpr detail::RangeTag< I > | Range (I beg, I end) |
| Specify a range of elements in the axis for slicing.
|
|
template<typename Container , typename... S, std::enable_if_t<!common::detail::IsSpan< Container >::value &&!std::is_pointer_v< Container > > * = nullptr> |
auto | MakeTensorView (Context const *ctx, Container &data, S &&...shape) |
| Constructor for automatic type deduction.
|
|
template<typename T , typename... S> |
LINALG_HD auto | MakeTensorView (std::int32_t device, common::Span< T > data, S &&...shape) |
|
template<typename T , typename... S> |
auto | MakeTensorView (Context const *ctx, common::Span< T > data, S &&...shape) |
|
template<typename T , typename... S> |
auto | MakeTensorView (Context const *ctx, HostDeviceVector< T > *data, S &&...shape) |
|
template<typename T , typename... S> |
auto | MakeTensorView (Context const *ctx, HostDeviceVector< T > const *data, S &&...shape) |
|
template<size_t D> |
LINALG_HD auto | UnravelIndex (size_t idx, common::Span< size_t const, D > shape) |
| Turns linear index into multi-dimension index.
|
|
template<size_t D> |
LINALG_HD auto | UnravelIndex (size_t idx, std::size_t const (&shape)[D]) |
|
template<typename... S> |
LINALG_HD auto | UnravelIndex (std::size_t idx, S... shape) |
|
template<typename T > |
auto | MakeVec (T *ptr, size_t s, int32_t device=-1) |
| Create a vector view from contigious memory.
|
|
template<typename T > |
auto | MakeVec (HostDeviceVector< T > *data) |
|
template<typename T > |
auto | MakeVec (HostDeviceVector< T > const *data) |
|
template<typename T , int32_t D> |
Json | ArrayInterface (TensorView< T const, D > const &t) |
| Array Interface defined by numpy.
|
|
template<typename T , int32_t D> |
Json | ArrayInterface (TensorView< T, D > const &t) |
| Same as const version, but returns non-readonly data pointer.
|
|
template<typename T , int32_t D> |
auto | ArrayInterfaceStr (TensorView< T const, D > const &t) |
| Return string representation of array interface.
|
|
template<typename T , int32_t D> |
auto | ArrayInterfaceStr (TensorView< T, D > const &t) |
|
template<typename T , typename... Index> |
auto | Empty (Context const *ctx, Index &&...index) |
| Create an array without initialization.
|
|
template<typename T , typename... Index> |
auto | Constant (Context const *ctx, T v, Index &&...index) |
| Create an array with value v.
|
|
template<typename T , typename... Index> |
auto | Zeros (Context const *ctx, Index &&...index) |
| Like np.zeros , return a new array of given shape and type, filled with zeros.
|
|
template<typename T , int32_t D> |
void | Stack (Tensor< T, D > *l, Tensor< T, D > const &r) |
|
template<typename T , int32_t D, typename Fn > |
void | ElementWiseTransformHost (linalg::TensorView< T, D > t, int32_t n_threads, Fn &&fn) |
|
template<typename T , int32_t D, typename Fn > |
void | ElementWiseKernelHost (linalg::TensorView< T, D > t, int32_t n_threads, Fn &&fn) |
|
template<typename T , int32_t D, typename Fn > |
void | ElementWiseKernelDevice (linalg::TensorView< T, D >, Fn &&, void *=nullptr) |
|
template<typename T , int32_t D, typename Fn > |
void | ElementWiseTransformDevice (linalg::TensorView< T, D >, Fn &&, void *=nullptr) |
|
template<typename T , int32_t D, typename Fn > |
void | ElementWiseKernel (Context const *ctx, linalg::TensorView< T, D > t, Fn &&fn) |
|
template<typename T , std::int32_t kDim> |
auto | cbegin (TensorView< T, kDim > const &v) |
|
template<typename T , std::int32_t kDim> |
auto | cend (TensorView< T, kDim > const &v) |
|
template<typename T , std::int32_t kDim> |
auto | begin (TensorView< T, kDim > &v) |
|
template<typename T , std::int32_t kDim> |
auto | end (TensorView< T, kDim > &v) |
|
auto | MakeMatrixFromTest (HostDeviceVector< float > *storage, std::size_t n_rows, std::size_t n_cols) |
|
| TEST (Linalg, MatrixView) |
|
| TEST (Linalg, VectorView) |
|
| TEST (Linalg, TensorView) |
|
| TEST (Linalg, Tensor) |
|
| TEST (Linalg, Empty) |
|
| TEST (Linalg, ArrayInterface) |
|
| TEST (Linalg, Popc) |
|
| TEST (Linalg, Stack) |
|
| TEST (Linalg, FOrder) |
|
Copyright 2021-2023 by XGBoost Contributors.