pub struct DpMatrix { /* private fields */ }Expand description
SIMD-accelerated DP matrix
This matches the C++ SSEMatrix structure with the following layout:
- Elements (cells) are packed into SSE register vectors
- Vectors are packed into quartets (E, F, H, TMP)
- Quartets are packed into columns
The layout is optimized for SIMD operations:
Column 0: Column 1: Column 2:
+----+----+ +----+----+ +----+----+
| E0 | H0 | | E1 | H1 | | E2 | H2 |
+----+----+ +----+----+ +----+----+
| F0 | TMP| | F1 | TMP| | F2 | TMP|
+----+----+ +----+----+ +----+----+Implementations§
Source§impl DpMatrix
impl DpMatrix
Sourcepub fn init(&mut self, nrow: usize, ncol: usize, nvecperrow: usize)
pub fn init(&mut self, nrow: usize, ncol: usize, nvecperrow: usize)
Initialize the matrix with the given dimensions
§Arguments
nrow- Number of rows (query characters + 1)ncol- Number of columns (reference characters + 1)nvecperrow- Number of vectors per row
Sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Check if the matrix is initialized
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Get the matrix buffer as a mutable slice
Sourcepub fn evec_ptr(&self, row: usize, col: usize) -> usize
pub fn evec_ptr(&self, row: usize, col: usize) -> usize
Get a pointer to the E vector at the given row and column
This matches the C++ evec() method.
Sourcepub fn fvec_ptr(&self, row: usize, col: usize) -> usize
pub fn fvec_ptr(&self, row: usize, col: usize) -> usize
Get a pointer to the F vector at the given row and column
This matches the C++ fvec() method.
Sourcepub fn hvec_ptr(&self, row: usize, col: usize) -> usize
pub fn hvec_ptr(&self, row: usize, col: usize) -> usize
Get a pointer to the H vector at the given row and column
This matches the C++ hvec() method.
Sourcepub fn tmpvec_ptr(&self, row: usize, col: usize) -> usize
pub fn tmpvec_ptr(&self, row: usize, col: usize) -> usize
Get a pointer to the TMP vector at the given row and column
This matches the C++ tmpvec() method.
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Get the total size of the matrix in bytes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DpMatrix
impl RefUnwindSafe for DpMatrix
impl Send for DpMatrix
impl Sync for DpMatrix
impl Unpin for DpMatrix
impl UnsafeUnpin for DpMatrix
impl UnwindSafe for DpMatrix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more