Skip to content

Commit

Permalink
Duplicate signal strength to all outputs (#129)
Browse files Browse the repository at this point in the history
* decrease size of DirectLink to 4 bytes

* duplicate signal strength to all outputs
This allows input states to be checked with simd
because the input nodes don't need to be fetched

* cleanup old code

* remove erroring line

* make index of NodeId private again

* Make TickScheduler::NUM_QUEUES constant

* remove from_ne_bytes from last_index_positive

* only get needed repeater inputs

* replace magic number with NUM_QUEUES

* don't crash the program when ss is larger than 15
when creating a forward link

* fix minor typo

* rename INPUT_MASK to BOOL_INPUT_MASK

* Run cargo fmt

* address nits

* Add check for maximum inputs.
This isn't really neccesary right now but if we ever add optimizations which combine nodes it might become likely that a node will have more than 255 inputs.

* make poper use of input counters in from_compile_node

* Make clamp_weights pass mandatory

* Use get_unchecked_mut() for incrementing signal strength counters

* skip updating if output power did not change

* wrap input arrays into a struct to ensure they are aligned

* run cargo fmt
  • Loading branch information
BramOtte authored Dec 14, 2023
1 parent 9767ca0 commit 6ae0623
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 87 deletions.
Loading

0 comments on commit 6ae0623

Please sign in to comment.