local_state_space_iteration_2 MEX: enable parallelization by default

pac-components
Sébastien Villemot 2021-10-20 15:33:04 +02:00
parent fbba0bf2fc
commit e66a1a63f8
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ options_.huge_number = 1e7;
% Default number of threads for parallelized mex files.
options_.threads.kronecker.sparse_hessian_times_B_kronecker_C = num_procs;
options_.threads.local_state_space_iteration_2 = 1;
options_.threads.local_state_space_iteration_2 = num_procs;
options_.threads.local_state_space_iteration_k = 1;
options_.threads.perfect_foresight_problem = num_procs;
options_.threads.k_order_perturbation = max(1, num_procs/2);

View File

@ -44,7 +44,7 @@ rf_ghxx = dr.ghxx(dr.restrict_var_list, :);
rf_ghuu = dr.ghuu(dr.restrict_var_list, :);
rf_ghxu = dr.ghxu(dr.restrict_var_list, :);
tStart1 = tic; for i=1:10000, ynext1 = local_state_space_iteration_2(yhat, epsilon, rf_ghx, rf_ghu, rf_constant, rf_ghxx, rf_ghuu, rf_ghxu, 1); end, tElapsed1 = toc(tStart1);
tStart1 = tic; for i=1:10000, ynext1 = local_state_space_iteration_2(yhat, epsilon, rf_ghx, rf_ghu, rf_constant, rf_ghxx, rf_ghuu, rf_ghxu, options_.threads.local_state_space_iteration_2); end, tElapsed1 = toc(tStart1);
tStart2 = tic; for i=1:10000, ynext2 = local_state_space_iteration_k(yhat, epsilon, dr, M_, options_); end, tElapsed2 = toc(tStart2);