xgboost
|
A container for managed prediction caches. More...
#include <predictor.h>
Public Member Functions | |
PredictionContainer () | |
PredictionCacheEntry & | Cache (std::shared_ptr< DMatrix > m, DeviceOrd device) |
Public Member Functions inherited from xgboost::DMatrixCache< PredictionCacheEntry > | |
DMatrixCache (std::size_t cache_size) | |
DMatrixCache & | operator= (DMatrixCache &&that) |
std::shared_ptr< PredictionCacheEntry > | CacheItem (std::shared_ptr< DMatrix > m, Args const &... args) |
Cache a new DMatrix if it's not in the cache already. More... | |
std::shared_ptr< PredictionCacheEntry > | ResetItem (std::shared_ptr< DMatrix > m, Args const &... args) |
Re-initialize the item in cache. More... | |
decltype(container_) const & | Container () |
Get a const reference to the underlying hash map. Clear expired caches before returning. More... | |
std::shared_ptr< PredictionCacheEntry > | Entry (DMatrix const *m) const |
Additional Inherited Members | |
Static Public Member Functions inherited from xgboost::DMatrixCache< PredictionCacheEntry > | |
static constexpr std::size_t | DefaultSize () |
Protected Member Functions inherited from xgboost::DMatrixCache< PredictionCacheEntry > | |
void | CheckConsistent () const |
void | ClearExpired () |
void | ClearExcess () |
Protected Attributes inherited from xgboost::DMatrixCache< PredictionCacheEntry > | |
std::unordered_map< Key, Item, Hash > | container_ |
std::queue< Key > | queue_ |
std::size_t | max_size_ |
A container for managed prediction caches.
|
inline |
|
inline |