Expand description
Shared host-side logic for GPU alignment: sequence encoding, traceback reconstruction, and partitioning.
Structs§
- GpuAlign
Config - Configuration for GPU batch alignment.
- SeqIndex
- Index entry for one sequence pair on the GPU.
Constants§
- TB_DIAG
- Traceback direction encoding (4 bits per cell):
- TB_
E_ OPEN - TB_
F_ OPEN - TB_
H_ MASK - TB_LEFT
- TB_STOP
- TB_UP
Functions§
- encode_
base - Encode a nucleotide as a 2-bit value: A=0, C=1, G=2, T/U=3, other=0.
- encode_
pairs - Pack sequences into a contiguous buffer for GPU transfer. Returns (packed bytes, index entries).
- extract_
scoring_ params - Extract scoring parameters for GPU transfer (simple nucleotide mode).
- extract_
substitution_ matrix - Extract the 24x24 substitution matrix as a flat i32 array, or None for simple scoring.
- partition_
pairs - Partition pairs into those suitable for GPU (within bandwidth) and those that need CPU fallback.
- reconstruct_
alignment - Reconstruct an AlignmentResult from GPU traceback data for a single pair.