MCPcopy Create free account
hub / github.com/carsonpo/haystackdb / test_gemm_identity

Function test_gemm_identity

tests/math.rs:59–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57 // Test GEMM with identity matrix
58 #[test]
59 fn test_gemm_identity() {
60 let matrix_a = identity_matrix(VECTOR_SIZE);
61 let matrix_b = identity_matrix(VECTOR_SIZE);
62 let mut result_matrix = zero_matrix(VECTOR_SIZE);
63 gemm::gemm(&matrix_a, &matrix_b, &mut result_matrix);
64 assert_eq!(result_matrix, identity_matrix(VECTOR_SIZE));
65 }
66
67 // Test GEMV with zero matrix
68 #[test]

Callers

nothing calls this directly

Calls 3

identity_matrixFunction · 0.85
zero_matrixFunction · 0.85
gemmFunction · 0.85

Tested by

no test coverage detected