1 #ifndef CPPAD_CG_LLVM_MODEL_LIBRARY_INCLUDED 2 #define CPPAD_CG_LLVM_MODEL_LIBRARY_INCLUDED 33 std::set<LlvmModel<Base>*> _models;
40 virtual std::unique_ptr<LlvmModel<Base>> modelLlvm(
const std::string& modelName) {
41 std::unique_ptr<LlvmModel<Base>> m;
42 typename std::set<std::string>::const_iterator it = this->_modelNames.find(modelName);
43 if (it == this->_modelNames.end()) {
47 _models.insert(m.get());
51 std::unique_ptr<FunctorGenericModel<Base>>
modelFunctor(
const std::string& modelName)
override final {
52 return std::unique_ptr<FunctorGenericModel<Base>>(modelLlvm(modelName).release());
58 inline void cleanUp() {
60 model->modelLibraryClosed();
63 if(this->_onClose !=
nullptr) {
65 this->_onClose =
nullptr;
std::unique_ptr< FunctorGenericModel< Base > > modelFunctor(const std::string &modelName) override final
std::unique_ptr< GenericModel< Base > > model(const std::string &modelName) override final