Skip to content

Commit

Permalink
"Auto commit number 46"
Browse files Browse the repository at this point in the history
  • Loading branch information
lat-murmeldjur committed Apr 13, 2024
1 parent 15a2e8d commit bf121ea
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion chronicl.dt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
45
46
2 changes: 1 addition & 1 deletion featuring.dt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
45
46
1 change: 1 addition & 0 deletions ohio.note
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ Year::2024::|::Month::04::|::Day::12::|::Hour::15::|::Minute::31::|::Second::39:
Year::2024::|::Month::04::|::Day::12::|::Hour::15::|::Minute::35::|::Second::00::
Year::2024::|::Month::04::|::Day::12::|::Hour::17::|::Minute::11::|::Second::23::
Year::2024::|::Month::04::|::Day::12::|::Hour::17::|::Minute::19::|::Second::01::
Year::2024::|::Month::04::|::Day::13::|::Hour::12::|::Minute::03::|::Second::23::
44 changes: 23 additions & 21 deletions src/anomaly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,34 @@ pub fn interact(anom: &mut Anomaly) {
sym = true;
}
for i in 1..=kl2 {
let mut skip: HashSet<usize> = HashSet::new();
let mut done: HashSet<usize> = HashSet::new();
let mut exit_level = false;

while !exit_level {
let mut pull: HashMap<usize, usize> = HashMap::new();
let mut done: HashSet<usize> = HashSet::new();
let mut skip: HashSet<usize> = HashSet::new();

let mut firstopen: usize = 0;
let mut instructions_chan: Vec<mpsc::Sender<&mut Anomaly>> = vec![];

for k in 0..anom.anomaly.len() {
let pair = modular_offset_in_range(k as u32, i as u32, 0, (klen - 1) as u32);
if !done.contains(&k) && !skip.contains(&k) && !skip.contains(&(pair as usize)) {
pull.insert(k, firstopen);
pull.insert(pair as usize, firstopen);
firstopen += 1;
done.insert(k);
skip.insert(k);
skip.insert(pair as usize);
if sym && i == kl2 {
done.insert(pair as usize);
}
}
}

thread::scope(|s| {
let mut handles: Vec<thread::ScopedJoinHandle<()>> = vec![];
for _ in 0..kl2 {
for _ in 0..pull.len() / 2 {
let (tx, rx) = mpsc::channel();
instructions_chan.push(tx);
let handle = s.spawn(move || {
Expand All @@ -82,27 +99,12 @@ pub fn interact(anom: &mut Anomaly) {
handles.push(handle);
}

let mut firstopen: usize = 0;
//

for k in 0..anom.anomaly.len() {
let pair = modular_offset_in_range(k as u32, i as u32, 0, (klen - 1) as u32);
if !done.contains(&k) && !skip.contains(&k) && !skip.contains(&(pair as usize))
{
pull.insert(k, firstopen);
pull.insert(pair as usize, firstopen);
firstopen += 1;
done.insert(k);
skip.insert(k);
skip.insert(pair as usize);
if sym && i == kl2 {
done.insert(pair as usize);
}
}
}

for (k, a) in anom.anomaly.iter_mut().enumerate() {
instructions_chan[pull[&k]].send(a).unwrap();
if pull.contains_key(&k) {
instructions_chan[pull[&k]].send(a).unwrap();
}
}

for h in handles {
Expand Down

0 comments on commit bf121ea

Please sign in to comment.