xgboost

Public Types | Public Member Functions | List of all members
xgboost::HostDeviceVector< T > Class Template Reference

`#include <host_device_vector.h>`

Collaboration diagram for xgboost::HostDeviceVector< T >:

## Public Types
using | value_type = T

## Public Member Functions
| HostDeviceVector (size_t size=0, T v=T(), int device=-1)
| HostDeviceVector (std::initializer_list< T > init, int device=-1)
| HostDeviceVector (const std::vector< T > &init, int device=-1)
| ~HostDeviceVector ()
| HostDeviceVector (const HostDeviceVector< T > &)=delete
| HostDeviceVector (HostDeviceVector< T > &&)
HostDeviceVector< T > & | operator= (const HostDeviceVector< T > &)=delete
HostDeviceVector< T > & | operator= (HostDeviceVector< T > &&)
bool | Empty () const
size_t | Size () const
int | DeviceIdx () 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 (int device) const
void | Resize (size_t new_size, T v=T())

## Member Typedef Documentation

## ◆ value_type

template<typename T>

using xgboost::HostDeviceVector< T >::value_type = T

## Constructor & Destructor Documentation

## ◆ HostDeviceVector() [1/5]

template<typename T>

xgboost::HostDeviceVector< T >::HostDeviceVector | ( | size_t | size = `0`,
|  | T | v = `T()`,
|  | int | device = `-1`
| ) |  |
| explicit

## ◆ HostDeviceVector() [2/5]

template<typename T>

xgboost::HostDeviceVector< T >::HostDeviceVector | ( | std::initializer_list< T > | init,
|  | int | device = `-1`
| ) |  |

## ◆ HostDeviceVector() [3/5]

template<typename T>

xgboost::HostDeviceVector< T >::HostDeviceVector | ( | const std::vector< T > & | init,
|  | int | device = `-1`
| ) |  |
| 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 > && |  | ) |

## Member Function Documentation

## ◆ 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 | ) |

## ◆ 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

## ◆ DeviceIdx()

template<typename T>

int xgboost::HostDeviceVector< T >::DeviceIdx | ( |  | ) | 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 | ( | T | 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()

template<typename T>

void xgboost::HostDeviceVector< T >::Resize | ( | size_t | new_size,
|  | T | v = `T()`
| ) |  |

## ◆ SetDevice()

template<typename T>

void xgboost::HostDeviceVector< T >::SetDevice | ( | int | device | ) | const

## ◆ Size()

template<typename T>

size_t xgboost::HostDeviceVector< T >::Size | ( |  | ) | const

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

- /workspace/include/xgboost/host_device_vector.h