Ignore:
Timestamp:
11/19/18 15:52:54 (5 years ago)
Author:
yushan
Message:

branch_openmp merged with trunk r1597

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_omp/src/node/scalar.cpp

    r1314 r1601  
    2727   { /* Ne rien faire de plus */ } 
    2828 
    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 
    3132   bool CScalar::initializeTransformationMap(std::map<StdString, ETranformationType>& m) 
    3233   { 
     
    3536     m["reduce_domain"] = TRANS_REDUCE_DOMAIN_TO_SCALAR; 
    3637     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; 
    3747   } 
    3848 
     
    165175 
    166176        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); 
    169180        if (ite != it) 
    170181        { 
Note: See TracChangeset for help on using the changeset viewer.