|
cuDDL
|
Read-only contiguous file payload for in-memory FASTX parsing. More...
#include <fastx_sequence_file.hpp>
Public Member Functions | |
| fastx_mapped_file ()=default | |
| fastx_mapped_file (fastx_mapped_file const &)=delete | |
| fastx_mapped_file & | operator= (fastx_mapped_file const &)=delete |
| fastx_mapped_file (fastx_mapped_file &&other) noexcept | |
| fastx_mapped_file & | operator= (fastx_mapped_file &&other) noexcept |
| ~fastx_mapped_file () | |
| std::string_view | data () const noexcept |
| Contiguous read-only file bytes. | |
| bool | empty () const noexcept |
| True when the file is empty or load produced no bytes. | |
Static Public Member Functions | |
| static Result< std::unique_ptr< fastx_mapped_file > > | load (std::string const &path, bool read=false, bool direct=false) |
| Maps or reads a file. | |
Read-only contiguous file payload for in-memory FASTX parsing.
On Linux a plain file is memory-mapped by default, so FASTA extents reference the mapping with no copy, or read into memory it owns on request. Other platforms always read.
Definition at line 254 of file fastx_sequence_file.hpp.
|
default |
|
delete |
|
inlinenoexcept |
Definition at line 259 of file fastx_sequence_file.hpp.
|
inline |
Definition at line 281 of file fastx_sequence_file.hpp.
|
inlinenoexcept |
Contiguous read-only file bytes.
Definition at line 316 of file fastx_sequence_file.hpp.
|
inlinenoexcept |
True when the file is empty or load produced no bytes.
Definition at line 321 of file fastx_sequence_file.hpp.
|
inlinestatic |
Maps or reads a file.
Empty files succeed with empty data. Any failure carries the reason; the FASTX loader maps it to its stable "cannot open" error.
| read | Read into owned memory instead of mapping. Unmapping write-locks the address space and shoots down TLBs on every core, which serialises a consumer that frees files loaded by dozens of threads; a single thread mapping ahead of others is better off mapping. |
| direct | Read with O_DIRECT, as read_whole_file does. |
Definition at line 297 of file fastx_sequence_file.hpp.
|
inlinenoexcept |
Definition at line 263 of file fastx_sequence_file.hpp.
|
delete |