Skip to content

Commit

Permalink
add assumption comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SirYwell committed Sep 11, 2024
1 parent 628e042 commit 9b25f64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public synchronized void filter(final Filter filter) {
char[] setArr = this.setArr;
assert setArr != null;
char[] getArr = this.getArr;
// assume setArr.length == getArr.length == 4096
for (int i = 0; i < 4096; i += species.length()) {
ShortVector set = ShortVector.fromCharArray(species, setArr, i);
ShortVector get = ShortVector.fromCharArray(species, getArr, i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ default void processChunks(IChunk chunk, IChunkGet get, IChunkSet set) {

default void processSection(int layer, char[] set, char[] get) {
final VectorSpecies<Short> species = ShortVector.SPECIES_PREFERRED;
// assume that set.length % species.elementSize() == 0
for (int i = 0; i < set.length; i += species.length()) {
ShortVector vectorSet = ShortVector.fromCharArray(species, set, i);
ShortVector vectorGet = ShortVector.fromCharArray(species, get, i);
Expand Down

0 comments on commit 9b25f64

Please sign in to comment.