xgboost
公共类型 | 公共成员函数 | 所有成员列表
xgboost::HostDeviceVector< T > 类模板参考

#include <host_device_vector.h>

xgboost::HostDeviceVector< T > 协作图
Collaboration graph

公共类型

使用 value_type = T
 

公共成员函数

 HostDeviceVector (size_t size=0, T v=T(), DeviceOrd device=DeviceOrd::CPU())
 
 HostDeviceVector (std::initializer_list< T > init, DeviceOrd device=DeviceOrd::CPU())
 
 HostDeviceVector (const std::vector< T > &init, DeviceOrd device=DeviceOrd::CPU())
 
 ~HostDeviceVector ()
 
 HostDeviceVector (const HostDeviceVector< T > &)=delete
 
 HostDeviceVector (HostDeviceVector< T > &&)
 
HostDeviceVector< T > & operator= (const HostDeviceVector< T > &)=delete
 
HostDeviceVector< T > & operator= (HostDeviceVector< T > &&)
 
bool Empty () const
 
std::size_t Size () const
 
DeviceOrd Device () const
 
common::Span< T > DeviceSpan ()
 
common::Span< const T > ConstDeviceSpan () const
 
common::Span< const T > DeviceSpan () const
 
T * DevicePointer ()
 
const T * ConstDevicePointer () const
 
const T * DevicePointer () const
 
T * HostPointer ()
 
common::Span< T > HostSpan ()
 
common::Span< T const > HostSpan () const
 
common::Span< T const > ConstHostSpan () const
 
const T * ConstHostPointer () const
 
const T * HostPointer () const
 
void Fill (T v)
 
void Copy (const HostDeviceVector< T > &other)
 
void Copy (const std::vector< T > &other)
 
void Copy (std::initializer_list< T > other)
 
void Extend (const HostDeviceVector< T > &other)
 
std::vector< T > & HostVector ()
 
const std::vector< T > & ConstHostVector () const
 
const std::vector< T > & HostVector () const
 
bool HostCanRead () const
 
bool HostCanWrite () const
 
bool DeviceCanRead () const
 
bool DeviceCanWrite () const
 
GPUAccess DeviceAccess () const
 
void SetDevice (DeviceOrd device) const
 
void Resize (std::size_t new_size)
 
void Resize (std::size_t new_size, T v)
 如果新大小大于旧大小,则调整大小并初始化数据。更多...
 

成员类型定义文档

◆ value_type

template<typename T >
使用 xgboost::HostDeviceVector< T >::value_type = T

构造函数 & 析构函数文档

◆ HostDeviceVector() [1/5]

template<typename T >
xgboost::HostDeviceVector< T >::HostDeviceVector ( size_t  size = 0,
v = T(),
DeviceOrd  device = DeviceOrd::CPU() 
)
explicit

◆ HostDeviceVector() [2/5]

template<typename T >
xgboost::HostDeviceVector< T >::HostDeviceVector ( std::initializer_list< T >  init,
DeviceOrd  device = DeviceOrd::CPU() 
)

◆ HostDeviceVector() [3/5]

template<typename T >
xgboost::HostDeviceVector< T >::HostDeviceVector ( const std::vector< T > &  init,
DeviceOrd  device = DeviceOrd::CPU() 
)
explicit

◆ ~HostDeviceVector()

template<typename T >
xgboost::HostDeviceVector< T >::~HostDeviceVector ( )

◆ HostDeviceVector() [4/5]

template<typename T >
xgboost::HostDeviceVector< T >::HostDeviceVector ( const HostDeviceVector< T > &  )
delete

◆ HostDeviceVector() [5/5]

template<typename T >
xgboost::HostDeviceVector< T >::HostDeviceVector ( HostDeviceVector< T > &&  )

成员函数文档

◆ ConstDevicePointer()

template<typename T >
const T* xgboost::HostDeviceVector< T >::ConstDevicePointer ( ) const

◆ ConstDeviceSpan()

template<typename T >
common::Span<const T> xgboost::HostDeviceVector< T >::ConstDeviceSpan ( ) const

◆ ConstHostPointer()

template<typename T >
const T* xgboost::HostDeviceVector< T >::ConstHostPointer ( ) const
inline

◆ ConstHostSpan()

template<typename T >
common::Span<T const> xgboost::HostDeviceVector< T >::ConstHostSpan ( ) const
inline

◆ ConstHostVector()

template<typename T >
const std::vector<T>& xgboost::HostDeviceVector< T >::ConstHostVector ( ) const

◆ Copy() [1/3]

template<typename T >
void xgboost::HostDeviceVector< T >::Copy ( const HostDeviceVector< T > &  other)

◆ Copy() [2/3]

template<typename T >
void xgboost::HostDeviceVector< T >::Copy ( const std::vector< T > &  other)

◆ Copy() [3/3]

template<typename T >
void xgboost::HostDeviceVector< T >::Copy ( std::initializer_list< T >  other)

◆ Device()

template<typename T >
DeviceOrd xgboost::HostDeviceVector< T >::Device ( ) const

◆ DeviceAccess()

template<typename T >
GPUAccess xgboost::HostDeviceVector< T >::DeviceAccess ( ) const

◆ DeviceCanRead()

template<typename T >
bool xgboost::HostDeviceVector< T >::DeviceCanRead ( ) const

◆ DeviceCanWrite()

template<typename T >
bool xgboost::HostDeviceVector< T >::DeviceCanWrite ( ) const

◆ DevicePointer() [1/2]

template<typename T >
T* xgboost::HostDeviceVector< T >::DevicePointer ( )

◆ DevicePointer() [2/2]

template<typename T >
const T* xgboost::HostDeviceVector< T >::DevicePointer ( ) const
inline

◆ DeviceSpan() [1/2]

template<typename T >
common::Span<T> xgboost::HostDeviceVector< T >::DeviceSpan ( )

◆ DeviceSpan() [2/2]

template<typename T >
common::Span<const T> xgboost::HostDeviceVector< T >::DeviceSpan ( ) const
inline

◆ Empty()

template<typename T >
bool xgboost::HostDeviceVector< T >::Empty ( ) const
inline

◆ Extend()

template<typename T >
void xgboost::HostDeviceVector< T >::Extend ( const HostDeviceVector< T > &  other)

◆ Fill()

template<typename T >
void xgboost::HostDeviceVector< T >::Fill ( v)

◆ HostCanRead()

template<typename T >
bool xgboost::HostDeviceVector< T >::HostCanRead ( ) const

◆ HostCanWrite()

template<typename T >
bool xgboost::HostDeviceVector< T >::HostCanWrite ( ) const

◆ HostPointer() [1/2]

template<typename T >
T* xgboost::HostDeviceVector< T >::HostPointer ( )
inline

◆ HostPointer() [2/2]

template<typename T >
const T* xgboost::HostDeviceVector< T >::HostPointer ( ) const
inline

◆ HostSpan() [1/2]

template<typename T >
common::Span<T> xgboost::HostDeviceVector< T >::HostSpan ( )
inline

◆ HostSpan() [2/2]

template<typename T >
common::Span<T const> xgboost::HostDeviceVector< T >::HostSpan ( ) const
inline

◆ HostVector() [1/2]

template<typename T >
std::vector<T>& xgboost::HostDeviceVector< T >::HostVector ( )

◆ HostVector() [2/2]

template<typename T >
const std::vector<T>& xgboost::HostDeviceVector< T >::HostVector ( ) const
inline

◆ operator=() [1/2]

template<typename T >
HostDeviceVector<T>& xgboost::HostDeviceVector< T >::operator= ( const HostDeviceVector< T > &  )
delete

◆ operator=() [2/2]

template<typename T >
HostDeviceVector<T>& xgboost::HostDeviceVector< T >::operator= ( HostDeviceVector< T > &&  )

◆ Resize() [1/2]

template<typename T >
void xgboost::HostDeviceVector< T >::Resize ( std::size_t  new_size)

◆ Resize() [2/2]

template<typename T >
void xgboost::HostDeviceVector< T >::Resize ( std::size_t  new_size,
v 
)

如果新大小大于旧大小,则调整大小并初始化数据。

◆ SetDevice()

template<typename T >
void xgboost::HostDeviceVector< T >::SetDevice ( DeviceOrd  device) const

◆ Size()

template<typename T >
std::size_t xgboost::HostDeviceVector< T >::Size ( ) const

本类的文档由以下文件生成