Commit bacbd603 authored by sebastien's avatar sebastien
Browse files

trunk preprocessor:

* removed obsolete output type CDynamicSparseDLL
* probably fixed a bug in BlockTriangular::Reduce_Blocks_and_type_determination


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2652 ac1d8469-bf42-47a9-8791-bf33cf982152
parent e9f59ebd
......@@ -558,7 +558,7 @@ BlockTriangular::Reduce_Blocks_and_type_determination(int prologue, int epilogue
else
{
tmp_output.str("");
rhs->writeOutput(tmp_output, oCDynamicModelSparseDLL, temporary_terms);
rhs->writeOutput(tmp_output, oMatlabDynamicModelSparse, temporary_terms);
if (tmp_output.str()==tmp_s.str())
{
if (Simulation_Type==SOLVE_BACKWARD_SIMPLE)
......
......@@ -53,11 +53,11 @@ DynamicModel::AddVariable(const string &name, int lag)
}
void
DynamicModel::compileDerivative(ofstream &code_file, int eq, int symb_id, int lag, ExprNodeOutputType output_type, map_idx_type &map_idx) const
DynamicModel::compileDerivative(ofstream &code_file, int eq, int symb_id, int lag, map_idx_type &map_idx) const
{
first_derivatives_type::const_iterator it = first_derivatives.find(make_pair(eq, getDerivID(symb_id, lag)));
if (it != first_derivatives.end())
(it->second)->compile(code_file,false, output_type, temporary_terms, map_idx);
(it->second)->compile(code_file, false, temporary_terms, map_idx);
else
code_file.write(&FLDZ, sizeof(FLDZ));
}
......@@ -684,7 +684,7 @@ DynamicModel::writeModelEquationsOrdered_M( Model_Block *ModelBlock, const strin
}
void
DynamicModel::writeModelEquationsCodeOrdered(const string file_name, const Model_Block *ModelBlock, const string bin_basename, ExprNodeOutputType output_type, map_idx_type map_idx) const
DynamicModel::writeModelEquationsCodeOrdered(const string file_name, const Model_Block *ModelBlock, const string bin_basename, map_idx_type map_idx) const
{
struct Uff_l
{
......@@ -817,7 +817,7 @@ DynamicModel::writeModelEquationsCodeOrdered(const string file_name, const Model
for (temporary_terms_type::const_iterator it = ModelBlock->Block_List[j].Temporary_Terms_in_Equation[i]->begin();
it != ModelBlock->Block_List[j].Temporary_Terms_in_Equation[i]->end(); it++)
{
(*it)->compile(code_file,false, output_type, tt2, map_idx);
(*it)->compile(code_file, false, tt2, map_idx);
code_file.write(&FSTPT, sizeof(FSTPT));
map_idx_type::const_iterator ii=map_idx.find((*it)->idx);
v=(int)ii->second;
......@@ -850,13 +850,13 @@ DynamicModel::writeModelEquationsCodeOrdered(const string file_name, const Model
{
case EVALUATE_BACKWARD:
case EVALUATE_FORWARD:
rhs->compile(code_file,false, output_type, temporary_terms, map_idx);
lhs->compile(code_file,true, output_type, temporary_terms, map_idx);
rhs->compile(code_file, false, temporary_terms, map_idx);
lhs->compile(code_file, true, temporary_terms, map_idx);
break;
case EVALUATE_BACKWARD_R:
case EVALUATE_FORWARD_R:
lhs->compile(code_file,false, output_type, temporary_terms, map_idx);
rhs->compile(code_file,true, output_type, temporary_terms, map_idx);
lhs->compile(code_file, false, temporary_terms, map_idx);
rhs->compile(code_file, true, temporary_terms, map_idx);
break;
case SOLVE_BACKWARD_COMPLETE:
case SOLVE_FORWARD_COMPLETE:
......@@ -872,8 +872,8 @@ DynamicModel::writeModelEquationsCodeOrdered(const string file_name, const Model
goto end;
default:
end:
lhs->compile(code_file,false, output_type, temporary_terms, map_idx);
rhs->compile(code_file,false, output_type, temporary_terms, map_idx);
lhs->compile(code_file, false, temporary_terms, map_idx);
rhs->compile(code_file, false, temporary_terms, map_idx);
code_file.write(&FBINARY, sizeof(FBINARY));
int v=oMinus;
code_file.write(reinterpret_cast<char *>(&v),sizeof(v));
......@@ -896,7 +896,7 @@ DynamicModel::writeModelEquationsCodeOrdered(const string file_name, const Model
{
case SOLVE_BACKWARD_SIMPLE:
case SOLVE_FORWARD_SIMPLE:
compileDerivative(code_file, ModelBlock->Block_List[j].Equation[0], ModelBlock->Block_List[j].Variable[0], 0, output_type, map_idx);
compileDerivative(code_file, ModelBlock->Block_List[j].Equation[0], ModelBlock->Block_List[j].Variable[0], 0, map_idx);
code_file.write(&FSTPG, sizeof(FSTPG));
v=0;
code_file.write(reinterpret_cast<char *>(&v), sizeof(v));
......@@ -924,7 +924,7 @@ DynamicModel::writeModelEquationsCodeOrdered(const string file_name, const Model
Uf[v].Ufl->pNext=NULL;
Uf[v].Ufl->u=u;
Uf[v].Ufl->var=var;
compileDerivative(code_file, eq, var, 0, output_type, map_idx);
compileDerivative(code_file, eq, var, 0, map_idx);
code_file.write(&FSTPU, sizeof(FSTPU));
code_file.write(reinterpret_cast<char *>(&u), sizeof(u));
}
......@@ -989,7 +989,7 @@ DynamicModel::writeModelEquationsCodeOrdered(const string file_name, const Model
Uf[v].Ufl->u=u;
Uf[v].Ufl->var=var;
Uf[v].Ufl->lag=k;
compileDerivative(code_file, eq, var, k, output_type, map_idx);
compileDerivative(code_file, eq, var, k, map_idx);
code_file.write(&FSTPU, sizeof(FSTPU));
code_file.write(reinterpret_cast<char *>(&u), sizeof(u));
#ifdef CONDITION
......@@ -2243,7 +2243,7 @@ DynamicModel::writeDynamicFile(const string &basename) const
#else
mkdir(basename.c_str(), 0777);
#endif
writeModelEquationsCodeOrdered(basename + "_dynamic", block_triangular.ModelBlock, basename, oCDynamicModelSparseDLL, map_idx);
writeModelEquationsCodeOrdered(basename + "_dynamic", block_triangular.ModelBlock, basename, map_idx);
block_triangular.Free_Block(block_triangular.ModelBlock);
block_triangular.incidencematrix.Free_IM();
//block_triangular.Free_IM_X(block_triangular.First_IM_X);
......
......@@ -79,7 +79,7 @@ private:
//! Writes the Block reordred structure of the model in M output
void writeModelEquationsOrdered_M(Model_Block *ModelBlock, const string &dynamic_basename) const;
//! Writes the code of the Block reordred structure of the model in virtual machine bytecode
void writeModelEquationsCodeOrdered(const string file_name, const Model_Block *ModelBlock, const string bin_basename, ExprNodeOutputType output_type, map_idx_type map_idx) const;
void writeModelEquationsCodeOrdered(const string file_name, const Model_Block *ModelBlock, const string bin_basename, map_idx_type map_idx) const;
//! Computes jacobian and prepares for equation normalization
/*! Using values from initval/endval blocks and parameter initializations:
- computes the jacobian for the model w.r. to contemporaneous variables
......@@ -94,7 +94,7 @@ private:
void computeTemporaryTermsOrdered(Model_Block *ModelBlock);
//! Write derivative code of an equation w.r. to a variable
void compileDerivative(ofstream &code_file, int eq, int symb_id, int lag, ExprNodeOutputType output_type, map_idx_type &map_idx) const;
void compileDerivative(ofstream &code_file, int eq, int symb_id, int lag, map_idx_type &map_idx) const;
virtual int computeDerivID(int symb_id, int lag);
//! Get the type corresponding to a derivation ID
......
......@@ -131,9 +131,7 @@ NumConstNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
{
temporary_terms_type::const_iterator it = temporary_terms.find(const_cast<NumConstNode *>(this));
if (it != temporary_terms.end())
if (output_type == oCDynamicModelSparseDLL)
output << "T" << idx << "[it_]";
else if (output_type == oMatlabDynamicModelSparse)
if (output_type == oMatlabDynamicModelSparse)
output << "T" << idx << "(it_)";
else
output << "T" << idx;
......@@ -148,11 +146,10 @@ NumConstNode::eval(const eval_context_type &eval_context) const throw (EvalExcep
}
void
NumConstNode::compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
NumConstNode::compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
{
CompileCode.write(&FLDC, sizeof(FLDC));
double vard=atof(datatree.num_constants.get(id).c_str());
//double vard=id;
double vard = datatree.num_constants.getDouble(id);
#ifdef DEBUGC
cout << "FLDC " << vard << "\n";
#endif
......@@ -259,9 +256,7 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
temporary_terms_type::const_iterator it = temporary_terms.find(const_cast<VariableNode *>(this));
if (it != temporary_terms.end())
{
if (output_type == oCDynamicModelSparseDLL)
output << "T" << idx << "[it_]";
else if (output_type == oMatlabDynamicModelSparse)
if (output_type == oMatlabDynamicModelSparse)
output << "T" << idx << "(it_)";
else
output << "T" << idx;
......@@ -305,14 +300,6 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
i = tsid + OFFSET(output_type);
output << "y" << LPAR(output_type) << i << RPAR(output_type);
break;
case oCDynamicModelSparseDLL:
if (lag > 0)
output << "y" << LPAR(output_type) << "(it_+" << lag << ")*y_size+" << tsid << RPAR(output_type);
else if (lag < 0)
output << "y" << LPAR(output_type) << "(it_" << lag << ")*y_size+" << tsid << RPAR(output_type);
else
output << "y" << LPAR(output_type) << "Per_y_+" << tsid << RPAR(output_type);
break;
case oMatlabDynamicModelSparse:
i = tsid + OFFSET(output_type);
if (lag > 0)
......@@ -342,7 +329,6 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
output << "x(it_, " << i << ")";
break;
case oCDynamicModel:
case oCDynamicModelSparseDLL:
if (lag == 0)
output << "x[it_+" << i << "*nb_row_x]";
else if (lag > 0)
......@@ -376,7 +362,6 @@ VariableNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
output << "x(it_, " << i << ")";
break;
case oCDynamicModel:
case oCDynamicModelSparseDLL:
if (lag == 0)
output << "x[it_+" << i << "*nb_row_xd]";
else if (lag > 0)
......@@ -413,7 +398,7 @@ VariableNode::eval(const eval_context_type &eval_context) const throw (EvalExcep
}
void
VariableNode::compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
VariableNode::compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
{
int i, lagl;
#ifdef DEBUGC
......@@ -429,33 +414,33 @@ VariableNode::compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType ou
switch(type)
{
case eParameter:
i = tsid + OFFSET(output_type);
i = tsid;
CompileCode.write(reinterpret_cast<char *>(&i), sizeof(i));
#ifdef DEBUGC
cout << "FLD Param[ " << i << ", symb_id=" << symb_id << "]\n";
#endif
break;
case eEndogenous :
i = symb_id + OFFSET(output_type);
i = symb_id;
CompileCode.write(reinterpret_cast<char *>(&i), sizeof(i));
lagl=lag;
CompileCode.write(reinterpret_cast<char *>(&lagl), sizeof(lagl));
break;
case eExogenous :
i = tsid + OFFSET(output_type);
i = tsid;
CompileCode.write(reinterpret_cast<char *>(&i), sizeof(i));
lagl=lag;
CompileCode.write(reinterpret_cast<char *>(&lagl), sizeof(lagl));
break;
case eExogenousDet:
i = tsid + datatree.symbol_table.exo_nbr() + OFFSET(output_type);
i = tsid + datatree.symbol_table.exo_nbr();
CompileCode.write(reinterpret_cast<char *>(&i), sizeof(i));
lagl=lag;
CompileCode.write(reinterpret_cast<char *>(&lagl), sizeof(lagl));
break;
case eModelLocalVariable:
case eModFileLocalVariable:
datatree.local_variables_table[symb_id]->compile(CompileCode, lhs_rhs, output_type, temporary_terms, map_idx);
datatree.local_variables_table[symb_id]->compile(CompileCode, lhs_rhs, temporary_terms, map_idx);
break;
case eUnknownFunction:
cerr << "Impossible case: eUnknownFuncion" << endl;
......@@ -735,9 +720,7 @@ UnaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
temporary_terms_type::const_iterator it = temporary_terms.find(const_cast<UnaryOpNode *>(this));
if (it != temporary_terms.end())
{
if (output_type == oCDynamicModelSparseDLL)
output << "T" << idx << "[it_]";
else if (output_type == oMatlabDynamicModelSparse)
if (output_type == oMatlabDynamicModelSparse)
output << "T" << idx << "(it_)";
else
output << "T" << idx;
......@@ -881,7 +864,7 @@ UnaryOpNode::eval(const eval_context_type &eval_context) const throw (EvalExcept
}
void
UnaryOpNode::compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
UnaryOpNode::compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
{
temporary_terms_type::const_iterator it = temporary_terms.find(const_cast<UnaryOpNode *>(this));
if (it != temporary_terms.end())
......@@ -891,7 +874,7 @@ UnaryOpNode::compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType out
CompileCode.write(reinterpret_cast<char *>(&var), sizeof(var));
return;
}
arg->compile(CompileCode, lhs_rhs, output_type, temporary_terms, map_idx);
arg->compile(CompileCode, lhs_rhs, temporary_terms, map_idx);
CompileCode.write(&FUNARY, sizeof(FUNARY));
UnaryOpcode op_codel=op_code;
CompileCode.write(reinterpret_cast<char *>(&op_codel), sizeof(op_codel));
......@@ -1258,7 +1241,7 @@ BinaryOpNode::eval(const eval_context_type &eval_context) const throw (EvalExcep
}
void
BinaryOpNode::compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
BinaryOpNode::compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
{
// If current node is a temporary term
temporary_terms_type::const_iterator it = temporary_terms.find(const_cast<BinaryOpNode *>(this));
......@@ -1269,8 +1252,8 @@ BinaryOpNode::compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType ou
CompileCode.write(reinterpret_cast<char *>(&var), sizeof(var));
return;
}
arg1->compile(CompileCode, lhs_rhs, output_type, temporary_terms, map_idx);
arg2->compile(CompileCode, lhs_rhs, output_type, temporary_terms, map_idx);
arg1->compile(CompileCode, lhs_rhs, temporary_terms, map_idx);
arg2->compile(CompileCode, lhs_rhs, temporary_terms, map_idx);
CompileCode.write(&FBINARY, sizeof(FBINARY));
BinaryOpcode op_codel=op_code;
CompileCode.write(reinterpret_cast<char *>(&op_codel),sizeof(op_codel));
......@@ -1298,9 +1281,7 @@ BinaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
temporary_terms_type::const_iterator it = temporary_terms.find(const_cast<BinaryOpNode *>(this));
if (it != temporary_terms.end())
{
if (output_type == oCDynamicModelSparseDLL)
output << "T" << idx << "[it_]";
else if (output_type == oMatlabDynamicModelSparse)
if (output_type == oMatlabDynamicModelSparse)
output << "T" << idx << "(it_)";
else
output << "T" << idx;
......@@ -1678,8 +1659,7 @@ TrinaryOpNode::eval(const eval_context_type &eval_context) const throw (EvalExce
}
void
TrinaryOpNode::compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type,
const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
TrinaryOpNode::compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
{
// If current node is a temporary term
temporary_terms_type::const_iterator it = temporary_terms.find(const_cast<TrinaryOpNode *>(this));
......@@ -1690,9 +1670,9 @@ TrinaryOpNode::compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType o
CompileCode.write(reinterpret_cast<char *>(&var), sizeof(var));
return;
}
arg1->compile(CompileCode, lhs_rhs, output_type, temporary_terms, map_idx);
arg2->compile(CompileCode, lhs_rhs, output_type, temporary_terms, map_idx);
arg3->compile(CompileCode, lhs_rhs, output_type, temporary_terms, map_idx);
arg1->compile(CompileCode, lhs_rhs, temporary_terms, map_idx);
arg2->compile(CompileCode, lhs_rhs, temporary_terms, map_idx);
arg3->compile(CompileCode, lhs_rhs, temporary_terms, map_idx);
CompileCode.write(&FBINARY, sizeof(FBINARY));
TrinaryOpcode op_codel=op_code;
CompileCode.write(reinterpret_cast<char *>(&op_codel),sizeof(op_codel));
......@@ -1724,10 +1704,7 @@ TrinaryOpNode::writeOutput(ostream &output, ExprNodeOutputType output_type,
temporary_terms_type::const_iterator it = temporary_terms.find(const_cast<TrinaryOpNode *>(this));
if (it != temporary_terms.end())
{
if (output_type != oCDynamicModelSparseDLL)
output << "T" << idx;
else
output << "T" << idx << "[it_]";
output << "T" << idx;
return;
}
......@@ -1866,7 +1843,7 @@ UnknownFunctionNode::eval(const eval_context_type &eval_context) const throw (Ev
}
void
UnknownFunctionNode::compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
UnknownFunctionNode::compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const
{
cerr << "UnknownFunctionNode::compile: operation impossible!" << endl;
exit(EXIT_FAILURE);
......
......@@ -52,10 +52,9 @@ enum ExprNodeOutputType
oMatlabStaticModel, //!< Matlab code, static model declarations
oMatlabDynamicModel, //!< Matlab code, dynamic model declarations
oMatlabStaticModelSparse, //!< Matlab code, static block decomposed mode declaration
oMatlabDynamicModelSparse, //!< Matlab code, dynamic block decomposed mode declaration
oMatlabDynamicModelSparse,//!< Matlab code, dynamic block decomposed mode declaration
oCStaticModel, //!< C code, static model declarations
oCDynamicModel, //!< C code, dynamic model declarations
oCDynamicModelSparseDLL, //!< C code, dynamic model declarations in SparseDLL module
oMatlabOutsideModel //!< Matlab code, outside model block (for example in initval)
};
......@@ -80,7 +79,7 @@ typedef map<int, double> eval_context_type;
// Computing cost above which a node can be declared a temporary term
#define MIN_COST_MATLAB (40*90)
#define MIN_COST_C (40*4)
#define MIN_COST(is_matlab) (is_matlab ? MIN_COST_MATLAB : MIN_COST_C)
#define MIN_COST(is_matlab) ((is_matlab) ? MIN_COST_MATLAB : MIN_COST_C)
//! Base class for expression nodes
class ExprNode
......@@ -167,7 +166,7 @@ public:
};
virtual double eval(const eval_context_type &eval_context) const throw (EvalException) = 0;
virtual void compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const = 0;
virtual void compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const = 0;
//! Creates a static version of this node
/*!
This method duplicates the current node by creating a similar node from which all leads/lags have been stripped,
......@@ -200,7 +199,7 @@ public:
virtual void collectExogenous(set<pair<int, int> > &result) const;
virtual void collectTemporary_terms(const temporary_terms_type &temporary_terms, Model_Block *ModelBlock, int Curr_Block) const;
virtual double eval(const eval_context_type &eval_context) const throw (EvalException);
virtual void compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
virtual void compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
virtual NodeID toStatic(DataTree &static_datatree) const;
};
......@@ -229,7 +228,7 @@ public:
map_idx_type &map_idx) const;
virtual void collectTemporary_terms(const temporary_terms_type &temporary_terms, Model_Block *ModelBlock, int Curr_Block) const;
virtual double eval(const eval_context_type &eval_context) const throw (EvalException);
virtual void compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
virtual void compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
virtual NodeID toStatic(DataTree &static_datatree) const;
int get_symb_id() const { return symb_id; };
};
......@@ -259,7 +258,7 @@ public:
virtual void collectTemporary_terms(const temporary_terms_type &temporary_terms, Model_Block *ModelBlock, int Curr_Block) const;
static double eval_opcode(UnaryOpcode op_code, double v) throw (EvalException);
virtual double eval(const eval_context_type &eval_context) const throw (EvalException);
virtual void compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
virtual void compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
//! Returns operand
NodeID get_arg() const { return(arg); };
//! Returns op code
......@@ -293,7 +292,7 @@ public:
virtual void collectTemporary_terms(const temporary_terms_type &temporary_terms, Model_Block *ModelBlock, int Curr_Block) const;
static double eval_opcode(double v1, BinaryOpcode op_code, double v2) throw (EvalException);
virtual double eval(const eval_context_type &eval_context) const throw (EvalException);
virtual void compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
virtual void compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
//! Returns first operand
NodeID get_arg1() const { return(arg1); };
//! Returns second operand
......@@ -330,7 +329,7 @@ public:
virtual void collectTemporary_terms(const temporary_terms_type &temporary_terms, Model_Block *ModelBlock, int Curr_Block) const;
static double eval_opcode(double v1, TrinaryOpcode op_code, double v2, double v3) throw (EvalException);
virtual double eval(const eval_context_type &eval_context) const throw (EvalException);
virtual void compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
virtual void compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
virtual NodeID toStatic(DataTree &static_datatree) const;
};
......@@ -357,7 +356,7 @@ public:
virtual void collectExogenous(set<pair<int, int> > &result) const;
virtual void collectTemporary_terms(const temporary_terms_type &temporary_terms, Model_Block *ModelBlock, int Curr_Block) const;
virtual double eval(const eval_context_type &eval_context) const throw (EvalException);
virtual void compile(ofstream &CompileCode, bool lhs_rhs, ExprNodeOutputType output_type, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
virtual void compile(ofstream &CompileCode, bool lhs_rhs, const temporary_terms_type &temporary_terms, map_idx_type &map_idx) const;
virtual NodeID toStatic(DataTree &static_datatree) const;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment