From 6b109491ee11c94a4eb54025bb326c1cd0ac7f47 Mon Sep 17 00:00:00 2001 From: Yori Zwols Date: Wed, 9 Aug 2023 21:48:51 +0300 Subject: [PATCH] Remove OX_PARALLEL hack to avoid earlier oxdoc shortcomings --- include/Outcomes.h | 4 +-- source/DDP/Bellman.ox | 6 +---- source/DDP/DP.ox | 54 ++++++++++--------------------------- source/DDP/Outcomes.ox | 12 ++------- source/DDP/Predictions.ox | 12 ++------- source/DDP/StateVariable.ox | 12 ++------- source/FiveO/Objective.ox | 30 ++++----------------- source/FiveO/Parameters.ox | 6 +---- source/Shared/oxcgi.ox | 2 +- 9 files changed, 29 insertions(+), 109 deletions(-) diff --git a/include/Outcomes.h b/include/Outcomes.h index 7405693b..ed0da01d 100644 --- a/include/Outcomes.h +++ b/include/Outcomes.h @@ -16,9 +16,7 @@ struct Outcome : Data { static decl /** . @internal **/ AnyMissing -#ifdef OX_PARALLEL - = < [DSubSpaces] *0> //Oxdoc does not recognize this syntax so ifdef hides it -#endif + = < [DSubSpaces] *0> , /** . @internal **/ Rust_Eq_4_15, /** . @internal **/ pathpred, diff --git a/source/DDP/Bellman.ox b/source/DDP/Bellman.ox index d03fc7a0..205f22fa 100644 --- a/source/DDP/Bellman.ox +++ b/source/DDP/Bellman.ox @@ -748,11 +748,7 @@ ExPostSmoothing::SetSmoothing(Method,smparam) { to add any state variables to the model. **/ -OneStateModel::Initialize(UorB,Method,... - #ifdef OX_PARALLEL - args - #endif - ) { +OneStateModel::Initialize(UorB,Method,...args) { if (isfunction(UorB)) { U = UorB; ExPostSmoothing::Initialize(new OneStateModel()); diff --git a/source/DDP/DP.ox b/source/DDP/DP.ox index 2515389a..afc00819 100644 --- a/source/DDP/DP.ox +++ b/source/DDP/DP.ox @@ -286,38 +286,28 @@ DP::AddStates(SubV,va) { /** Add `StateVariable`s to the endogenous vector $\theta$. @param ... `StateVariable`s to add to $\theta$ **/ -DP::EndogenousStates(... - #ifdef OX_PARALLEL - vs - #endif - ) { AddStates(endog,vs); } +DP::EndogenousStates(...vs) { + AddStates(endog,vs); +} /** Add `StateVariable`s to the exogenous vector $\epsilon$. @param ... Exogenous `StateVariable`s to add $\epsilon$ **/ -DP::ExogenousStates(... - #ifdef OX_PARALLEL - vs - #endif -) { AddStates(exog,vs); } +DP::ExogenousStates(...vs) { + AddStates(exog,vs); +} /** Add `StateVariable`s to the semiexogenous vector $\eta$. @param ... Semi-exogenous `StateVariable`s to add to $\eta$ **/ -DP::SemiExogenousStates(... - #ifdef OX_PARALLEL - vs - #endif -) { AddStates(semiexog,vs); } +DP::SemiExogenousStates(...vs) { + AddStates(semiexog,vs); +} /** Add `TimeInvariant`s to the group vector $\gamma$. @param ... `TimeInvariant`s to add to $\gamma$ **/ -DP::GroupVariables(... - #ifdef OX_PARALLEL - va - #endif -) { +DP::GroupVariables(...va) { decl cv,ccv; foreach(cv in va) { if (isarray(cv)){ @@ -351,11 +341,7 @@ Actions(work = new ActionVariable("w",2)); @comments If no action variables are added to MyModel then a no-choice action is added by `DP::CreateSpaces`(). **/ -DP::Actions(... - #ifdef OX_PARALLEL - va - #endif -) { +DP::Actions(...va) { decl a, i, j, nr, pos=S[acts].D, sL; for(i=0;iMyModel can also create a derived `Clock` and pass it to SetClock. **/ -DP::SetClock(ClockOrType,... - #ifdef OX_PARALLEL - va - #endif -) { +DP::SetClock(ClockOrType,...va) { if (isclass(counter)) oxrunerror("DDP Error 46. Clock/counter state block already initialized"); if (isclass(ClockOrType,"Clock")) { counter = ClockOrType; @@ -2142,11 +2120,7 @@ DPDebug::Initialize() { } /** . @internal **/ -DPDebug::outSVTrans(... - #ifdef OX_PARALLEL - va - #endif -) { +DPDebug::outSVTrans(...va) { decl rp = new SVT(va); rp -> Traverse(); delete rp; diff --git a/source/DDP/Outcomes.ox b/source/DDP/Outcomes.ox index f7ae78fb..d757e5a1 100644 --- a/source/DDP/Outcomes.ox +++ b/source/DDP/Outcomes.ox @@ -908,11 +908,7 @@ OutcomeDataSet::MatchToColumn(aORs,LorC) { ignored.
@param ... continues with object2, LoC2, object3, LorC3, etc.
**/ -OutcomeDataSet::ObservedWithLabel(... - #ifdef OX_PARALLEL - va - #endif -) { +OutcomeDataSet::ObservedWithLabel(...va) { decl offset,aORs,LorC,k,bv; if (!Version::MPIserver && Data::Volume>SILENT && isfile(Data::logf) ) fprint(Data::logf,"\nAdded to the observed list: "); foreach (aORs in va) { @@ -942,11 +938,7 @@ OutcomeDataSet::ObservedWithLabel(... @comments Does nothing unless variable was already sent to `OutcomeDataSet::ObservedWithLabel`(); **/ -OutcomeDataSet::UnObserved(... - #ifdef OX_PARALLEL - va - #endif -) { +OutcomeDataSet::UnObserved(...va) { decl offset,aORs,k; for (k=0;kNotInData tag will be sent. @param ... objects or array of objects to track **/ -PredictionDataSet::TrackingWithLabel(InDataOrNot,... - #ifdef OX_PARALLEL - args - #endif -) { +PredictionDataSet::TrackingWithLabel(InDataOrNot,...args) { decl v, pparg = InDataOrNot ? UseLabel : NotInData; PanelPrediction::Tracking(pparg,args); } diff --git a/source/DDP/StateVariable.ox b/source/DDP/StateVariable.ox index 4012e47b..b9fda91d 100644 --- a/source/DDP/StateVariable.ox +++ b/source/DDP/StateVariable.ox @@ -1316,11 +1316,7 @@ Coevolving::Transit() { @param L label for block @param ... list of `Coevolving` states to add to the block. **/ -StateBlock::StateBlock(L,... - #ifdef OX_PARALLEL - va - #endif - ) { +StateBlock::StateBlock(L,...va) { this.L = L; N= 0; Theta={}; @@ -1336,11 +1332,7 @@ StateBlock::StateBlock(L,... @param ... list of `Coevolving` state variables to add to the block. The default `StateBlock::Actual` matrix is built up from the actual vectors of variables added to the block. **/ -StateBlock::AddToBlock(... - #ifdef OX_PARALLEL - news - #endif - ) { +StateBlock::AddToBlock(...news) { decl i,k,nd,newrow, s, oldallv; //news = {news}|va_arglist(); foreach(s in news[i]) { //for (i=0;idata.FN, the total number of paths in the panel **/ -DataObjective::DataObjective (L,data,... - #ifdef OX_PARALLEL - va - #endif - ) { +DataObjective::DataObjective (L,data,...va) { if ( ismember(data,"FN")!=2 || ismember(data,"EconometricObjective")!=1 ) oxrunerror("data must have a FN member and a EconometricObjective method, like Panel and PanelPrediction classes"); BlackBox(L); @@ -1430,11 +1418,7 @@ Separable::Separable(L,Kvar) { @param ... `Parameter`(s) and/or arrays of Parameters to add to the objective @comment On any call to vfunc() common parameters will have the same value for each k. **/ -Separable::Common(... - #ifdef OX_PARALLEL - va - #endif - ) { +Separable::Common(...va) { decl cs = sizeof(Psi),m; Objective::Parameters(va); for (m=cs;m D arguments, then each must be a `ParameterBlock` of size K and
Lambda[d] = va[d] for d = 0, … D‾
**/ -Mixture::Mixture(L,Dvar,Kvar,MixType,... - #ifdef OX_PARALLEL - va - #endif -) { +Mixture::Mixture(L,Dvar,Kvar,MixType,...va) { decl k,d, ll; oxwarning("MIXTURE NOT WORKING YET. WAIT UNTIL NEXT VERSION"); if (isclass(Dvar,"Discrete")) this.Dvar = Dvar; diff --git a/source/FiveO/Parameters.ox b/source/FiveO/Parameters.ox index 7b4010b8..4182c7df 100644 --- a/source/FiveO/Parameters.ox +++ b/source/FiveO/Parameters.ox @@ -251,11 +251,7 @@ ParameterBlock::ParameterBlock(L, ...) { @param psi `Parameter` to add. @param ... more parameters **/ -ParameterBlock::AddToBlock(... - #ifdef OX_PARALLEL - va - #endif - ) { +ParameterBlock::AddToBlock(...va) { decl b; if (pos!=UnInitialized) oxrunerror("FiveO Error 21a. Cannot add to a Block after it has been added to the Objective\n"); foreach (b in va) { diff --git a/source/Shared/oxcgi.ox b/source/Shared/oxcgi.ox index e27c9f46..76587a7d 100644 --- a/source/Shared/oxcgi.ox +++ b/source/Shared/oxcgi.ox @@ -2,6 +2,6 @@ main() { CGI::Initialize(); - println(CGI:GetVar("Query_String")); + println(CGI::GetVar("Query_String")); CGI::Finalize(); }