Function trx::write_positions_as_dtype
Defined in File trx.h
Function Documentation
-
void trx::write_positions_as_dtype(const AnyTrxFile &source, TrxScalarType target_dtype, const std::string &out_path, size_t chunk_bytes = 64 * 1024 * 1024)
Convert and write positions from
sourcetoout_pathintarget_dtype.Reads positions chunk-by-chunk (each chunk at most
chunk_bytesbytes of source data) and writes converted raw bytes toout_path. Peak transient memory is bounded to roughly one source chunk plus one destination chunk — independent of file size.- Parameters:
source – TRX file whose positions will be converted.
target_dtype – Desired output scalar type.
out_path – Path to write the raw converted positions binary.
chunk_bytes – Bytes of source data per conversion pass (default 64 MiB).