Ignore:
Timestamp:
05/21/12 17:57:22 (12 years ago)
Author:
ymipsl
Message:
  • Supress lot of shared_ptr
  • instrument code for vampir-trace and timer diagnostic

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/c_attr/icfield_attr.cpp

    r345 r347  
    1010#include "group_template_impl.hpp" 
    1111#include "icutil.hpp" 
     12#include "timer.hpp" 
    1213 
    1314extern "C" 
     
    1920    std::string axis_ref_str; 
    2021    if(!cstr2string(axis_ref, axis_ref_size, axis_ref_str)) return; 
     22     CTimer::get("XIOS").resume(); 
    2123    field_hdl->axis_ref.setValue(axis_ref_str); 
    2224    field_hdl->sendAttributToServer(field_hdl->axis_ref); 
     25     CTimer::get("XIOS").suspend(); 
    2326  } 
    2427   
    2528  void cxios_get_field_axis_ref(field_Ptr field_hdl, char * axis_ref, int axis_ref_size) 
    2629  { 
     30     CTimer::get("XIOS").resume(); 
    2731    if(!string_copy(field_hdl->axis_ref.getValue(),axis_ref , axis_ref_size)) 
    2832      ERROR("void cxios_get_field_axis_ref(field_Ptr field_hdl, char * axis_ref, int axis_ref_size)", <<"Input string is to short"); 
     33     CTimer::get("XIOS").suspend(); 
    2934  } 
    3035   
     
    3237  void cxios_set_field_default_value(field_Ptr field_hdl, double default_value) 
    3338  { 
     39     CTimer::get("XIOS").resume(); 
    3440    field_hdl->default_value.setValue(default_value); 
    3541    field_hdl->sendAttributToServer(field_hdl->default_value); 
     42     CTimer::get("XIOS").suspend(); 
    3643  } 
    3744   
     
    4653    std::string domain_ref_str; 
    4754    if(!cstr2string(domain_ref, domain_ref_size, domain_ref_str)) return; 
     55     CTimer::get("XIOS").resume(); 
    4856    field_hdl->domain_ref.setValue(domain_ref_str); 
    4957    field_hdl->sendAttributToServer(field_hdl->domain_ref); 
     58     CTimer::get("XIOS").suspend(); 
    5059  } 
    5160   
    5261  void cxios_get_field_domain_ref(field_Ptr field_hdl, char * domain_ref, int domain_ref_size) 
    5362  { 
     63     CTimer::get("XIOS").resume(); 
    5464    if(!string_copy(field_hdl->domain_ref.getValue(),domain_ref , domain_ref_size)) 
    5565      ERROR("void cxios_get_field_domain_ref(field_Ptr field_hdl, char * domain_ref, int domain_ref_size)", <<"Input string is to short"); 
     66     CTimer::get("XIOS").suspend(); 
    5667  } 
    5768   
     
    5970  void cxios_set_field_enabled(field_Ptr field_hdl, bool enabled) 
    6071  { 
     72     CTimer::get("XIOS").resume(); 
    6173    field_hdl->enabled.setValue(enabled); 
    6274    field_hdl->sendAttributToServer(field_hdl->enabled); 
     75     CTimer::get("XIOS").suspend(); 
    6376  } 
    6477   
     
    7386    std::string field_ref_str; 
    7487    if(!cstr2string(field_ref, field_ref_size, field_ref_str)) return; 
     88     CTimer::get("XIOS").resume(); 
    7589    field_hdl->field_ref.setValue(field_ref_str); 
    7690    field_hdl->sendAttributToServer(field_hdl->field_ref); 
     91     CTimer::get("XIOS").suspend(); 
    7792  } 
    7893   
    7994  void cxios_get_field_field_ref(field_Ptr field_hdl, char * field_ref, int field_ref_size) 
    8095  { 
     96     CTimer::get("XIOS").resume(); 
    8197    if(!string_copy(field_hdl->field_ref.getValue(),field_ref , field_ref_size)) 
    8298      ERROR("void cxios_get_field_field_ref(field_Ptr field_hdl, char * field_ref, int field_ref_size)", <<"Input string is to short"); 
     99     CTimer::get("XIOS").suspend(); 
    83100  } 
    84101   
     
    88105    std::string freq_offset_str; 
    89106    if(!cstr2string(freq_offset, freq_offset_size, freq_offset_str)) return; 
     107     CTimer::get("XIOS").resume(); 
    90108    field_hdl->freq_offset.setValue(freq_offset_str); 
    91109    field_hdl->sendAttributToServer(field_hdl->freq_offset); 
     110     CTimer::get("XIOS").suspend(); 
    92111  } 
    93112   
    94113  void cxios_get_field_freq_offset(field_Ptr field_hdl, char * freq_offset, int freq_offset_size) 
    95114  { 
     115     CTimer::get("XIOS").resume(); 
    96116    if(!string_copy(field_hdl->freq_offset.getValue(),freq_offset , freq_offset_size)) 
    97117      ERROR("void cxios_get_field_freq_offset(field_Ptr field_hdl, char * freq_offset, int freq_offset_size)", <<"Input string is to short"); 
     118     CTimer::get("XIOS").suspend(); 
    98119  } 
    99120   
     
    103124    std::string freq_op_str; 
    104125    if(!cstr2string(freq_op, freq_op_size, freq_op_str)) return; 
     126     CTimer::get("XIOS").resume(); 
    105127    field_hdl->freq_op.setValue(freq_op_str); 
    106128    field_hdl->sendAttributToServer(field_hdl->freq_op); 
     129     CTimer::get("XIOS").suspend(); 
    107130  } 
    108131   
    109132  void cxios_get_field_freq_op(field_Ptr field_hdl, char * freq_op, int freq_op_size) 
    110133  { 
     134     CTimer::get("XIOS").resume(); 
    111135    if(!string_copy(field_hdl->freq_op.getValue(),freq_op , freq_op_size)) 
    112136      ERROR("void cxios_get_field_freq_op(field_Ptr field_hdl, char * freq_op, int freq_op_size)", <<"Input string is to short"); 
     137     CTimer::get("XIOS").suspend(); 
    113138  } 
    114139   
     
    118143    std::string grid_ref_str; 
    119144    if(!cstr2string(grid_ref, grid_ref_size, grid_ref_str)) return; 
     145     CTimer::get("XIOS").resume(); 
    120146    field_hdl->grid_ref.setValue(grid_ref_str); 
    121147    field_hdl->sendAttributToServer(field_hdl->grid_ref); 
     148     CTimer::get("XIOS").suspend(); 
    122149  } 
    123150   
    124151  void cxios_get_field_grid_ref(field_Ptr field_hdl, char * grid_ref, int grid_ref_size) 
    125152  { 
     153     CTimer::get("XIOS").resume(); 
    126154    if(!string_copy(field_hdl->grid_ref.getValue(),grid_ref , grid_ref_size)) 
    127155      ERROR("void cxios_get_field_grid_ref(field_Ptr field_hdl, char * grid_ref, int grid_ref_size)", <<"Input string is to short"); 
     156     CTimer::get("XIOS").suspend(); 
    128157  } 
    129158   
     
    131160  void cxios_set_field_level(field_Ptr field_hdl, int level) 
    132161  { 
     162     CTimer::get("XIOS").resume(); 
    133163    field_hdl->level.setValue(level); 
    134164    field_hdl->sendAttributToServer(field_hdl->level); 
     165     CTimer::get("XIOS").suspend(); 
    135166  } 
    136167   
     
    145176    std::string long_name_str; 
    146177    if(!cstr2string(long_name, long_name_size, long_name_str)) return; 
     178     CTimer::get("XIOS").resume(); 
    147179    field_hdl->long_name.setValue(long_name_str); 
    148180    field_hdl->sendAttributToServer(field_hdl->long_name); 
     181     CTimer::get("XIOS").suspend(); 
    149182  } 
    150183   
    151184  void cxios_get_field_long_name(field_Ptr field_hdl, char * long_name, int long_name_size) 
    152185  { 
     186     CTimer::get("XIOS").resume(); 
    153187    if(!string_copy(field_hdl->long_name.getValue(),long_name , long_name_size)) 
    154188      ERROR("void cxios_get_field_long_name(field_Ptr field_hdl, char * long_name, int long_name_size)", <<"Input string is to short"); 
     189     CTimer::get("XIOS").suspend(); 
    155190  } 
    156191   
     
    160195    std::string name_str; 
    161196    if(!cstr2string(name, name_size, name_str)) return; 
     197     CTimer::get("XIOS").resume(); 
    162198    field_hdl->name.setValue(name_str); 
    163199    field_hdl->sendAttributToServer(field_hdl->name); 
     200     CTimer::get("XIOS").suspend(); 
    164201  } 
    165202   
    166203  void cxios_get_field_name(field_Ptr field_hdl, char * name, int name_size) 
    167204  { 
     205     CTimer::get("XIOS").resume(); 
    168206    if(!string_copy(field_hdl->name.getValue(),name , name_size)) 
    169207      ERROR("void cxios_get_field_name(field_Ptr field_hdl, char * name, int name_size)", <<"Input string is to short"); 
     208     CTimer::get("XIOS").suspend(); 
    170209  } 
    171210   
     
    175214    std::string operation_str; 
    176215    if(!cstr2string(operation, operation_size, operation_str)) return; 
     216     CTimer::get("XIOS").resume(); 
    177217    field_hdl->operation.setValue(operation_str); 
    178218    field_hdl->sendAttributToServer(field_hdl->operation); 
     219     CTimer::get("XIOS").suspend(); 
    179220  } 
    180221   
    181222  void cxios_get_field_operation(field_Ptr field_hdl, char * operation, int operation_size) 
    182223  { 
     224     CTimer::get("XIOS").resume(); 
    183225    if(!string_copy(field_hdl->operation.getValue(),operation , operation_size)) 
    184226      ERROR("void cxios_get_field_operation(field_Ptr field_hdl, char * operation, int operation_size)", <<"Input string is to short"); 
     227     CTimer::get("XIOS").suspend(); 
    185228  } 
    186229   
     
    188231  void cxios_set_field_prec(field_Ptr field_hdl, int prec) 
    189232  { 
     233     CTimer::get("XIOS").resume(); 
    190234    field_hdl->prec.setValue(prec); 
    191235    field_hdl->sendAttributToServer(field_hdl->prec); 
     236     CTimer::get("XIOS").suspend(); 
    192237  } 
    193238   
     
    202247    std::string standard_name_str; 
    203248    if(!cstr2string(standard_name, standard_name_size, standard_name_str)) return; 
     249     CTimer::get("XIOS").resume(); 
    204250    field_hdl->standard_name.setValue(standard_name_str); 
    205251    field_hdl->sendAttributToServer(field_hdl->standard_name); 
     252     CTimer::get("XIOS").suspend(); 
    206253  } 
    207254   
    208255  void cxios_get_field_standard_name(field_Ptr field_hdl, char * standard_name, int standard_name_size) 
    209256  { 
     257     CTimer::get("XIOS").resume(); 
    210258    if(!string_copy(field_hdl->standard_name.getValue(),standard_name , standard_name_size)) 
    211259      ERROR("void cxios_get_field_standard_name(field_Ptr field_hdl, char * standard_name, int standard_name_size)", <<"Input string is to short"); 
     260     CTimer::get("XIOS").suspend(); 
    212261  } 
    213262   
     
    217266    std::string unit_str; 
    218267    if(!cstr2string(unit, unit_size, unit_str)) return; 
     268     CTimer::get("XIOS").resume(); 
    219269    field_hdl->unit.setValue(unit_str); 
    220270    field_hdl->sendAttributToServer(field_hdl->unit); 
     271     CTimer::get("XIOS").suspend(); 
    221272  } 
    222273   
    223274  void cxios_get_field_unit(field_Ptr field_hdl, char * unit, int unit_size) 
    224275  { 
     276     CTimer::get("XIOS").resume(); 
    225277    if(!string_copy(field_hdl->unit.getValue(),unit , unit_size)) 
    226278      ERROR("void cxios_get_field_unit(field_Ptr field_hdl, char * unit, int unit_size)", <<"Input string is to short"); 
     279     CTimer::get("XIOS").suspend(); 
    227280  } 
    228281   
Note: See TracChangeset for help on using the changeset viewer.