Commit dc7412c847795c12b8a8545c2b3d91216b3a09cf

Authored by Benjamin Renard
1 parent 818d2ea6

Fix mexvex_els_decode - Ouptut result is integer

src/ExternLib/mexvex_els_decode/MexVexElsDecode.hh
... ... @@ -76,25 +76,25 @@ public:
76 76  
77 77 template<typename Type>
78 78 void pushDataForMode1(Type& elt, int /*index*/) {
79   - _paramOutput->getDataList().push_back((short)elt);
  79 + _paramOutput->getDataList().push_back((int)elt);
80 80 }
81 81  
82 82 template<typename Type>
83 83 void pushDataForMode0Or2(Type& elt) {
84   - _paramOutput->getDataList().push_back((short)elt);
  84 + _paramOutput->getDataList().push_back((int)elt);
85 85 }
86 86  
87 87 template<typename Type>
88 88 void pushDataForMode1(std::vector<Type>& elt, int index) {
89 89 typename std::vector<Type>::const_iterator first = elt.begin() + 32 * index;
90 90 typename std::vector<Type>::const_iterator last = elt.begin() + 32 * (index + 1) - 1;
91   - std::vector<short> splitVec;
  91 + std::vector<int> splitVec;
92 92 splitVec.resize(128);
93 93 splitVec << NotANumber();
94 94  
95 95 int i = 0;
96 96 for (typename std::vector<Type>::const_iterator it = first; it != last; ++it) {
97   - splitVec[i] = (short)(*it);
  97 + splitVec[i] = (int)(*it);
98 98 ++i;
99 99 }
100 100  
... ... @@ -103,13 +103,13 @@ public:
103 103  
104 104 template<typename Type>
105 105 void pushDataForMode0Or2(std::vector<Type>& elt) {
106   - std::vector<short> vec;
  106 + std::vector<int> vec;
107 107 vec.resize(elt.size());
108 108 vec << NotANumber();
109 109  
110 110 int i = 0;
111 111 for (typename std::vector<Type>::const_iterator it = elt.begin(); it != elt.end(); ++it) {
112   - vec[i] = (short)(*it);
  112 + vec[i] = (int)(*it);
113 113 ++i;
114 114 }
115 115 _paramOutput->getDataList().push_back(vec);
... ... @@ -117,17 +117,17 @@ public:
117 117  
118 118 template<typename Type>
119 119 void pushDataForMode1(Tab2DData<Type>& elt, int index) {
120   - Tab2DData<Type> newElt(elt.getDim1Size(),31);
  120 + Tab2DData<int> newElt(elt.getDim1Size(),31);
121 121 for(int i = 0; i < elt.getDim1Size(); ++i) {
122 122 std::vector<Type> eltVector = elt[i];
123 123 typename std::vector<Type>::const_iterator first = eltVector.begin() + 32 * index;
124 124 typename std::vector<Type>::const_iterator last = eltVector.begin() + 32 * (index + 1) - 1;
125   - std::vector<short> splitVec;
  125 + std::vector<int> splitVec;
126 126 splitVec.resize(31);
127 127 splitVec << NotANumber();
128 128 int j = 0;
129 129 for (typename std::vector<Type>::const_iterator it = first; it != last; ++it) {
130   - splitVec[j] = (short)(*it);
  130 + splitVec[j] = (int)(*it);
131 131 ++j;
132 132 }
133 133 newElt[i] = splitVec;
... ... @@ -137,15 +137,15 @@ public:
137 137  
138 138 template<typename Type>
139 139 void pushDataForMode0Or2(Tab2DData<Type>& elt) {
140   - Tab2DData<Type> newElt(elt.getDim1Size(),elt.getDim2Size());
  140 + Tab2DData<int> newElt(elt.getDim1Size(),elt.getDim2Size());
141 141 for(int i = 0; i < elt.getDim1Size(); ++i) {
142 142 std::vector<Type> eltVector = elt[i];
143   - std::vector<short> vec;
  143 + std::vector<int> vec;
144 144 vec.resize(eltVector.size());
145 145 vec << NotANumber();
146 146 int j = 0;
147 147 for (typename std::vector<Type>::const_iterator it = eltVector.begin(); it != eltVector.end(); ++it) {
148   - vec[j] = (short)(*it);
  148 + vec[j] = (int)(*it);
149 149 ++j;
150 150 }
151 151 newElt[i] = vec;
... ...
src/ExternLib/mexvex_els_decode/MexVexElsDecodeCreator.hh
... ... @@ -39,7 +39,7 @@ public:
39 39 * @overload VisitorOfParamData::visit(ParamDataScalaireShort *)
40 40 */
41 41 void visit(ParamDataScalaireShort *)
42   - {_operation = new MexVexElsDecode::MexVexElsDecode<ParamDataScalaireShort, ParamDataScalaireShort>( _process, dynamic_cast<ParamDataScalaireShort &>(_paramData), dynamic_cast<ParamDataScalaireShort &>(_energyTableInput));}
  42 + {_operation = new MexVexElsDecode::MexVexElsDecode<ParamDataScalaireShort, ParamDataScalaireInt>( _process, dynamic_cast<ParamDataScalaireShort &>(_paramData), dynamic_cast<ParamDataScalaireShort &>(_energyTableInput));}
43 43  
44 44 /**
45 45 * @overload VisitorOfParamData::visit(ParamDataScalaireFloat *)
... ... @@ -83,12 +83,12 @@ public:
83 83 /**
84 84 * @overload VisitorOfParamData::visit(ParamDataTab1DShort *)
85 85 */
86   - void visit(ParamDataTab1DShort *){_operation = new MexVexElsDecode::MexVexElsDecode<ParamDataTab1DShort, ParamDataTab1DShort>( _process, dynamic_cast<ParamDataTab1DShort &>(_paramData), dynamic_cast<ParamDataScalaireShort &>(_energyTableInput));}
  86 + void visit(ParamDataTab1DShort *){_operation = new MexVexElsDecode::MexVexElsDecode<ParamDataTab1DShort, ParamDataTab1DInt>( _process, dynamic_cast<ParamDataTab1DShort &>(_paramData), dynamic_cast<ParamDataScalaireShort &>(_energyTableInput));}
87 87  
88 88 /**
89 89 * @overload VisitorOfParamData::visit(ParamDataTab1DFloat *)
90 90 */
91   - void visit(ParamDataTab1DFloat *) {_operation = new MexVexElsDecode::MexVexElsDecode<ParamDataTab1DFloat, ParamDataTab1DShort>( _process, dynamic_cast<ParamDataTab1DFloat &>(_paramData), dynamic_cast<ParamDataScalaireShort &>(_energyTableInput));}
  91 + void visit(ParamDataTab1DFloat *) {_operation = new MexVexElsDecode::MexVexElsDecode<ParamDataTab1DFloat, ParamDataTab1DInt>( _process, dynamic_cast<ParamDataTab1DFloat &>(_paramData), dynamic_cast<ParamDataScalaireShort &>(_energyTableInput));}
92 92  
93 93 /**
94 94 * @overload VisitorOfParamData::visit(ParamDataTab1DDouble *)
... ... @@ -124,7 +124,7 @@ public:
124 124 /**
125 125 * @overload VisitorOfParamData::visit(ParamDataTab2DShort *)
126 126 */
127   - void visit(ParamDataTab2DShort *){_operation = new MexVexElsDecode::MexVexElsDecode<ParamDataTab2DShort, ParamDataTab2DShort>( _process, dynamic_cast<ParamDataTab2DShort &>(_paramData), dynamic_cast<ParamDataScalaireShort &>(_energyTableInput));}
  127 + void visit(ParamDataTab2DShort *){_operation = new MexVexElsDecode::MexVexElsDecode<ParamDataTab2DShort, ParamDataTab2DInt>( _process, dynamic_cast<ParamDataTab2DShort &>(_paramData), dynamic_cast<ParamDataScalaireShort &>(_energyTableInput));}
128 128  
129 129 /**
130 130 * @overload VisitorOfParamData::visit(ParamDataTab2DFloat *)
... ...
src/InternLib/ProcessStandard.hh
... ... @@ -25,7 +25,7 @@
25 25 #include "MultiParamProcess.hh"
26 26 #include "Parser.hh"
27 27  
28   -#define PROCESS_STANDARD_COMPIL_VERSION 2
  28 +#define PROCESS_STANDARD_COMPIL_VERSION 3
29 29  
30 30 namespace AMDA {
31 31 namespace Parameters {
... ...