Changeset 1601 for XIOS/dev/dev_trunk_omp/src/node/scalar.cpp
- Timestamp:
- 11/19/18 15:52:54 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/src/node/scalar.cpp
r1314 r1601 27 27 { /* Ne rien faire de plus */ } 28 28 29 std::map<StdString, ETranformationType> CScalar::transformationMapList_ = std::map<StdString, ETranformationType>(); 30 bool CScalar::dummyTransformationMapList_ = CScalar::initializeTransformationMap(CScalar::transformationMapList_); 29 30 std::map<StdString, ETranformationType> *CScalar::transformationMapList_ptr = 0; 31 31 32 bool CScalar::initializeTransformationMap(std::map<StdString, ETranformationType>& m) 32 33 { … … 35 36 m["reduce_domain"] = TRANS_REDUCE_DOMAIN_TO_SCALAR; 36 37 m["reduce_scalar"] = TRANS_REDUCE_SCALAR_TO_SCALAR; 38 } 39 40 bool CScalar::initializeTransformationMap() 41 { 42 CScalar::transformationMapList_ptr = new std::map<StdString, ETranformationType>(); 43 (*CScalar::transformationMapList_ptr)["reduce_axis"] = TRANS_REDUCE_AXIS_TO_SCALAR; 44 (*CScalar::transformationMapList_ptr)["extract_axis"] = TRANS_EXTRACT_AXIS_TO_SCALAR; 45 (*CScalar::transformationMapList_ptr)["reduce_domain"] = TRANS_REDUCE_DOMAIN_TO_SCALAR; 46 (*CScalar::transformationMapList_ptr)["reduce_scalar"] = TRANS_REDUCE_SCALAR_TO_SCALAR; 37 47 } 38 48 … … 165 175 166 176 nodeElementName = node.getElementName(); 167 std::map<StdString, ETranformationType>::const_iterator ite = transformationMapList_.end(), it; 168 it = transformationMapList_.find(nodeElementName); 177 if(CScalar::transformationMapList_ptr == 0) initializeTransformationMap(); 178 std::map<StdString, ETranformationType>::const_iterator ite = transformationMapList_ptr->end(), it; 179 it = transformationMapList_ptr->find(nodeElementName); 169 180 if (ite != it) 170 181 {
Note: See TracChangeset
for help on using the changeset viewer.