]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Separate functions by three empty lines
authorDaniel Garcia-Sanchez <daniel.garcia-sanchez@insp.upmc.fr>
Mon, 8 Oct 2018 09:27:07 +0000 (11:27 +0200)
committerDaniel Garcia-Sanchez <daniel.garcia-sanchez@insp.upmc.fr>
Wed, 9 Jan 2019 18:24:57 +0000 (19:24 +0100)
source/base/hdf5.cc

index e6a86c0c554a79562c321bdbce4e46149ad3255f..3df8b0e8d36db8d19e0e50b422a3a55c36cd693f 100644 (file)
@@ -102,6 +102,8 @@ namespace HDF5
       return t_type;
     }
 
+
+
     // Several HDF5 functions such as H5Screate_simple() require a
     // one-dimensional array that specifies the size of each dimension of the
     // container, see:
@@ -124,6 +126,8 @@ namespace HDF5
       return std::vector<hsize_t>{data.size()};
     }
 
+
+
     template <typename Container>
     typename std::enable_if<
       std::is_same<Container, Vector<typename Container::value_type>>::value,
@@ -133,6 +137,8 @@ namespace HDF5
       return std::vector<hsize_t>{data.size()};
     }
 
+
+
     template <typename Container>
     typename std::enable_if<
       std::is_same<Container,
@@ -144,6 +150,7 @@ namespace HDF5
     }
 
 
+
     // This function returns the total size of the container.
     // For a std::vector the function returns int(vector_size)
     // For a Vector the function returns int(vector_size)
@@ -158,6 +165,8 @@ namespace HDF5
       return static_cast<unsigned int>(data.size());
     }
 
+
+
     template <typename Container>
     typename std::enable_if<
       std::is_same<Container, Vector<typename Container::value_type>>::value,
@@ -167,6 +176,8 @@ namespace HDF5
       return static_cast<unsigned int>(data.size());
     }
 
+
+
     template <typename Container>
     typename std::enable_if<
       std::is_same<Container,
@@ -177,6 +188,8 @@ namespace HDF5
       return static_cast<unsigned int>(data.m() * data.n());
     }
 
+
+
     // This function returns the pointer to the raw data of a container
     template <typename Container>
     typename std::enable_if<
@@ -190,6 +203,8 @@ namespace HDF5
       return data.data();
     }
 
+
+
     template <typename Container>
     typename std::enable_if<
       std::is_same<Container, Vector<typename Container::value_type>>::value,
@@ -202,6 +217,8 @@ namespace HDF5
       return &data[0];
     }
 
+
+
     template <typename Container>
     typename std::enable_if<
       std::is_same<Container,
@@ -215,6 +232,8 @@ namespace HDF5
       return &data[0][0];
     }
 
+
+
     // This function returns the pointer to the raw data of a container
     // The returned pointer is const, which means that it can be used only to
     // read the data
@@ -230,6 +249,8 @@ namespace HDF5
       return data.data();
     }
 
+
+
     template <typename Container>
     typename std::enable_if<
       std::is_same<Container, Vector<typename Container::value_type>>::value,
@@ -243,6 +264,7 @@ namespace HDF5
     }
 
 
+
     template <typename Container>
     typename std::enable_if<
       std::is_same<Container,
@@ -256,6 +278,8 @@ namespace HDF5
       return &data[0][0];
     }
 
+
+
     // This function initializes and returns a container of type std::vector,
     // Vector or FullMatrix. The function does not set the values of the
     // elements of the container. The container can store data of a HDF5 dataset
@@ -283,6 +307,8 @@ namespace HDF5
         dimensions.begin(), dimensions.end(), 1, std::multiplies<int>()));
     }
 
+
+
     template <typename Container>
     typename std::enable_if<
       std::is_same<Container, Vector<typename Container::value_type>>::value,
@@ -293,6 +319,8 @@ namespace HDF5
         dimensions.begin(), dimensions.end(), 1, std::multiplies<int>()));
     }
 
+
+
     template <typename Container>
     typename std::enable_if<
       std::is_same<Container,
@@ -304,6 +332,8 @@ namespace HDF5
       return Container(dimensions[0], dimensions[1]);
     }
 
+
+
     // Convert a HDF5 no_collective_cause code to a human readable string
     std::string
     no_collective_cause_to_string(uint32_t no_collective_cause)
@@ -365,11 +395,14 @@ namespace HDF5
   } // namespace internal
 
 
+
   HDF5Object::HDF5Object(const std::string name, const bool mpi)
     : name(name)
     , mpi(mpi)
   {}
 
+
+
   template <typename T>
   T
   HDF5Object::attr(const std::string &attr_name)
@@ -388,6 +421,8 @@ namespace HDF5
     return value;
   }
 
+
+
   template <>
   bool
   HDF5Object::attr(const std::string &attr_name)
@@ -406,6 +441,8 @@ namespace HDF5
     return bool_value;
   }
 
+
+
   template <>
   std::string
   HDF5Object::attr(const std::string &attr_name)
@@ -452,6 +489,8 @@ namespace HDF5
     return string_value;
   }
 
+
+
   template <typename T>
   void
   HDF5Object::write_attr(const std::string &attr_name, const T value)
@@ -486,6 +525,8 @@ namespace HDF5
     Assert(ret >= 0, ExcMessage("Error at H5Aclose"));
   }
 
