12 template <
typename ModelType>
17 ::std::vector<ModelType *> _model_ptrs;
23 ModelPool(::std::string path,
size_t n_models = 20);
37 void push(ModelType *model);
40 #include "CNum/Model/ModelPool.tpp"
Coarse-grained locking concurrent queue.
Definition ConcurrentQueue.h:23
ModelPool(const ModelPool &)=delete
ModelType * pull()
Pull a model from the pool.
Definition ModelPool.h:22
~ModelPool()
Destructor.
Definition ModelPool.h:16
ModelPool(::std::string path, size_t n_models=20)
Overloaded default constructor.
Definition ModelPool.h:3
ModelPool & operator=(const ModelPool &)=delete
void push(ModelType *model)
Push a model to the pool model A raw pointer to a trained model pulled from the pool.
Definition ModelPool.h:29
The namespace containing the ML models in CNum.