xgboost
Public Member Functions | List of all members
xgboost::PredictionContainer Class Reference

A container for managed prediction caches. More...

#include <predictor.h>

Inheritance diagram for xgboost::PredictionContainer:
Inheritance graph
Collaboration diagram for xgboost::PredictionContainer:
Collaboration graph

Public Member Functions

 PredictionContainer ()
 
PredictionCacheEntryCache (std::shared_ptr< DMatrix > m, DeviceOrd device)
 
- Public Member Functions inherited from xgboost::DMatrixCache< PredictionCacheEntry >
 DMatrixCache (std::size_t cache_size)
 
DMatrixCacheoperator= (DMatrixCache &&that)
 
std::shared_ptr< PredictionCacheEntryCacheItem (std::shared_ptr< DMatrix > m, Args const &... args)
 Cache a new DMatrix if it's not in the cache already. More...
 
std::shared_ptr< PredictionCacheEntryResetItem (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< PredictionCacheEntryEntry (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_
 

Detailed Description

A container for managed prediction caches.

Constructor & Destructor Documentation

◆ PredictionContainer()

xgboost::PredictionContainer::PredictionContainer ( )
inline

Member Function Documentation

◆ Cache()

PredictionCacheEntry& xgboost::PredictionContainer::Cache ( std::shared_ptr< DMatrix m,
DeviceOrd  device 
)
inline

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