+
+
   template <>
   void
   HDF5Object::write_attr(const std::string &attr_name, const std::string value)
@@ -540,6 +581,8 @@ namespace HDF5
     Assert(ret >= 0, ExcMessage("Error at H5Aclose"));
   }
 
+
+
   DataSet::DataSet(const std::string &name,
                    const hid_t &      parent_group_id,
                    const bool         mpi)
@@ -586,6 +629,8 @@ namespace HDF5
       }
   }
 
+
+
   DataSet::DataSet(const std::string &         name,
                    const hid_t &               parent_group_id,
                    const std::vector<hsize_t> &dimensions,
@@ -629,6 +674,8 @@ namespace HDF5
       }
   }
 
+
+
   template <typename Container>
   Container
   DataSet::read()
@@ -677,6 +724,8 @@ namespace HDF5
     return data;
   }
 
+
+
   template <typename number>
   std::vector<number>
   DataSet::read_selection(const std::vector<hsize_t> &coordinates)
@@ -744,6 +793,8 @@ namespace HDF5
     return data;
   }
 
+
+
   template <typename Container>
   Container
   DataSet::read_hyperslab(const std::vector<hsize_t> &offset,
@@ -809,6 +860,8 @@ namespace HDF5
     return data;
   }
 
+
+
   template <typename number>
   void
   DataSet::read_none()
@@ -863,6 +916,8 @@ namespace HDF5
     Assert(ret >= 0, ExcMessage("Error at H5SClose"));
   }
 
+
+
   template <typename Container>
   void
   DataSet::write(const Container &data)
@@ -908,6 +963,8 @@ namespace HDF5
       }
   }
 
+
+
   template <typename number>
   void
   DataSet::write_selection(const std::vector<number> & data,
@@ -968,6 +1025,8 @@ namespace HDF5
     Assert(ret >= 0, ExcMessage("Error at H5SClose"));
   }
 
+
+
   template <typename Container>
   void
   DataSet::write_hyperslab(const Container &           data,
@@ -1033,6 +1092,8 @@ namespace HDF5
     Assert(ret >= 0, ExcMessage("Error at H5Sclose"));
   }
 
+
+
   template <typename Container>
   void
   DataSet::write_hyperslab(const Container &           data,
@@ -1097,6 +1158,8 @@ namespace HDF5
     Assert(ret >= 0, ExcMessage("Error at H5Sclose"));
   }
 
+
+
   template <typename number>
   void
   DataSet::write_none()
@@ -1147,6 +1210,8 @@ namespace HDF5
     Assert(ret >= 0, ExcMessage("Error at H5Sclose"));
   }
 
+
+
   template <>
   H5D_mpio_actual_io_mode_t
   DataSet::io_mode()
@@ -1193,6 +1258,8 @@ namespace HDF5
     return std::string("Internal error");
   }
 
+
+
   template <>
   uint32_t
   DataSet::local_no_collective_cause()
@@ -1217,6 +1284,8 @@ namespace HDF5
     return internal::no_collective_cause_to_string(_local_no_collective_cause);
   }
 
+
+
   template <>
   uint32_t
   DataSet::global_no_collective_cause()
@@ -1241,36 +1310,48 @@ namespace HDF5
     return internal::no_collective_cause_to_string(_global_no_collective_cause);
   }
 
+
+
   bool
   DataSet::query_io_mode() const
   {
     return _query_io_mode;
   }
 
+
+
   void
   DataSet::query_io_mode(bool query_io_mode)
   {
     _query_io_mode = query_io_mode;
   }
 
+
+
   std::vector<hsize_t>
   DataSet::dimensions() const
   {
     return _dimensions;
   }
 
+
+
   unsigned int
   DataSet::size() const
   {
     return _size;
   }
 
+
+
   unsigned int
   DataSet::rank() const
   {
     return _rank;
   }
 
+
+
   Group::Group(const std::string &name,
                const Group &      parentGroup,
                const bool         mpi,
@@ -1303,28 +1384,38 @@ namespace HDF5
       }
   }
 
+
+
   Group::Group(const std::string &name, const bool mpi)
     : HDF5Object(name, mpi)
   {}
 
+
+
   Group
   Group::group(const std::string &name)
   {
     return Group(name, *this, mpi, Mode::open);
   }
 
+
+
   Group
   Group::create_group(const std::string &name)
   {
     return Group(name, *this, mpi, Mode::create);
   }
 
+
+
   DataSet
   Group::dataset(const std::string &name)
   {
     return DataSet(name, *hdf5_reference, mpi);
   }
 
+
+
   template <typename number>
   DataSet
   Group::create_dataset(const std::string &         name,
@@ -1334,6 +1425,8 @@ namespace HDF5
     return DataSet(name, *hdf5_reference, dimensions, t_type, mpi);
   }
 
+
+
   template <typename Container>
   void
   Group::write_dataset(const std::string &name, const Container &data) const
@@ -1401,16 +1494,22 @@ namespace HDF5
       }
   }
 
+
+
   File::File(const std::string &name,
              const MPI_Comm     mpi_communicator,
              const Mode         mode)
     : File(name, true, mpi_communicator, mode)
   {}
 
+
+
   File::File(const std::string &name, const Mode mode)
     : File(name, false, MPI_COMM_NULL, mode)
   {}
 
+
+
 #  ifndef DOXYGEN
 
   // instantiations of functions

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.