[cig-commits] r13522 - cs/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Tue Dec 9 18:13:15 PST 2008


Author: luis
Date: 2008-12-09 18:13:13 -0800 (Tue, 09 Dec 2008)
New Revision: 13522

Modified:
   cs/cigma/trunk/src/io_hdf5_reader.cpp
   cs/cigma/trunk/src/io_hdf5_reader.h
   cs/cigma/trunk/src/io_hdf5_writer.cpp
   cs/cigma/trunk/src/io_hdf5_writer.h
Log:
Fixes for GCC 4.3

Modified: cs/cigma/trunk/src/io_hdf5_reader.cpp
===================================================================
--- cs/cigma/trunk/src/io_hdf5_reader.cpp	2008-12-10 02:13:12 UTC (rev 13521)
+++ cs/cigma/trunk/src/io_hdf5_reader.cpp	2008-12-10 02:13:13 UTC (rev 13522)
@@ -1,4 +1,4 @@
-#include "HDF5_Reader.h"
+#include "io_hdf5_reader.h"
 #include "Common.h"
 #include <iostream>
 
@@ -52,14 +52,14 @@
 // ----------------------------------------------------------------------------
 
 template <typename T> static H5::PredType predtype_from();
-template <> static H5::PredType predtype_from<float>() { return H5::PredType::NATIVE_FLOAT; }
-template <> static H5::PredType predtype_from<double>(){ return H5::PredType::NATIVE_DOUBLE; }
-template <> static H5::PredType predtype_from<int>()   { return H5::PredType::NATIVE_INT; }
+template <> H5::PredType predtype_from<float>() { return H5::PredType::NATIVE_FLOAT; }
+template <> H5::PredType predtype_from<double>(){ return H5::PredType::NATIVE_DOUBLE; }
+template <> H5::PredType predtype_from<int>()   { return H5::PredType::NATIVE_INT; }
 
 template <typename T> static H5T_class_t typeclass_from();
-template <> static H5T_class_t typeclass_from<float>()  { return H5T_FLOAT; }
-template <> static H5T_class_t typeclass_from<double>() { return H5T_FLOAT; }
-template <> static H5T_class_t typeclass_from<int>()    { return H5T_INTEGER; }
+template <> H5T_class_t typeclass_from<float>()  { return H5T_FLOAT; }
+template <> H5T_class_t typeclass_from<double>() { return H5T_FLOAT; }
+template <> H5T_class_t typeclass_from<int>()    { return H5T_INTEGER; }
 
 template <typename MT>
 static int get_full_dataset(H5::H5File *file, const char *loc, MT **data, int *nrows, int *ncols)
@@ -126,18 +126,21 @@
 int HDF5_Reader::getDataset(const char *loc, double **data, int *num, int *dim)
 {
     TRI_LOG_STR("HDF5_Reader::getDataset()");
+    TRI_LOG(loc);
     return get_full_dataset<double>(file, loc, data, num, dim);
 }
 
 int HDF5_Reader::getCoordinates(const char *loc, double **coordinates, int *nno, int *nsd)
 {
     TRI_LOG_STR("HDF5_Reader::getCoordinates()");
+    TRI_LOG(loc);
     return get_full_dataset<double>(file, loc, coordinates, nno, nsd);
 }
 
 int HDF5_Reader::getConnectivity(const char *loc, int **connectivity, int *nel, int *ndofs)
 {
     TRI_LOG_STR("HDF5_Reader::getConnectivity()");
+    TRI_LOG(loc);
     return get_full_dataset<int>(file, loc, connectivity, nel, ndofs);
 }
 

Modified: cs/cigma/trunk/src/io_hdf5_reader.h
===================================================================
--- cs/cigma/trunk/src/io_hdf5_reader.h	2008-12-10 02:13:12 UTC (rev 13521)
+++ cs/cigma/trunk/src/io_hdf5_reader.h	2008-12-10 02:13:13 UTC (rev 13522)
@@ -2,7 +2,7 @@
 #define __CIGMA_HDF5_READER_H__
 
 #include "H5Cpp.h"
