LCOV - code coverage report
Current view: top level - include/dash/io/hdf5/internal - HDF5OutputStream-inl.h (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 10 10 100.0 %
Date: 2016-06-29 12:30:40 Functions: 6 6 100.0 %

          Line data    Source code
       1             : #ifndef DASH__IO__INTERNAL__HDF5__HDF5_OUTPUT_STREAM_INL_H__INCLUDED
       2             : #define DASH__IO__INTERNAL__HDF5__HDF5_OUTPUT_STREAM_INL_H__INCLUDED
       3             : 
       4             : 
       5             : #include <dash/io/hdf5/HDF5OutputStream.h>
       6             : #include <dash/io/hdf5/StoreHDF.h>
       7             : 
       8             : #include <dash/Matrix.h>
       9             : #include <dash/Array.h>
      10             : 
      11             : 
      12             : namespace dash {
      13             : namespace io {
      14             : namespace hdf5 {
      15             : 
      16             : // Array implementation
      17             : template <
      18             :     typename value_t,
      19             :     typename index_t,
      20             :     class    pattern_t >
      21          12 : inline HDF5OutputStream & operator<< (
      22             :     HDF5OutputStream & os,
      23             :     dash::Array< value_t,
      24             :     index_t,
      25             :     pattern_t > &array) {
      26             : 
      27          12 :     array.barrier();
      28          12 :     dash::io::hdf5::StoreHDF::write(
      29             :         array,
      30             :         os._filename,
      31             :         os._dataset,
      32             :         os._foptions);
      33             : 
      34             :                 // Append future data in this stream
      35          12 :                 os._foptions.overwrite_file = false;
      36          12 :     return os;
      37             : }
      38             : 
      39             : // Matrix implementation
      40             : template <
      41             :     typename value_t,
      42             :     dim_t    ndim,
      43             :     typename index_t,
      44             :     class    pattern_t >
      45          36 : inline HDF5OutputStream & operator<< (
      46             :     HDF5OutputStream & os,
      47             :     dash::Matrix < value_t,
      48             :     ndim,
      49             :     index_t,
      50             :     pattern_t > &matrix) {
      51             : 
      52          36 :     matrix.barrier();
      53          36 :     dash::io::hdf5::StoreHDF::write(
      54             :         matrix,
      55             :         os._filename,
      56             :         os._dataset,
      57             :         os._foptions);
      58             : 
      59             :    // Append future data in this stream
      60          36 :          os._foptions.overwrite_file = false;
      61          36 :    return os;
      62             : }
      63             : 
      64             : } // namespace hdf5
      65             : } // namespace io
      66             : } // namespace dash
      67             : 
      68             : #endif // DASH__IO__INTERNAL__HDF5__HDF5_OUTPUT_STREAM_INL_H__INCLUDED

Generated by: LCOV version 1.12