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

Function zero_matrix

tests/math.rs:39–41  ·  view source on GitHub ↗

Helper function to create zero matrix for testing GEMV and GEMM

(size: usize)

Source from the content-addressed store, hash-verified

37
38 // Helper function to create zero matrix for testing GEMV and GEMM
39 fn zero_matrix(size: usize) -> Vec<[f32; VECTOR_SIZE]> {
40 vec![[0.0; VECTOR_SIZE]; size]
41 }
42
43 // Helper function to create a matrix of ones for testing GEMV and GEMM
44 fn one_matrix(size: usize) -> Vec<[f32; VECTOR_SIZE]> {

Callers 4

test_gemm_identityFunction · 0.85
test_gemv_zeroFunction · 0.85
test_gemm_zeroFunction · 0.85
test_gemm_onesFunction · 0.85

Calls

no outgoing calls

Tested by 4

test_gemm_identityFunction · 0.68
test_gemv_zeroFunction · 0.68
test_gemm_zeroFunction · 0.68
test_gemm_onesFunction · 0.68