40 std::size_t
const size_tuple, std::string
const&
name,
42 unsigned int const n_files,
43 unsigned int const chunk_size_bytes)
48 auto const& partition_info =
50 auto const& offset_partitioned_dim = partition_info.local_offset;
51 offsets = {offset_partitioned_dim, 0};
53 std::size_t
const unified_length = partition_info.local_length;
54 int const type_size = H5Tget_size(
data_type);
55 std::size_t
const space =
56 (chunk_size_bytes > 0)
57 ? std::min(std::size_t(std::lround(
float(chunk_size_bytes) /
58 (size_tuple * type_size) +
60 partition_info.global_length)
61 : partition_info.longest_local_length;
63 if (chunk_size_bytes > 0 && space == partition_info.global_length)
65 INFO(
"HDF5: Using a single chunk for dataset {:s} .",
name);
68 chunk_space = (size_tuple > 1) ? std::vector<Hdf5DimType>{space, size_tuple}
69 : std::vector<Hdf5DimType>{space};
72 ? std::vector<Hdf5DimType>{unified_length, size_tuple}
73 : std::vector<Hdf5DimType>{unified_length};
76 ? std::vector<Hdf5DimType>{partition_info.global_length, size_tuple}
77 : std::vector<Hdf5DimType>{partition_info.global_length};
80 "HDF: dataset name: {:s}, offset: {:d}, data_space: {:d}, chunk_space "
81 "{:d}, file_space: {:d}, tuples: {:d}",
HdfData(void const *data_start, std::size_t size_partitioned_dim, std::size_t size_tuple, std::string const &name, MeshPropertyDataType mesh_property_data_type, unsigned int n_files, unsigned int chunk_size_bytes)