Ignore:
Timestamp:
06/18/18 20:32:55 (6 years ago)
Author:
yushan
Message:

branch_openmp merged with trunk r1544

Location:
XIOS/dev/branch_openmp/src/parse_expr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/parse_expr/filter_expr_node.cpp

    r1038 r1545  
    1111  { /* Nothing to do */ } 
    1212 
    13   boost::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    14   { 
    15     boost::shared_ptr<COutputPin> outputPin; 
     13  std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     14  { 
     15    std::shared_ptr<COutputPin> outputPin; 
    1616 
    1717    if (fieldId == "this") 
     
    2121      CField* field = CField::get(fieldId); 
    2222      if (field == &thisField) 
    23         ERROR("boost::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     23        ERROR("std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    2424              << "The field " << fieldId << " has an invalid reference to itself. " 
    2525              << "Use the keyword \"this\" if you want to reference the input data sent to this field."); 
     
    2929    } 
    3030    else 
    31       ERROR("boost::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     31      ERROR("std::shared_ptr<COutputPin> CFilterFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    3232            << "The field " << fieldId << " does not exist."); 
    3333 
     
    3939  { /* Nothing to do */ } 
    4040 
    41   boost::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    42   { 
    43     boost::shared_ptr<COutputPin> outputPin; 
     41  std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     42  { 
     43    std::shared_ptr<COutputPin> outputPin; 
    4444 
    4545    if (fieldId == "this") 
     
    4949      CField* field = CField::get(fieldId); 
    5050      if (field == &thisField) 
    51         ERROR("boost::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     51        ERROR("std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    5252              << "The field " << fieldId << " has an invalid reference to itself. " 
    5353              << "Use the keyword \"this\" if you want to reference the input data sent to this field."); 
     
    5757    } 
    5858    else 
    59       ERROR("boost::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
     59      ERROR("std::shared_ptr<COutputPin> CFilterTemporalFieldExprNode::reduce(CGarbageCollector& gc, CField& thisField) const", 
    6060            << "The field " << fieldId << " does not exist."); 
    6161 
     
    7272  } 
    7373 
    74   boost::shared_ptr<COutputPin> CFilterUnaryOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    75   { 
    76     boost::shared_ptr<CUnaryArithmeticFilter> filter(new CUnaryArithmeticFilter(gc, opId)); 
     74  std::shared_ptr<COutputPin> CFilterUnaryOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     75  { 
     76    std::shared_ptr<CUnaryArithmeticFilter> filter(new CUnaryArithmeticFilter(gc, opId)); 
    7777    child->reduce(gc, thisField)->connectOutput(filter, 0); 
    7878    return filter; 
     
    8989  } 
    9090 
    91   boost::shared_ptr<COutputPin> CFilterScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    92   { 
    93     boost::shared_ptr<CScalarFieldArithmeticFilter> filter(new CScalarFieldArithmeticFilter(gc, opId, child1->reduce())); 
     91  std::shared_ptr<COutputPin> CFilterScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     92  { 
     93    std::shared_ptr<CScalarFieldArithmeticFilter> filter(new CScalarFieldArithmeticFilter(gc, opId, child1->reduce())); 
    9494    child2->reduce(gc, thisField)->connectOutput(filter, 0); 
    9595    return filter; 
     
    106106  } 
    107107 
    108   boost::shared_ptr<COutputPin> CFilterFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    109   { 
    110     boost::shared_ptr<CFieldScalarArithmeticFilter> filter(new CFieldScalarArithmeticFilter(gc, opId, child2->reduce())); 
     108  std::shared_ptr<COutputPin> CFilterFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     109  { 
     110    std::shared_ptr<CFieldScalarArithmeticFilter> filter(new CFieldScalarArithmeticFilter(gc, opId, child2->reduce())); 
    111111    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    112112    return filter; 
     
    123123  } 
    124124 
    125   boost::shared_ptr<COutputPin> CFilterFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    126   { 
    127     boost::shared_ptr<CFieldFieldArithmeticFilter> filter(new CFieldFieldArithmeticFilter(gc, opId)); 
     125  std::shared_ptr<COutputPin> CFilterFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     126  { 
     127    std::shared_ptr<CFieldFieldArithmeticFilter> filter(new CFieldFieldArithmeticFilter(gc, opId)); 
    128128    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    129129    child2->reduce(gc, thisField)->connectOutput(filter, 1); 
     
    145145  } 
    146146 
    147   boost::shared_ptr<COutputPin> CFilterScalarScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    148   { 
    149     boost::shared_ptr<CScalarScalarFieldArithmeticFilter> filter(new CScalarScalarFieldArithmeticFilter(gc, opId, child1->reduce(),child2->reduce())); 
     147  std::shared_ptr<COutputPin> CFilterScalarScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     148  { 
     149    std::shared_ptr<CScalarScalarFieldArithmeticFilter> filter(new CScalarScalarFieldArithmeticFilter(gc, opId, child1->reduce(),child2->reduce())); 
    150150    child3->reduce(gc, thisField)->connectOutput(filter, 0); 
    151151    return filter; 
     
    164164  } 
    165165 
    166   boost::shared_ptr<COutputPin> CFilterScalarFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    167   { 
    168     boost::shared_ptr<CScalarFieldScalarArithmeticFilter> filter(new CScalarFieldScalarArithmeticFilter(gc, opId, child1->reduce(),child3->reduce())); 
     166  std::shared_ptr<COutputPin> CFilterScalarFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     167  { 
     168    std::shared_ptr<CScalarFieldScalarArithmeticFilter> filter(new CScalarFieldScalarArithmeticFilter(gc, opId, child1->reduce(),child3->reduce())); 
    169169    child2->reduce(gc, thisField)->connectOutput(filter, 0); 
    170170    return filter; 
     
    183183  } 
    184184 
    185   boost::shared_ptr<COutputPin> CFilterScalarFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    186   { 
    187     boost::shared_ptr<CScalarFieldFieldArithmeticFilter> filter(new CScalarFieldFieldArithmeticFilter(gc, opId, child1->reduce())); 
     185  std::shared_ptr<COutputPin> CFilterScalarFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     186  { 
     187    std::shared_ptr<CScalarFieldFieldArithmeticFilter> filter(new CScalarFieldFieldArithmeticFilter(gc, opId, child1->reduce())); 
    188188    child2->reduce(gc, thisField)->connectOutput(filter, 0); 
    189189    child3->reduce(gc, thisField)->connectOutput(filter, 1); 
     
    204204  } 
    205205 
    206   boost::shared_ptr<COutputPin> CFilterFieldScalarScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    207   { 
    208     boost::shared_ptr<CFieldScalarScalarArithmeticFilter> filter(new CFieldScalarScalarArithmeticFilter(gc, opId, child2->reduce(),child3->reduce())); 
     206  std::shared_ptr<COutputPin> CFilterFieldScalarScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     207  { 
     208    std::shared_ptr<CFieldScalarScalarArithmeticFilter> filter(new CFieldScalarScalarArithmeticFilter(gc, opId, child2->reduce(),child3->reduce())); 
    209209    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    210210    return filter; 
     
    224224  } 
    225225 
    226   boost::shared_ptr<COutputPin> CFilterFieldScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    227   { 
    228     boost::shared_ptr<CFieldScalarFieldArithmeticFilter> filter(new CFieldScalarFieldArithmeticFilter(gc, opId, child2->reduce())); 
     226  std::shared_ptr<COutputPin> CFilterFieldScalarFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     227  { 
     228    std::shared_ptr<CFieldScalarFieldArithmeticFilter> filter(new CFieldScalarFieldArithmeticFilter(gc, opId, child2->reduce())); 
    229229    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    230230    child3->reduce(gc, thisField)->connectOutput(filter, 1); 
     
    245245  } 
    246246 
    247   boost::shared_ptr<COutputPin> CFilterFieldFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    248   { 
    249     boost::shared_ptr<CFieldFieldScalarArithmeticFilter> filter(new CFieldFieldScalarArithmeticFilter(gc, opId, child3->reduce())); 
     247  std::shared_ptr<COutputPin> CFilterFieldFieldScalarOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     248  { 
     249    std::shared_ptr<CFieldFieldScalarArithmeticFilter> filter(new CFieldFieldScalarArithmeticFilter(gc, opId, child3->reduce())); 
    250250    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    251251    child2->reduce(gc, thisField)->connectOutput(filter, 1); 
     
    265265  } 
    266266 
    267   boost::shared_ptr<COutputPin> CFilterFieldFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
    268   { 
    269     boost::shared_ptr<CFieldFieldFieldArithmeticFilter> filter(new CFieldFieldFieldArithmeticFilter(gc, opId)); 
     267  std::shared_ptr<COutputPin> CFilterFieldFieldFieldOpExprNode::reduce(CGarbageCollector& gc, CField& thisField) const 
     268  { 
     269    std::shared_ptr<CFieldFieldFieldArithmeticFilter> filter(new CFieldFieldFieldArithmeticFilter(gc, opId)); 
    270270    child1->reduce(gc, thisField)->connectOutput(filter, 0); 
    271271    child2->reduce(gc, thisField)->connectOutput(filter, 1); 
  • XIOS/dev/branch_openmp/src/parse_expr/filter_expr_node.hpp

    r1038 r1545  
    33 
    44#include <string> 
    5 #include <boost/shared_ptr.hpp> 
    65#include <boost/smart_ptr/scoped_ptr.hpp> 
    76#include "scalar_expr_node.hpp" 
     
    2625     * \return the output pin of the filter producing the result of the expression  
    2726     */ 
    28     virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const = 0; 
     27    virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const = 0; 
    2928  }; 
    3029 
     
    4342      CFilterFieldExprNode(const std::string& fieldId); 
    4443 
    45       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     44      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    4645 
    4746    private: 
     
    6463      CFilterTemporalFieldExprNode(const std::string& fieldId); 
    6564 
    66       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     65      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    6766 
    6867    private: 
     
    8786      CFilterUnaryOpExprNode(const std::string& opId, IFilterExprNode* child); 
    8887 
    89       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     88      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    9089 
    9190    private: 
     
    112111      CFilterScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2); 
    113112 
    114       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     113      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    115114 
    116115    private: 
     
    138137      CFilterFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2); 
    139138 
    140       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     139      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    141140 
    142141    private: 
     
    163162      CFilterFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2); 
    164163 
    165       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     164      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    166165 
    167166    private: 
     
    191190      CFilterScalarScalarFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3); 
    192191 
    193       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     192      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    194193 
    195194    private: 
     
    220219      CFilterScalarFieldScalarOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3); 
    221220 
    222       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     221      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    223222 
    224223    private: 
     
    249248      CFilterScalarFieldFieldOpExprNode(IScalarExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3); 
    250249 
    251       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     250      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    252251 
    253252    private: 
     
    279278      CFilterFieldScalarScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IScalarExprNode* child3); 
    280279 
    281       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     280      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    282281 
    283282    private: 
     
    308307      CFilterFieldScalarFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IScalarExprNode* child2, IFilterExprNode* child3); 
    309308 
    310       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     309      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    311310 
    312311    private: 
     
    336335      CFilterFieldFieldScalarOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IScalarExprNode* child3); 
    337336 
    338       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     337      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    339338 
    340339    private: 
     
    365364      CFilterFieldFieldFieldOpExprNode(IFilterExprNode* child1, const std::string& opId, IFilterExprNode* child2, IFilterExprNode* child3); 
    366365 
    367       virtual boost::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
     366      virtual std::shared_ptr<COutputPin> reduce(CGarbageCollector& gc, CField& thisField) const; 
    368367 
    369368    private: 
  • XIOS/dev/branch_openmp/src/parse_expr/operator_expr.hpp

    r1482 r1545  
    254254    static inline double div_ss(double x, double y)   { return x / y; } 
    255255    static inline double pow_ss(double x, double y)   { return std::pow(x,y); } 
     256 
    256257    static inline double eq_ss(double x, double y) // specific check for NaN 
    257258    { 
     
    350351      else return Array<double,1>(x == y);  
    351352    } 
    352  
    353353    static inline CArray<double,1> lt_sf(double x, const CArray<double,1>& y)    { return Array<double,1>(x < y); } 
    354354    static inline CArray<double,1> gt_sf(double x, const CArray<double,1>& y)    { return Array<double,1>(x > y); } 
     
    367367      else return Array<double,1>(x != y); 
    368368    } 
    369  
    370  
    371  
    372369    static inline double cond_sss(double x, double y, double z)   { return (x==0) ? z : y ; } 
    373370 
Note: See TracChangeset for help on using the changeset viewer.