diff --git a/src/Bytecode.hh b/src/Bytecode.hh index 2c1e308308538d267618336180b0aa5f9a9c765a..f2d30ffc4f56906b7859d830a6257217abafd6aa 100644 --- a/src/Bytecode.hh +++ b/src/Bytecode.hh @@ -75,8 +75,7 @@ enum class Tag FSTPR, // Stores a residual from the stack FSTPG, // Stores the derivative of a simple (single-equation) block in simulate mode - FSTPG2, // Stores a derivative matrix for a static model from the stack - FSTPG3, // Stores a derivative matrix for a dynamic model from the stack + FSTPG2, // Stores the derivative matrix of a block in evaluate mode FUNARY, // A unary operator FBINARY, // A binary operator @@ -292,15 +291,6 @@ struct FSTPG2 final : public Instruction } }; -struct FSTPG3 final : public Instruction -{ - const int row, col, lag, col_pos; - FSTPG3(int row_arg, int col_arg, int lag_arg, int col_pos_arg) : - Instruction {Tag::FSTPG3}, row {row_arg}, col {col_arg}, lag {lag_arg}, col_pos {col_pos_arg} - { - } -}; - struct FUNARY final : public Instruction { const UnaryOpcode op_code; diff --git a/src/ModelTree.hh b/src/ModelTree.hh index 169d52a498c643b90bca98ab0a844d8b30e8872a..9edcb21eb4910edc01442d1767ba4e41797fa09b 100644 --- a/src/ModelTree.hh +++ b/src/ModelTree.hh @@ -1687,7 +1687,7 @@ ModelTree::writeBytecodeHelper(Bytecode::Writer& code_file) const { // Bytecode MEX uses a separate matrix for exogenous and exodet Jacobians int jacob_col {type == SymbolType::endogenous ? getJacobianCol(deriv_id, false) : tsid}; - code_file << Bytecode::FSTPG3 {eq, tsid, lag, jacob_col}; + code_file << Bytecode::FSTPG2 {eq, jacob_col}; } else code_file << Bytecode::FSTPG2 {eq, tsid}; @@ -1907,12 +1907,8 @@ ModelTree::writeBlockBytecodeHelper(Bytecode::Writer& code_file, int block, d->writeBytecodeOutput(code_file, output_type, temporary_terms_union, blocks_temporary_terms_idxs, tef_terms); assert(eq >= block_recursive); - if constexpr (dynamic) - code_file << Bytecode::FSTPG3 {eq - block_recursive, var, lag, - getBlockJacobianEndoCol(block, var, lag)}; - else - code_file << Bytecode::FSTPG2 {eq - block_recursive, - getBlockJacobianEndoCol(block, var, lag)}; + code_file << Bytecode::FSTPG2 {eq - block_recursive, + getBlockJacobianEndoCol(block, var, lag)}; } // Update jump offset for previous JMP