Medial Code Documentation
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions
xgboost::ArrayInterfaceHandler Class Reference

Utilities for consuming array interface. More...

#include <array_interface.h>

Public Types

enum  Type : std::int8_t {
  kF2 , kF4 , kF8 , kF16 ,
  kI1 , kI2 , kI4 , kI8 ,
  kU1 , kU2 , kU4 , kU8
}
 

Static Public Member Functions

template<typename PtrType >
static PtrType GetPtrFromArrayData (Object::Map const &obj)
 
static void Validate (Object::Map const &array)
 
static size_t ExtractMask (Object::Map const &column, common::Span< RBitField8::value_type > *p_out)
 
template<int32_t D>
static void HandleRowVector (std::vector< size_t > const &shape, std::vector< size_t > *p_out)
 Handle vector inputs.
 
template<int32_t D>
static void ExtractShape (Object::Map const &array, size_t(&out_shape)[D])
 
template<int32_t D>
static bool ExtractStride (Object::Map const &array, size_t itemsize, size_t(&shape)[D], size_t(&stride)[D])
 Extracts the optiona ‘strides’ field and returns whether the array is c-contiguous.
 
static void * ExtractData (Object::Map const &array, size_t size)
 
static bool IsCudaPtr (void const *ptr)
 Whether the ptr is allocated by CUDA.
 
static void SyncCudaStream (int64_t stream)
 Sync the CUDA stream.
 

Detailed Description

Utilities for consuming array interface.

Member Function Documentation

◆ HandleRowVector()

template<int32_t D>
static void xgboost::ArrayInterfaceHandler::HandleRowVector ( std::vector< size_t > const &  shape,
std::vector< size_t > *  p_out 
)
inlinestatic

Handle vector inputs.

For higher dimension, we require strictly correct shape.


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