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

Function test_gemm_ones

tests/math.rs:98–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 // Test GEMM with one matrix
97 #[test]
98 fn test_gemm_ones() {
99 let matrix_a = one_matrix(VECTOR_SIZE);
100 let matrix_b = one_matrix(VECTOR_SIZE);
101 let mut result_matrix = zero_matrix(VECTOR_SIZE);
102 gemm::gemm(&matrix_a, &matrix_b, &mut result_matrix);
103 let expected_result: Vec<[f32; VECTOR_SIZE]> =
104 vec![[VECTOR_SIZE as f32; VECTOR_SIZE]; VECTOR_SIZE];
105 assert_eq!(result_matrix, expected_result);
106 }
107}

Callers

nothing calls this directly

Calls 3

one_matrixFunction · 0.85
zero_matrixFunction · 0.85
gemmFunction · 0.85

Tested by

no test coverage detected