Skip to content

Commit 8c04fe9

Browse files
committed
Cleaned up CUDA EventBuffer
1 parent 1c25397 commit 8c04fe9

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

necsim/impls/cuda/src/event_buffer.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -195,26 +195,13 @@ impl<ReportSpeciation: Boolean, ReportDispersal: Boolean>
195195
})
196196
}
197197

198-
#[allow(clippy::missing_panics_doc)] // TODO: remove
199198
pub fn report_events_unordered<P>(&mut self, reporter: &mut P)
200199
where
201200
P: Reporter<ReportSpeciation = ReportSpeciation, ReportDispersal = ReportDispersal>,
202201
{
203-
// let mut last_time = 0.0_f64;
204-
205-
// let mut times = alloc::vec::Vec::new();
206-
207202
for (mask, event) in self.event_mask.iter_mut().zip(self.event_buffer.iter()) {
208203
if *mask.read() {
209204
let event: TypedEvent = unsafe { event.read().assume_some_read() }.into();
210-
// let new_time: f64 = match &event {
211-
// TypedEvent::Speciation(speciation) => speciation.event_time,
212-
// TypedEvent::Dispersal(dispersal) => dispersal.event_time,
213-
// }
214-
// .get();
215-
// times.push(Some(new_time));
216-
// assert!(new_time >= last_time, "{new_time} {last_time}");
217-
// last_time = new_time;
218205

219206
match event {
220207
TypedEvent::Speciation(ref speciation) => {
@@ -224,14 +211,10 @@ impl<ReportSpeciation: Boolean, ReportDispersal: Boolean>
224211
reporter.report_dispersal(dispersal.into());
225212
},
226213
}
227-
} /*else {
228-
times.push(None);
229-
}*/
214+
}
230215

231216
mask.write(false);
232217
}
233-
234-
// panic!("{:?}", times);
235218
}
236219

237220
pub fn max_events_per_individual(&self) -> usize {

0 commit comments

Comments
 (0)