Skip to content

Commit

Permalink
clean up examples warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rdfriese committed Dec 1, 2023
1 parent 86fcff5 commit 52a3d90
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions examples/array_examples/array_batch_add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ fn main() {
let array = AtomicArray::<usize>::new(world.clone(), array_size, Distribution::Block); //non intrinsic atomic, non bitwise
//create vec of random indices between 0 & 1000000
let mut rng = rand::thread_rng();
let mut indices = (0..10_000_000)
let indices = (0..10_000_000)
.map(|_| rng.gen_range(0..array_size))
.collect::<Vec<_>>();
let vals = vec![1; 10_000_000];
// let _vals = vec![1; 10_000_000];

array.barrier();
let mut timer = std::time::Instant::now();
let timer = std::time::Instant::now();
array.batch_add(indices.clone(), 1);
if my_pe == 0 {
println!("{:?}", timer.elapsed());
Expand Down
10 changes: 5 additions & 5 deletions examples/array_examples/array_consumer_schedules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn reduce_with_schedule(
thread_cnts: Arc<Mutex<HashMap<ThreadId, usize>>>,
) {
let timer = Instant::now();
let tc = thread_cnts.clone();
let _tc = thread_cnts.clone();
let result = array.block_on(
array
.local_iter()
Expand All @@ -55,7 +55,7 @@ fn collect_with_schedule(
thread_cnts: Arc<Mutex<HashMap<ThreadId, usize>>>,
) {
let timer = Instant::now();
let tc = thread_cnts.clone();
let _tc = thread_cnts.clone();
let result = array.block_on(
array
.local_iter()
Expand All @@ -74,7 +74,7 @@ fn count_with_schedule(
thread_cnts: Arc<Mutex<HashMap<ThreadId, usize>>>,
) {
let timer = Instant::now();
let tc = thread_cnts.clone();
let _tc = thread_cnts.clone();
let result = array.block_on(
array
.local_iter()
Expand All @@ -92,7 +92,7 @@ fn sum_with_schedule(
thread_cnts: Arc<Mutex<HashMap<ThreadId, usize>>>,
) {
let timer = Instant::now();
let tc = thread_cnts.clone();
let _tc = thread_cnts.clone();
let result = array.block_on(
array
.local_iter()
Expand All @@ -107,7 +107,7 @@ fn sum_with_schedule(
fn main() {
let world = lamellar::LamellarWorldBuilder::new().build();
let _my_pe = world.my_pe();
let num_pes = world.num_pes();
let _num_pes = world.num_pes();
let block_array = AtomicArray::<usize>::new(world.team(), ARRAY_LEN, Distribution::Block);
block_array
.dist_iter_mut()
Expand Down
2 changes: 1 addition & 1 deletion examples/kernels/dft_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ fn main() {
}
world.barrier();

let ti_temp = ti;
let _ti_temp = ti;

// full_spectrum_array
// .dist_iter_mut()
Expand Down
1 change: 0 additions & 1 deletion examples/misc/lamellar_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
use lamellar::array::prelude::*;
use lamellar::darc::prelude::*;
use lamellar::lamellar_env::LamellarEnv;
use lamellar::memregion::prelude::*;

fn print_env<T: LamellarEnv>(env: &T) {
println!("my_pe: {}", env.my_pe());
Expand Down

0 comments on commit 52a3d90

Please sign in to comment.