27 lines
523 B
Rust
27 lines
523 B
Rust
#![no_std]
|
|
#![no_main]
|
|
|
|
extern crate alloc;
|
|
|
|
use core::fmt::Write;
|
|
use nalgebra::SVector;
|
|
use num_traits::identities::Zero;
|
|
use pim_os::{pim::vector::F16x1, uart::Uart0};
|
|
|
|
const ROWS: usize = 2048;
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn main() {
|
|
let a = SVector::<F16x1, ROWS>::zeros();
|
|
let b = SVector::<F16x1, ROWS>::zeros();
|
|
let s = F16x1::zero();
|
|
|
|
for _ in 0..10 {
|
|
let a_s = a * s;
|
|
let c = a_s.component_mul(&b);
|
|
core::hint::black_box(c);
|
|
}
|
|
|
|
writeln!(Uart0, "Done").unwrap();
|
|
}
|