Skip to content

Commit 48487d6

Browse files
committed
feat(probe): add DMAT verification probe with 64 entries
Implements RFC-0113 DMAT verification probe: - 64 probe entries matching Python reference exactly - Merkle tree construction with SHA256 - Root matches canonical: 045cf8d1f50e5e67be8d8e63a76be93a40cfc383289a68b8aa585c7244a86b31 - Full encoding: matrices, vectors, scalars, TRAP sentinels Test: 354 total tests pass, clippy clean
1 parent f389dcb commit 48487d6

3 files changed

Lines changed: 1233 additions & 5 deletions

File tree

determin/src/dmat.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -727,9 +727,7 @@ pub fn mat_scale<T: NumericScalar>(a: &DMat<T>, scalar: &T) -> Result<DMat<T>, D
727727
let mut result_data = Vec::with_capacity(rows * cols);
728728
for i in 0..rows {
729729
for j in 0..cols {
730-
let product = a.data[i * cols + j]
731-
.mul(scalar)
732-
.map_err(|e| e.into())?;
730+
let product = a.data[i * cols + j].mul(scalar).map_err(|e| e.into())?;
733731
result_data.push(product);
734732
}
735733
}
@@ -1773,7 +1771,10 @@ mod tests {
17731771
];
17741772
let scalar = Dqa::new(2, 0).unwrap();
17751773
let a = DMat::new(2, 2, a_data).unwrap();
1776-
assert!(matches!(mat_scale(&a, &scalar), Err(DmatError::ScaleMismatch)));
1774+
assert!(matches!(
1775+
mat_scale(&a, &scalar),
1776+
Err(DmatError::ScaleMismatch)
1777+
));
17771778
}
17781779

17791780
#[test]
@@ -1782,7 +1783,10 @@ mod tests {
17821783
let a_data = vec![Dqa::new(1, 10).unwrap(); 4];
17831784
let scalar = Dqa::new(1, 10).unwrap();
17841785
let a = DMat::new(2, 2, a_data).unwrap();
1785-
assert!(matches!(mat_scale(&a, &scalar), Err(DmatError::InvalidScale)));
1786+
assert!(matches!(
1787+
mat_scale(&a, &scalar),
1788+
Err(DmatError::InvalidScale)
1789+
));
17861790
}
17871791

17881792
#[test]

0 commit comments

Comments
 (0)