Skip to content
Snippets Groups Projects
Commit 04e41c17 authored by Russel Arbore's avatar Russel Arbore
Browse files

just use aligned-vec directly in test crates

parent b00cd2bb
No related branches found
No related tags found
1 merge request!190Set up cava benchmark
Pipeline #201766 failed
This commit is part of merge request !190. Comments created here will be created in the context of that merge request.
......@@ -670,6 +670,7 @@ dependencies = [
name = "dot"
version = "0.1.0"
dependencies = [
"aligned-vec",
"async-std",
"clap",
"hercules_rt",
......
......@@ -17,3 +17,4 @@ hercules_rt = { path = "../../hercules_rt" }
rand = "*"
async-std = "*"
with_builtin_macros = "0.1.0"
aligned-vec = "*"
......@@ -4,14 +4,16 @@
use hercules_rt::CUDABox;
use hercules_rt::{runner, HerculesImmBox, HerculesImmBoxTo};
use aligned_vec::ABox;
juno_build::juno!("dot");
fn main() {
async_std::task::block_on(async {
let a: [f32; 8] = [0.0, 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0];
let b: [f32; 8] = [0.0, 5.0, 0.0, 6.0, 0.0, 7.0, 0.0, 8.0];
let a = HerculesImmBox::from(&a as &[f32]);
let b = HerculesImmBox::from(&b as &[f32]);
let a: ABox<[f32; 8]> = ABox::new(32, [0.0, 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0]);
let b: ABox<[f32; 8]> = ABox::new(32, [0.0, 5.0, 0.0, 6.0, 0.0, 7.0, 0.0, 8.0]);
let a = HerculesImmBox::from(a.as_ref() as &[f32]);
let b = HerculesImmBox::from(b.as_ref() as &[f32]);
let mut r = runner!(dot);
let c = r.run(8, a.to(), b.to()).await;
println!("{}", c);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment