From dc7412c847795c12b8a8545c2b3d91216b3a09cf Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 21 Feb 2020 14:31:24 +0100 Subject: [PATCH] Fix mexvex_els_decode - Ouptut result is integer --- src/ExternLib/mexvex_els_decode/MexVexElsDecode.hh | 24 ++++++++++++------------ src/ExternLib/mexvex_els_decode/MexVexElsDecodeCreator.hh | 8 ++++---- src/InternLib/ProcessStandard.hh | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/ExternLib/mexvex_els_decode/MexVexElsDecode.hh b/src/ExternLib/mexvex_els_decode/MexVexElsDecode.hh index 1dbc941..bb65457 100644 --- a/src/ExternLib/mexvex_els_decode/MexVexElsDecode.hh +++ b/src/ExternLib/mexvex_els_decode/MexVexElsDecode.hh @@ -76,25 +76,25 @@ public: template void pushDataForMode1(Type& elt, int /*index*/) { - _paramOutput->getDataList().push_back((short)elt); + _paramOutput->getDataList().push_back((int)elt); } template void pushDataForMode0Or2(Type& elt) { - _paramOutput->getDataList().push_back((short)elt); + _paramOutput->getDataList().push_back((int)elt); } template void pushDataForMode1(std::vector& elt, int index) { typename std::vector::const_iterator first = elt.begin() + 32 * index; typename std::vector::const_iterator last = elt.begin() + 32 * (index + 1) - 1; - std::vector splitVec; + std::vector splitVec; splitVec.resize(128); splitVec << NotANumber(); int i = 0; for (typename std::vector::const_iterator it = first; it != last; ++it) { - splitVec[i] = (short)(*it); + splitVec[i] = (int)(*it); ++i; } @@ -103,13 +103,13 @@ public: template void pushDataForMode0Or2(std::vector& elt) { - std::vector vec; + std::vector vec; vec.resize(elt.size()); vec << NotANumber(); int i = 0; for (typename std::vector::const_iterator it = elt.begin(); it != elt.end(); ++it) { - vec[i] = (short)(*it); + vec[i] = (int)(*it); ++i; } _paramOutput->getDataList().push_back(vec); @@ -117,17 +117,17 @@ public: template void pushDataForMode1(Tab2DData& elt, int index) { - Tab2DData newElt(elt.getDim1Size(),31); + Tab2DData newElt(elt.getDim1Size(),31); for(int i = 0; i < elt.getDim1Size(); ++i) { std::vector eltVector = elt[i]; typename std::vector::const_iterator first = eltVector.begin() + 32 * index; typename std::vector::const_iterator last = eltVector.begin() + 32 * (index + 1) - 1; - std::vector splitVec; + std::vector splitVec; splitVec.resize(31); splitVec << NotANumber(); int j = 0; for (typename std::vector::const_iterator it = first; it != last; ++it) { - splitVec[j] = (short)(*it); + splitVec[j] = (int)(*it); ++j; } newElt[i] = splitVec; @@ -137,15 +137,15 @@ public: template void pushDataForMode0Or2(Tab2DData& elt) { - Tab2DData newElt(elt.getDim1Size(),elt.getDim2Size()); + Tab2DData newElt(elt.getDim1Size(),elt.getDim2Size()); for(int i = 0; i < elt.getDim1Size(); ++i) { std::vector eltVector = elt[i]; - std::vector vec; + std::vector vec; vec.resize(eltVector.size()); vec << NotANumber(); int j = 0; for (typename std::vector::const_iterator it = eltVector.begin(); it != eltVector.end(); ++it) { - vec[j] = (short)(*it); + vec[j] = (int)(*it); ++j; } newElt[i] = vec; diff --git a/src/ExternLib/mexvex_els_decode/MexVexElsDecodeCreator.hh b/src/ExternLib/mexvex_els_decode/MexVexElsDecodeCreator.hh index 74d653e..cc13d64 100644 --- a/src/ExternLib/mexvex_els_decode/MexVexElsDecodeCreator.hh +++ b/src/ExternLib/mexvex_els_decode/MexVexElsDecodeCreator.hh @@ -39,7 +39,7 @@ public: * @overload VisitorOfParamData::visit(ParamDataScalaireShort *) */ void visit(ParamDataScalaireShort *) - {_operation = new MexVexElsDecode::MexVexElsDecode( _process, dynamic_cast(_paramData), dynamic_cast(_energyTableInput));} + {_operation = new MexVexElsDecode::MexVexElsDecode( _process, dynamic_cast(_paramData), dynamic_cast(_energyTableInput));} /** * @overload VisitorOfParamData::visit(ParamDataScalaireFloat *) @@ -83,12 +83,12 @@ public: /** * @overload VisitorOfParamData::visit(ParamDataTab1DShort *) */ - void visit(ParamDataTab1DShort *){_operation = new MexVexElsDecode::MexVexElsDecode( _process, dynamic_cast(_paramData), dynamic_cast(_energyTableInput));} + void visit(ParamDataTab1DShort *){_operation = new MexVexElsDecode::MexVexElsDecode( _process, dynamic_cast(_paramData), dynamic_cast(_energyTableInput));} /** * @overload VisitorOfParamData::visit(ParamDataTab1DFloat *) */ - void visit(ParamDataTab1DFloat *) {_operation = new MexVexElsDecode::MexVexElsDecode( _process, dynamic_cast(_paramData), dynamic_cast(_energyTableInput));} + void visit(ParamDataTab1DFloat *) {_operation = new MexVexElsDecode::MexVexElsDecode( _process, dynamic_cast(_paramData), dynamic_cast(_energyTableInput));} /** * @overload VisitorOfParamData::visit(ParamDataTab1DDouble *) @@ -124,7 +124,7 @@ public: /** * @overload VisitorOfParamData::visit(ParamDataTab2DShort *) */ - void visit(ParamDataTab2DShort *){_operation = new MexVexElsDecode::MexVexElsDecode( _process, dynamic_cast(_paramData), dynamic_cast(_energyTableInput));} + void visit(ParamDataTab2DShort *){_operation = new MexVexElsDecode::MexVexElsDecode( _process, dynamic_cast(_paramData), dynamic_cast(_energyTableInput));} /** * @overload VisitorOfParamData::visit(ParamDataTab2DFloat *) diff --git a/src/InternLib/ProcessStandard.hh b/src/InternLib/ProcessStandard.hh index d355c14..42ceba5 100644 --- a/src/InternLib/ProcessStandard.hh +++ b/src/InternLib/ProcessStandard.hh @@ -25,7 +25,7 @@ #include "MultiParamProcess.hh" #include "Parser.hh" -#define PROCESS_STANDARD_COMPIL_VERSION 2 +#define PROCESS_STANDARD_COMPIL_VERSION 3 namespace AMDA { namespace Parameters { -- libgit2 0.21.2