Skip to content

Commit

Permalink
🥷 fix loop bound type
Browse files Browse the repository at this point in the history
  • Loading branch information
tjake committed Sep 29, 2023
1 parent 47c43b5 commit ed8babb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ static float assembleAndSum512(float[] data, int dataBase, byte[] baseOffsets) {
int[] convOffsets = scratchInt512.get();
FloatVector sum = FloatVector.zero(FloatVector.SPECIES_512);
int i = 0;
int limit = FloatVector.SPECIES_128.loopBound(baseOffsets.length);
int limit = ByteVector.SPECIES_128.loopBound(baseOffsets.length);

for (; i < limit; i += ByteVector.SPECIES_128.length()) {
var scale = IntVector.zero(IntVector.SPECIES_512).addIndex(1).add(i).mul(dataBase);
Expand Down Expand Up @@ -583,7 +583,7 @@ static float assembleAndSum256(float[] data, int dataBase, byte[] baseOffsets) {
int[] convOffsets = scratchInt256.get();
FloatVector sum = FloatVector.zero(FloatVector.SPECIES_256);
int i = 0;
int limit = FloatVector.SPECIES_64.loopBound(baseOffsets.length);
int limit = ByteVector.SPECIES_64.loopBound(baseOffsets.length);

for (; i < limit; i += ByteVector.SPECIES_64.length()) {
var scale = IntVector.zero(IntVector.SPECIES_256).addIndex(1).add(i).mul(dataBase);
Expand Down

0 comments on commit ed8babb

Please sign in to comment.