Files
pim-rs/pim-os/src/bin/classic/matrix_matrix_multiply.rs

24 lines
503 B
Rust

#![no_std]
#![no_main]
extern crate alloc;
use core::fmt::Write;
use nalgebra::SMatrix;
use pim_os::{pim::vector::F16x1, uart::Uart0};
#[no_mangle]
pub extern "C" fn main() {
let matrices0 = [SMatrix::<F16x1, 8, 8>::zeros(); 512];
let matrices1 = [SMatrix::<F16x1, 8, 8>::zeros(); 512];
for _ in 0..100 {
for i in 0..512 {
let matrix2 = matrices0[i] * matrices1[i];
core::hint::black_box(matrix2);
}
}
writeln!(Uart0, "Done").unwrap();
}