I/O routines
ElemCo.MIO — ModuleEC-specific IO routines
Use to store arrays in a file, and to load them back. Use memory-maps to store and load large arrays.
Exported functions
ElemCo.MIO.mioclosemmap — Methodmioclosemmap(io::IO, array::AbstractArray)Close memory-map file and flush to disk.
ElemCo.MIO.mioflushmmap — Methodmioflushmmap(io::IO, array::AbstractArray)Flush memory-map file to disk.
ElemCo.MIO.mioload! — Methodmioload!(fname::String, arrs::AbstractArray{T,N}...; skip_error=false)Load arrays from a file fname into pre-allocated arrays arrs. Return true if successful, false otherwise. If skip_error is set to true, the function will not throw an error if the type of the data/number of dimensions in the file does not match T/N.
ElemCo.MIO.mioload — Methodmioload(fname::String; array_of_arrays = false)Load arrays from a file fname.
Return an array of arrays. If there is only one array - return array itself (unless array_of_arrays is set to true).
ElemCo.MIO.mioload — Methodmioload(fname::String, ::Val{N}, T::Type=Float64; skip_error=false) where {N}Type-stable load arrays from a file fname.
Return an array of arrays. All arrays have the same type T and have N dimensions. For N = 1, return vectors even if the original array was a multi-dimensional array. If skip_error is set to true, the function will not throw an error if the type of the data/number of dimensions in the file does not match T/N and an array with one empty Array{T,N} will be returned.
ElemCo.MIO.miommap — Methodmiommap(fname::String)Memory-map an existing file for reading. Return a pointer to the file and the mmaped array.
ElemCo.MIO.mionewmmap — Methodmionewmmap(fname::String, dims::Tuple{Vararg{Int}}, Type=Float64)Create a new memory-map file for writing (overwrites existing file). Return a pointer to the file and the mmaped array.
ElemCo.MIO.miosave — Methodmiosave(fname::String,arrs::AbstractArray{T}...) where TSave arrays arrs in a file fname.