CppADCodeGen  2.3.0
A C++ Algorithmic Differentiation Package with Source Code Generation
model_library.hpp
1 #ifndef CPPAD_CG_MODEL_LIBRARY_INCLUDED
2 #define CPPAD_CG_MODEL_LIBRARY_INCLUDED
3 /* --------------------------------------------------------------------------
4  * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5  * Copyright (C) 2013 Ciengis
6  *
7  * CppADCodeGen is distributed under multiple licenses:
8  *
9  * - Eclipse Public License Version 1.0 (EPL1), and
10  * - GNU General Public License Version 3 (GPL3).
11  *
12  * EPL1 terms and conditions can be found in the file "epl-v10.txt", while
13  * terms and conditions for the GPL3 can be found in the file "gpl3.txt".
14  * ----------------------------------------------------------------------------
15  * Author: Joao Leal
16  */
17 
18 namespace CppAD {
19 namespace cg {
20 
26 template<class Base>
27 class ModelLibrary {
28 public:
34  virtual std::set<std::string> getModelNames() = 0;
35 
44  virtual std::unique_ptr<GenericModel<Base>> model(const std::string& modelName) = 0;
45 
53  virtual void setThreadPoolDisabled(bool disabled) = 0;
54 
60  virtual bool isThreadPoolDisabled() const = 0;
61 
70  virtual unsigned int getThreadNumber() const = 0;
71 
81  virtual void setThreadNumber(unsigned int n) = 0;
82 
91  virtual ThreadPoolScheduleStrategy getThreadPoolSchedulerStrategy() const = 0;
92 
102  virtual void setThreadPoolSchedulerStrategy(ThreadPoolScheduleStrategy s) = 0;
103 
104  virtual void setThreadPoolVerbose(bool v) = 0;
105 
106  virtual bool isThreadPoolVerbose() const = 0;
107 
108  virtual void setThreadPoolGuidedMaxWork(float v) = 0;
109 
110  virtual float getThreadPoolGuidedMaxWork() const = 0;
111 
122  virtual void setThreadPoolNumberOfTimeMeas(unsigned int n) = 0;
123 
124 
135  virtual unsigned int getThreadPoolNumberOfTimeMeas() const = 0;
136 
137  inline virtual ~ModelLibrary() {
138  }
139 
140 };
141 
142 } // END cg namespace
143 } // END CppAD namespace
144 
145 #endif
virtual bool isThreadPoolDisabled() const =0
virtual std::set< std::string > getModelNames()=0
virtual ThreadPoolScheduleStrategy getThreadPoolSchedulerStrategy() const =0
virtual void setThreadPoolSchedulerStrategy(ThreadPoolScheduleStrategy s)=0
virtual std::unique_ptr< GenericModel< Base > > model(const std::string &modelName)=0
virtual void setThreadNumber(unsigned int n)=0
virtual unsigned int getThreadPoolNumberOfTimeMeas() const =0
virtual void setThreadPoolDisabled(bool disabled)=0
virtual void setThreadPoolNumberOfTimeMeas(unsigned int n)=0
virtual unsigned int getThreadNumber() const =0