Skip to content

Commit 52a3d90

Browse files
committed
clean up examples warnings
1 parent 86fcff5 commit 52a3d90

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

examples/array_examples/array_batch_add.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ fn main() {
3131
let array = AtomicArray::<usize>::new(world.clone(), array_size, Distribution::Block); //non intrinsic atomic, non bitwise
3232
//create vec of random indices between 0 & 1000000
3333
let mut rng = rand::thread_rng();
34-
let mut indices = (0..10_000_000)
34+
let indices = (0..10_000_000)
3535
.map(|_| rng.gen_range(0..array_size))
3636
.collect::<Vec<_>>();
37-
let vals = vec![1; 10_000_000];
37+
// let _vals = vec![1; 10_000_000];
3838

3939
array.barrier();
40-
let mut timer = std::time::Instant::now();
40+
let timer = std::time::Instant::now();
4141
array.batch_add(indices.clone(), 1);
4242
if my_pe == 0 {
4343
println!("{:?}", timer.elapsed());

examples/array_examples/array_consumer_schedules.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fn reduce_with_schedule(
3636
thread_cnts: Arc<Mutex<HashMap<ThreadId, usize>>>,
3737
) {
3838
let timer = Instant::now();
39-
let tc = thread_cnts.clone();
39+
let _tc = thread_cnts.clone();
4040
let result = array.block_on(
4141
array
4242
.local_iter()
@@ -55,7 +55,7 @@ fn collect_with_schedule(
5555
thread_cnts: Arc<Mutex<HashMap<ThreadId, usize>>>,
5656
) {
5757
let timer = Instant::now();
58-
let tc = thread_cnts.clone();
58+
let _tc = thread_cnts.clone();
5959
let result = array.block_on(
6060
array
6161
.local_iter()
@@ -74,7 +74,7 @@ fn count_with_schedule(
7474
thread_cnts: Arc<Mutex<HashMap<ThreadId, usize>>>,
7575
) {
7676
let timer = Instant::now();
77-
let tc = thread_cnts.clone();
77+
let _tc = thread_cnts.clone();
7878
let result = array.block_on(
7979
array
8080
.local_iter()
@@ -92,7 +92,7 @@ fn sum_with_schedule(
9292
thread_cnts: Arc<Mutex<HashMap<ThreadId, usize>>>,
9393
) {
9494
let timer = Instant::now();
95-
let tc = thread_cnts.clone();
95+
let _tc = thread_cnts.clone();
9696
let result = array.block_on(
9797
array
9898
.local_iter()
@@ -107,7 +107,7 @@ fn sum_with_schedule(
107107
fn main() {
108108
let world = lamellar::LamellarWorldBuilder::new().build();
109109
let _my_pe = world.my_pe();
110-
let num_pes = world.num_pes();
110+
let _num_pes = world.num_pes();
111111
let block_array = AtomicArray::<usize>::new(world.team(), ARRAY_LEN, Distribution::Block);
112112
block_array
113113
.dist_iter_mut()

examples/kernels/dft_proxy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ fn main() {
849849
}
850850
world.barrier();
851851

852-
let ti_temp = ti;
852+
let _ti_temp = ti;
853853

854854
// full_spectrum_array
855855
// .dist_iter_mut()

examples/misc/lamellar_env.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
use lamellar::array::prelude::*;
33
use lamellar::darc::prelude::*;
44
use lamellar::lamellar_env::LamellarEnv;
5-
use lamellar::memregion::prelude::*;
65

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

0 commit comments

Comments
 (0)