|
DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
|
Config-backed factory selecting between JSON and HDF5 serializers. More...
#include <SerializerFactory.hpp>
Public Member Functions | |
| SerializerFactory ()=default | |
| SerializerFactory (const std::string &_type) | |
| Construct with a specific backend name; other fields stay at defaults. | |
| DNDS_DECLARE_CONFIG (SerializerFactory) | |
| SerializerBaseSSP | BuildSerializer (const MPIInfo &mpi) |
| Instantiate the selected serializer and apply its tunables. | |
| std::tuple< std::string, std::string > | ModifyFilePath (std::string fname, const MPIInfo &mpi, std::string rank_part_fmt="%06d", bool read=false) |
| Expand a user-supplied base file name into the backend-specific path layout. | |
Public Attributes | |
| std::string | type = "JSON" |
Backend selector: "JSON" or "H5". | |
| int | hdfDeflateLevel = 0 |
| HDF5 gzip deflate level (0 = off, 9 = max). | |
| int | hdfChunkSize = 0 |
| HDF5 chunk size (0 = library-chosen auto). | |
| bool | hdfCollOnData = false |
| Use collective HDF5 I/O for data arrays. | |
| bool | hdfCollOnMeta = true |
| Use collective HDF5 I/O for metadata (usually safe). | |
| int | jsonBinaryDeflateLevel = 5 |
| Compression level used by the JSON backend's binary codec. | |
| bool | jsonUseCodecOnUInt8 = true |
| Whether to apply the byte-codec to uint8 arrays in JSON (faster writes). | |
Config-backed factory selecting between JSON and HDF5 serializers.
Exposes the tunables of both backends under a single config schema so users can switch formats by changing one JSON field. See DNDS_DECLARE_CONFIG body for the full list of fields.
Definition at line 21 of file SerializerFactory.hpp.
|
default |
|
inline |
Construct with a specific backend name; other fields stay at defaults.
Definition at line 40 of file SerializerFactory.hpp.
|
inline |
Instantiate the selected serializer and apply its tunables.
| mpi | MPI context (used only by the H5 backend). |
Definition at line 59 of file SerializerFactory.hpp.
|
inline |
|
inline |
Expand a user-supplied base file name into the backend-specific path layout.
JSON uses one file per rank under a <name>.dir/ directory (<rank>.json); H5 produces a single <name>.dnds.h5 file.
| fname | Base name supplied by the user (without suffix). |
| mpi | MPI context (rank used for JSON per-rank filename). |
| rank_part_fmt | printf-style format used for the JSON rank-id component. |
| read | true for read (skips directory creation). |
(finalFilePath, displayPath) – the display path is the JSON dir or the H5 file, depending on backend. Definition at line 92 of file SerializerFactory.hpp.
| int DNDS::Serializer::SerializerFactory::hdfChunkSize = 0 |
HDF5 chunk size (0 = library-chosen auto).
Definition at line 28 of file SerializerFactory.hpp.
| bool DNDS::Serializer::SerializerFactory::hdfCollOnData = false |
Use collective HDF5 I/O for data arrays.
Definition at line 30 of file SerializerFactory.hpp.
| bool DNDS::Serializer::SerializerFactory::hdfCollOnMeta = true |
Use collective HDF5 I/O for metadata (usually safe).
Definition at line 32 of file SerializerFactory.hpp.
| int DNDS::Serializer::SerializerFactory::hdfDeflateLevel = 0 |
HDF5 gzip deflate level (0 = off, 9 = max).
Definition at line 26 of file SerializerFactory.hpp.
| int DNDS::Serializer::SerializerFactory::jsonBinaryDeflateLevel = 5 |
Compression level used by the JSON backend's binary codec.
Definition at line 34 of file SerializerFactory.hpp.
| bool DNDS::Serializer::SerializerFactory::jsonUseCodecOnUInt8 = true |
Whether to apply the byte-codec to uint8 arrays in JSON (faster writes).
Definition at line 36 of file SerializerFactory.hpp.
| std::string DNDS::Serializer::SerializerFactory::type = "JSON" |
Backend selector: "JSON" or "H5".
Definition at line 24 of file SerializerFactory.hpp.