-#include "FileReader.h"
+#include "io_file_reader.h"
 
 namespace cigma
 {

Modified: cs/cigma/trunk/src/io_hdf5_writer.cpp
===================================================================
--- cs/cigma/trunk/src/io_hdf5_writer.cpp	2008-12-10 02:13:12 UTC (rev 13521)
+++ cs/cigma/trunk/src/io_hdf5_writer.cpp	2008-12-10 02:13:13 UTC (rev 13522)
@@ -1,5 +1,4 @@
-#include "HDF5_Writer.h"
-
+#include "io_hdf5_writer.h"
 #include "Common.h"
 
 using namespace std;
@@ -51,12 +50,12 @@
 // ----------------------------------------------------------------------------
 
 template <typename T> static H5::PredType predtype_from();
-template <> static H5::PredType predtype_from<float>() { return H5::PredType::NATIVE_FLOAT; }
-template <> static H5::PredType predtype_from<double>(){ return H5::PredType::NATIVE_DOUBLE; }
-template <> static H5::PredType predtype_from<int>()   { return H5::PredType::NATIVE_INT; }
+template <> H5::PredType predtype_from<float>() { return H5::PredType::NATIVE_FLOAT; }
+template <> H5::PredType predtype_from<double>(){ return H5::PredType::NATIVE_DOUBLE; }
+template <> H5::PredType predtype_from<int>()   { return H5::PredType::NATIVE_INT; }
 
 template <typename MT, typename FT>
-static int write_dataset(H5::H5File *file, const char *loc, MT *data, int nrows, int ncols)
+static int write_dataset(H5::H5File *file, const char *loc, const MT *data, int nrows, int ncols)
 {
     try
     {
@@ -79,21 +78,24 @@
 }
 
 
-int HDF5_Writer::writeDataset(const char *loc, double *data, int nno, int ndim)
+int HDF5_Writer::writeDataset(const char *loc, const double *data, int nno, int ndim)
 {
     TRI_LOG_STR("HDF5_Writer::writeDataset()");
+    TRI_LOG(loc);
     return write_dataset<double,double>(file, loc, data, nno, ndim);
 }
 
-int HDF5_Writer::writeCoordinates(const char *loc, double *coordinates, int nno, int nsd)
+int HDF5_Writer::writeCoordinates(const char *loc, const double *coordinates, int nno, int nsd)
 {
     TRI_LOG_STR("HDF5_Writer::writeCoordinates()");
+    TRI_LOG(loc);
     return write_dataset<double,double>(file, loc, coordinates, nno, nsd);
 }
 
-int HDF5_Writer::writeConnectivity(const char *loc, int *connectivity, int nel, int ndofs)
+int HDF5_Writer::writeConnectivity(const char *loc, const int *connectivity, int nel, int ndofs)
 {
     TRI_LOG_STR("HDF5_Writer::writeConnectivity()");
+    TRI_LOG(loc);
     return write_dataset<int,int>(file, loc, connectivity, nel, ndofs);
 }
 

Modified: cs/cigma/trunk/src/io_hdf5_writer.h
===================================================================
--- cs/cigma/trunk/src/io_hdf5_writer.h	2008-12-10 02:13:12 UTC (rev 13521)
+++ cs/cigma/trunk/src/io_hdf5_writer.h	2008-12-10 02:13:13 UTC (rev 13522)
@@ -2,7 +2,7 @@
 #define __CIGMA_HDF5_WRITER_H__
 
 #include "H5Cpp.h"
-#include "FileWriter.h"
+#include "io_file_writer.h"
 
 namespace cigma
 {
@@ -20,9 +20,9 @@
     int open(const char *filename);
     int close();
 
-    int writeDataset(const char *loc, double *data, int nno, int ndim);
-    int writeCoordinates(const char *loc, double *coordinates, int nno, int nsd);
-    int writeConnectivity(const char *loc, int *connectivity, int nel, int ndofs);
+    int writeDataset(const char *loc, const double *data, int nno, int ndim);
+    int writeCoordinates(const char *loc, const double *coordinates, int nno, int nsd);
+    int writeConnectivity(const char *loc, const int *connectivity, int nel, int ndofs);
 
 public:
     H5::H5File *file;



More information about the CIG-COMMITS mailing list