source: XIOS/trunk/src/interface/c/icreduce_scalar_to_scalar.cpp @ 1542

Last change on this file since 1542 was 1542, checked in by oabramkina, 6 years ago

Replacing Boost's unordered_map and shared_pointer by its STL counterparts.

Two notes for Curie:

  • one can see the content of unordered_map with ddt only if XIOS has been compiled with gnu
  • XIOS will not compile any more with pgi (all available versions use old STL which are not up to the c++11 norms)
File size: 1.5 KB
RevLine 
[1492]1/* ************************************************************************** *
2 *      Copyright © IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6
[1542]7#include <memory>
8
[1492]9#include "xios.hpp"
10
11#include "object_template.hpp"
12#include "group_template.hpp"
13#include "attribute_template.hpp"
14
15#include "icutil.hpp"
16#include "timer.hpp"
17#include "reduce_scalar_to_scalar.hpp"
18
19extern "C"
20{
21// /////////////////////////////// Définitions ////////////////////////////// //
22
23   // ----------------------- Redéfinition de types ----------------------------
24
25   typedef xios::CReduceScalarToScalar      * XReduceScalarToScalarPtr;
26   
27   // ------------------------ Création des handle -----------------------------
28   void cxios_reduce_scalar_to_scalar_handle_create(XReduceScalarToScalarPtr * _ret, const char * _id, int _id_len)
29   {
30      std::string id;
31      if (!cstr2string(_id, _id_len, id)) return;
32      CTimer::get("XIOS").resume() ;
33      *_ret = xios::CReduceScalarToScalar::get(id);
34      CTimer::get("XIOS").suspend() ;
35   }
36
37   // -------------------- Vérification des identifiants -----------------------
38   void cxios_reduce_scalar_to_scalar_valid_id(bool * _ret, const char * _id, int _id_len)
39   {
40      std::string id;
41      if (!cstr2string(_id, _id_len, id)) return;
42
43      CTimer::get("XIOS").resume() ;
44      *_ret = xios::CReduceScalarToScalar::has(id);
45      CTimer::get("XIOS").suspend() ;
46   }
47
48} // extern "C"
Note: See TracBrowser for help on using the repository browser.