cuDDL
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
a48.hpp File Reference
#include <atomic>
#include <cstdint>
#include <exception>
#include <optional>
#include <string>
#include <string_view>
#include <thread>
#include <vector>
#include <cuddl/error.hpp>
Include dependency graph for a48.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cuddl::a48::database_metadata
 Per-database construction metadata decoded from the A48 file-level header. More...
 
struct  cuddl::a48::record_metadata
 Metadata attached to one decoded A48 record. More...
 
struct  cuddl::a48::record
 One decoded DDL score row plus its stable record identity and construction metadata. More...
 
struct  cuddl::a48::database
 Fully decoded A48 reference database. More...
 
struct  cuddl::a48::row_summary
 Exact bucket-classification counts for one decoded row pair. More...
 
struct  cuddl::a48::oracle_result
 Independent host oracle for one query over a decoded reference database. More...
 

Namespaces

namespace  cuddl
 Batch operations over contiguous device rows.
 
namespace  cuddl::a48
 
namespace  cuddl::a48::detail
 

Functions

std::optional< uint64_t > cuddl::a48::decode_a48_token (std::string_view token)
 Decodes one A48 (base-64, ASCII-offset-48) token to its integer value.
 
std::string cuddl::a48::encode_a48_token (uint64_t value)
 Encodes an integer as an A48 (base-64, ASCII-offset-48) token.
 
uint16_t cuddl::a48::promote_score (uint16_t loaded, int32_t offset, uint8_t exponent_bits)
 Reconstructs one absolute 16-bit bucket maxima from an A48-decoded value.
 
std::vector< std::string_view > cuddl::a48::split_fields (std::string_view text, char separator, bool keep_trailing_empty=false)
 Splits text on separator.
 
template<typename T , typename Parser >
Result< T > cuddl::a48::detail::parse_field (Parser &&parser, std::string_view value, char const *field)
 Parses a header field with parser, converting any thrown exception into an error.
 
bool cuddl::a48::is_record_header (std::string_view key)
 True when key is a record-level header (part of a record block) rather than a file-level header that precedes every record.
 
Result< record_metadata > cuddl::a48::parse_record_headers (std::string_view block)
 Parses a record header block (one "#key\tvalue" per line) into record_metadata.
 
Result< std::vector< uint16_t > > cuddl::a48::decode_a48_row (std::string_view row, record_metadata const &metadata, uint8_t exponent_bits)
 Decodes one A48 data row into absolute 16-bit bucket scores.
 
Result< database > cuddl::a48::decode_a48_tsv (std::string_view input)
 Decodes an uncompressed A48-encoded DDL TSV into score rows and metadata.
 
Result< database > cuddl::a48::decode_a48_tsv_parallel (std::string_view input, unsigned requested_threads=std::thread::hardware_concurrency())
 Multithreaded variant of decode_a48_tsv.
 
oracle_result cuddl::a48::exhaustive_oracle (std::vector< uint16_t > const &rows, std::vector< uint16_t > const &query, size_t bucket_count, uint32_t minimum_matches)
 Exact match counts and pair summaries for one flat query row.
 
oracle_result cuddl::a48::exhaustive_oracle (std::vector< std::vector< uint16_t > > const &rows, std::vector< uint16_t > const &query, uint32_t minimum_matches)
 Convenience overload over decoded records instead of one flat score array.