Go to the source code of this file.
◆ ADD
◆ consumer_t
◆ fill()
      
        
          | void fill | ( | H5::Group & | out_file, | 
        
          |  |  | size_t | iterations | 
        
          |  | ) |  |  | 
      
 
Definition at line 95 of file test-hdf5-writer.cxx.
  101   scalar_writer_t::configuration_type scalar_config;
 
  102   scalar_config.name = 
"scalar";
 
  103   scalar_config.deflate = 
deflate;
 
  105   scalar_writer_t scalar(
out_file, consumers, scalar_config);
 
  106   for (
size_t n = 0; 
n < iterations; 
n++) {
 
  112   d1_t::configuration_type d1_config;
 
  113   d1_config.name = 
"1d";
 
  114   d1_config.extent = {10};
 
  115   d1_config.chunks = {5};
 
  118   for (
size_t n = 0; 
n < iterations; 
n++) {
 
  124   d4_t::configuration_type d4_config;
 
  125   d4_config.name = 
"4d";
 
  126   d4_config.extent = {2,3,4,5};
 
  127   d4_config.chunks = {1,2,1,2};
 
  129   d4_t d4(
out_file, consumers, d4_config);
 
  130   for (
size_t n = 0; 
n < iterations; 
n++) {
 
  131     auto vals = nestOutputs<4>(
n, 2);
 
  134     vals.at(1).at(2).at(3).at(4).stype = 86;
 
  135     d4.fill(std::move(
vals));
 
 
 
 
◆ getConsumers()
Definition at line 27 of file test-hdf5-writer.cxx.
   29 #define ADD(NAME) consumers.add(#NAME, [](const out_t& o){ return o.NAME;}, 0) 
   45   consumers.
add(
"half" , [](
const out_t& o) { 
return o.
ftype; }, 0, half);
 
   46   consumers.
add(
"dhalf", [](
const out_t& o) { 
return o.
dtype; }, 0, half);
 
 
 
 
◆ getOutputs()
      
        
          | std::vector<out_t> getOutputs | ( | int | offset, | 
        
          |  |  | size_t | length, | 
        
          |  |  | float | factor | 
        
          |  | ) |  |  | 
      
 
Definition at line 53 of file test-hdf5-writer.cxx.
   54   std::vector<out_t> outvec;
 
   57     long long int shifted = 
n + 
offset;
 
   58     double factored = shifted*factor;
 
   70     out.ulltype = shifted;
 
   72     outvec.push_back(
out);
 
 
 
 
◆ main()
      
        
          | int main | ( | int | nargs, | 
        
          |  |  | char * | argv[] | 
        
          |  | ) |  |  | 
      
 
 
◆ nestOutputs()
template<size_t N> 
      
        
          | auto nestOutputs | ( | int | offset, | 
        
          |  |  | size_t | length | 
        
          |  | ) |  |  | 
      
 
Definition at line 78 of file test-hdf5-writer.cxx.
   79   using ret_t = decltype(
 
   80     nestOutputs<N-1>(std::declval<int>(),std::declval<size_t>()));
 
   81   std::vector<ret_t> ret;
 
 
 
 
◆ nestOutputs< 1 >()
 
void add(const std::string &name, const std::function< T(I)> &, const T &default_value=T(), Compression=Compression::STANDARD)
This should be the only method you need in this class.