Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
xgboost::common::MemStackAllocator< T, MaxStackSize > Class Template Reference

A C-style array with in-stack allocation. As long as the array is smaller than MaxStackSize, it will be allocated inside the stack. Otherwise, it will be heap-allocated. More...

#include <threading_utils.h>

Public Member Functions

 MemStackAllocator (size_t required_size)
 
 MemStackAllocator (size_t required_size, T init)
 
T & operator[] (size_t i)
 
T const & operator[] (size_t i) const
 
auto data () const
 
auto data ()
 
std::size_t size () const
 
auto cbegin () const
 
auto cend () const
 

Detailed Description

template<typename T, std::size_t MaxStackSize>
class xgboost::common::MemStackAllocator< T, MaxStackSize >

A C-style array with in-stack allocation. As long as the array is smaller than MaxStackSize, it will be allocated inside the stack. Otherwise, it will be heap-allocated.


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