Sébastien Villemot
093a547684
Bytecode: simplify Interpreter::compute_complete()
2023-10-20 09:38:03 -04:00
Sébastien Villemot
0bfcc6d2f5
Bytecode: simplify Interpreter::Init_UMFPACK_Sparse_Simple()
2023-10-19 17:34:06 -04:00
Sébastien Villemot
860285b8b8
Bytecode: simplify Interpreter::Init_Matlab_Sparse_Simple()
2023-10-19 17:34:05 -04:00
Sébastien Villemot
233d0815a6
Bytecode: simplify Interpreter::Init_UMFPACK_Sparse()
2023-10-19 17:33:24 -04:00
Sébastien Villemot
dc6a84196a
Bytecode: simplify Interpreter::Init_Matlab_Sparse()
2023-10-19 17:01:51 -04:00
Sébastien Villemot
88a0f67585
Bytecode: simplify Interpreter::Init_GE()
2023-10-19 16:58:14 -04:00
Sébastien Villemot
24fc3854e2
Bytecode: simplify Interpreter::Singular_display()
2023-10-19 16:55:51 -04:00
Sébastien Villemot
115a0a8e5d
Bytecode: simplify Interpreter::Read_SparseMatrix()
2023-10-19 16:52:48 -04:00
Sébastien Villemot
e5bf3f79b3
Bytecode: simplify Interpreter::fixe_u()
2023-10-19 16:48:00 -04:00
Sébastien Villemot
197347c870
Bytecode: merge two methods
2023-10-19 16:43:40 -04:00
Sébastien Villemot
e104318e6b
Bytecode: simplify Interpreter::Simulate_Newton_Two_Boundaries()
2023-10-19 16:38:51 -04:00
Sébastien Villemot
68cee02eb5
Bytecode: simplify Interpreter::check_for_controlled_exo_validity()
2023-10-19 16:33:54 -04:00
Sébastien Villemot
fdb3cd0623
Bytecode: simplify Interpreter::compute_complete()
2023-10-19 16:31:50 -04:00
Sébastien Villemot
8e74322325
Bytecode: rename a method for clarity
2023-10-19 15:58:33 -04:00
Sébastien Villemot
af1985d569
Bytecode: mark function as static
2023-10-19 15:56:55 -04:00
Sébastien Villemot
fd16bbe493
Bytecode: simplify Interpreter::initializeTemporaryTerms()
2023-10-19 15:56:39 -04:00
Sébastien Villemot
6809819961
Bytecode: simplify Interpreter::compute_complete_2b()
2023-10-19 15:47:10 -04:00
Sébastien Villemot
bbcbcd1eed
Bytecode: improve interface of methods for looking through Jacobian sparse matrix
2023-10-19 14:50:07 -04:00
Sébastien Villemot
b747eff473
Bytecode: remove unused method
2023-10-19 14:19:01 -04:00
Sébastien Villemot
846ed7e829
Bytecode: merge class dynSparseMatrix into Interpreter
...
These two classes were so entangled that their separation was meaningless.
2023-10-19 13:56:10 -04:00
Sébastien Villemot
654b4e57a2
Bytecode: remove several unused class members of SparseMatrix
2023-10-19 10:59:23 -04:00
Sébastien Villemot
06ac452459
Cosmetics: remove empty list of parameters for lambda functions
2023-10-19 09:56:55 -04:00
Sébastien Villemot
d78dea3086
Use __builtin_unreachable() to silent some GCC warnings
...
This is cleaner than using exit() for that purpose.
2023-10-18 14:28:54 -04:00
Sébastien Villemot
9a0462a8a6
Bytecode: remove a couple of useless casts
2023-10-16 18:06:42 -04:00
Sébastien Villemot
06a7acf19b
Bytecode: enforce consistent typing of size variables
2023-10-16 18:00:11 -04:00
Sébastien Villemot
651fed87be
Bytecode: remove warnings about narrowing (-Wnarrowing)
2023-10-16 17:58:36 -04:00
Sébastien Villemot
b0fa610357
Bytecode: remove warnings about uninitialized variables (-Wmaybe-uninitialized)
...
By the way, in the dynamic case, ensure that solve_algo variable corresponds to
options_.solve_algo; it would previously correspond to
options_.stack_solve_algo, while there is already a separate stack_solve_algo
variable for that purpose.
2023-10-16 17:43:20 -04:00
Sébastien Villemot
eae9902cb8
Bytecode: restrict scope of some variables
2023-10-16 15:39:13 -04:00
Sébastien Villemot
e4a4d2d8e6
Bytecode MEX: get M_ and options_ through input arguments rather than as global variables
2023-10-11 18:50:32 -04:00
Sébastien Villemot
8cc646fbf6
Bytecode MEX: remove syntax where no MATLAB array is passed
...
Those arrays were then read via oo_ and options_.
As a consequence, this commit drops the dependency of bytecode MEX upon the oo_
global variable.
2023-10-10 17:44:14 -04:00
Sébastien Villemot
dcdbd85b10
Bytecode: fix indentation in output of print_bytecode_{static,dynamic}_model commands
2023-10-10 17:41:38 -04:00
Sébastien Villemot
9525dbe3a8
Bytecode: do not restrict print_bytecode_{static,dynamic}_model to certain values of {stack_,}solve_algo
2023-10-10 17:32:33 -04:00
Sébastien Villemot
c329b4ff11
Bytecode: fix bug in print_bytecode_{static,dynamic}_model commands
...
The FENDEQU tag was not properly handled when printing.
2023-10-10 17:31:48 -04:00
Sébastien Villemot
d584317a6a
Bytecode: remove unused methods
2023-10-10 16:54:09 -04:00
Sébastien Villemot
5e7b7ec7b0
Bytecode MEX: remove support for unused “plan” and “pfplan” arguments
2023-10-10 14:49:15 -04:00
Sébastien Villemot
bd9943a695
Bytecode: fix memory leak in Evaluate class
...
The newly-created FBEGINBLOCK_ and FCALL_ instances were freed using a
base-class pointer. But the latter does not have a virtual destructor.
Those class instances are now stored by value in containers, so that the
destructor of the derived class is used.
2023-09-01 14:52:57 +02:00
Sébastien Villemot
d6ea315a18
Bytecode: further improve some informative messages
2023-06-15 15:37:45 +02:00
Sébastien Villemot
192f136b96
Bytecode: improve some informative messages
2023-06-13 16:59:08 +02:00
Sébastien Villemot
277c5d4c4f
Bytecode: display real iteration time instead of CPU time
2023-06-13 16:59:08 +02:00
Sébastien Villemot
7c9e261355
Bytecode: fix treatment of maxit option
...
It would do one extra iteration.
2023-06-13 16:59:08 +02:00
Sébastien Villemot
dcf56b89cd
Bytecode: rework message verbosity
...
Now uses options_.verbosity to decide what to print:
– if options_.verbosity == 0, prints nothing
– if options_.verbosity >= 1, prints iteration counter and duration, and fatal errors
– if options_.verbosity >= 2, additionally print floating point exceptions and
details about algorithmic decisions
2023-06-13 16:59:07 +02:00
Sébastien Villemot
73b1850cb5
Bytecode: remove unused function
2023-06-13 16:58:06 +02:00
Sébastien Villemot
08d378c244
Bytecode: in evaluate+dynamic mode, return residuals with as many columns as periods
...
Previously it would also include initial and terminal conditions (i.e.
residuals would have periods+maximum_lag+maximum_lead columns). But we do not
care about residuals at the initial and terminal conditions.
This change is for consistency with the perfect_foresight_problem MEX.
2023-06-12 19:18:44 +02:00
Sébastien Villemot
90d790f1c3
Bytecode: fix error message
2023-06-12 19:18:44 +02:00
Sébastien Villemot
d814a4090b
Bytecode: improve display of residuals error during iterations
2023-06-12 15:12:00 +02:00
Sébastien Villemot
e86aeaf787
C++20 modernization: use new standard mathematical constants
2023-05-25 19:07:23 +02:00
Sébastien Villemot
030316f2d8
Bytecode: misc simplifications
2023-04-18 22:25:58 +02:00
Sébastien Villemot
afe147d88d
Bytecode: the class dynSparseMatrix is no longer derived from Evaluate
2023-04-18 18:10:45 +02:00
Sébastien Villemot
e22972849b
Bytecode: make Evaluate::{symbol_table, steady_state} private and const
2023-04-18 17:46:48 +02:00
Sébastien Villemot
4313640f80
Bytecode: allow better compiler optimization of the main evaluation function
...
Use the __restrict__ GCC extension on double* pointers, to avoid aliasing.
NB: the C “restrict” keyword does not exist in C++.
2023-04-18 17:45:15 +02:00