MCPcopy Create free account
hub / github.com/PerroEngine/Perro / mul_f32

Method mul_f32

perro_source/core/perro_structs/src/structs/matrix/mod.rs:1289–1313  ·  view source on GitHub ↗
(self, rhs: Matrix<COLS, K, f32>)

Source from the content-addressed store, hash-verified

1287
1288 #[inline]
1289 pub fn mul_f32<const K: usize>(self, rhs: Matrix<COLS, K, f32>) -> Matrix<ROWS, K, f32> {
1290 if ROWS == 2 && COLS == 2 && K == 2 {
1291 return Matrix(matrix_from_rows_2(
1292 (Matrix2::from_rows(matrix_rows_2(self.0))
1293 * Matrix2::from_rows(matrix_rows_2(rhs.0)))
1294 .to_rows(),
1295 ));
1296 }
1297 if ROWS == 3 && COLS == 3 && K == 3 {
1298 return Matrix(matrix_from_rows_3(
1299 (Matrix3::from_rows(matrix_rows_3(self.0))
1300 * Matrix3::from_rows(matrix_rows_3(rhs.0)))
1301 .to_rows(),
1302 ));
1303 }
1304 if ROWS == 4 && COLS == 4 && K == 4 {
1305 return Matrix(matrix_from_rows_4(
1306 (Matrix4::from_rows(matrix_rows_4(self.0))
1307 * Matrix4::from_rows(matrix_rows_4(rhs.0)))
1308 .to_rows(),
1309 ));
1310 }
1311
1312 self.mul_f32_transposed(rhs)
1313 }
1314
1315 #[inline]
1316 pub fn mul_f32_transposed<const K: usize>(

Callers 3

bench_matrix_huge_opsFunction · 0.80
mulMethod · 0.80

Calls 9

MatrixClass · 0.85
matrix_from_rows_2Function · 0.85
matrix_rows_2Function · 0.85
matrix_from_rows_3Function · 0.85
matrix_rows_3Function · 0.85
matrix_from_rows_4Function · 0.85
matrix_rows_4Function · 0.85
to_rowsMethod · 0.80
mul_f32_transposedMethod · 0.80

Tested by

no test coverage detected