Last change
on this file since 1957 was
1328,
checked in by yushan, 7 years ago
|
dev_omp
|
-
Property copyright set to
Software name : XIOS (Xml I/O Server) http://forge.ipsl.jussieu.fr/ioserver Creation date : January 2009 Licence : CeCCIL version2 see license file in root directory : Licence_CeCILL_V2-en.txt or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement) CNRS/IPSL (Institut Pierre Simon Laplace) Project Manager : Yann Meurdesoif yann.meurdesoif@cea.fr
|
File size:
1.4 KB
|
Rev | Line | |
---|
[498] | 1 | /*! |
---|
| 2 | \file netCdfInterface_impl.hpp |
---|
| 3 | \author Ha NGUYEN |
---|
| 4 | \date 06 Oct 2014 |
---|
| 5 | \since 06 Oct 2014 |
---|
| 6 | |
---|
| 7 | \brief Implemention of some templated functions in netCdfInterface |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #include "netCdfInterface_impl.hpp" |
---|
| 11 | |
---|
| 12 | namespace xios |
---|
| 13 | { |
---|
[686] | 14 | #define macroAtt(type) \ |
---|
| 15 | template int CNetCdfInterface::getAttType(int ncid, int varid, const StdString& attrName, type* data); \ |
---|
| 16 | template int CNetCdfInterface::putAttType(int ncid, int varid, const StdString& attrName, \ |
---|
| 17 | StdSize numVal, const type* data); |
---|
[498] | 18 | |
---|
[686] | 19 | macroAtt(double) |
---|
| 20 | macroAtt(float) |
---|
| 21 | macroAtt(int) |
---|
| 22 | macroAtt(long) |
---|
| 23 | macroAtt(short) |
---|
| 24 | macroAtt(char) |
---|
[498] | 25 | |
---|
[686] | 26 | #define macroPutVar(type) \ |
---|
| 27 | template int CNetCdfInterface::getVaraType(int ncid, int varId, const StdSize* start, \ |
---|
| 28 | const StdSize* count, type* data); \ |
---|
[498] | 29 | template int CNetCdfInterface::putVaraType(int ncid, int varId, const StdSize* start, \ |
---|
[686] | 30 | const StdSize* count, const type* data); |
---|
| 31 | |
---|
| 32 | macroPutVar(double) |
---|
| 33 | macroPutVar(float) |
---|
| 34 | macroPutVar(int) |
---|
[1050] | 35 | macroPutVar(char) |
---|
| 36 | |
---|
[686] | 37 | #define macroType(type, ncType) \ |
---|
| 38 | template<> nc_type CNetCdfInterface::getNcType<type>() { return ncType; } |
---|
| 39 | |
---|
| 40 | macroType(double, NC_DOUBLE) |
---|
| 41 | macroType(float, NC_FLOAT) |
---|
| 42 | macroType(int, NC_INT) |
---|
| 43 | macroType(long, NC_LONG) |
---|
| 44 | macroType(short, NC_SHORT) |
---|
| 45 | macroType(char, NC_CHAR) |
---|
[498] | 46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.