Helper function to create identity matrix for testing GEMV and GEMM
(size: usize)
| 28 | |
| 29 | // Helper function to create identity matrix for testing GEMV and GEMM |
| 30 | fn identity_matrix(size: usize) -> Vec<[f32; VECTOR_SIZE]> { |
| 31 | let mut matrix = vec![[0.0; VECTOR_SIZE]; size]; |
| 32 | for i in 0..size { |
| 33 | matrix[i][i] = 1.0; |
| 34 | } |
| 35 | matrix |
| 36 | } |
| 37 | |
| 38 | // Helper function to create zero matrix for testing GEMV and GEMM |
| 39 | fn zero_matrix(size: usize) -> Vec<[f32; VECTOR_SIZE]> { |
no outgoing calls