Skip to content

Commit 81f546b

Browse files
committed
Fix SIMD when pixel counts aren't divisible by 8
1 parent 22f20b2 commit 81f546b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

patches/api/0005-Optimize-map-rendering.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ classes and methods added by this patch should NOT be used in plugins.
88

99
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java b/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java
1010
new file mode 100644
11-
index 0000000000000000000000000000000000000000..48b67864752d6da4e2cc626e746eeb7c32b6524f
11+
index 0000000000000000000000000000000000000000..2341b564b6383d5eca5fafe80273e046bfea070e
1212
--- /dev/null
1313
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java
1414
@@ -0,0 +1,79 @@
@@ -27,7 +27,7 @@ index 0000000000000000000000000000000000000000..48b67864752d6da4e2cc626e746eeb7c
2727
+ public static void matchColorVectorized(int[] in, byte[] out) {
2828
+ int speciesLength = IntVector.SPECIES_256.length();
2929
+ int i;
30-
+ for (i = 0; i < in.length; i += speciesLength) {
30+
+ for (i = 0; i < in.length - speciesLength; i += speciesLength) {
3131
+ float[] redsArr = new float[speciesLength];
3232
+ float[] bluesArr = new float[speciesLength];
3333
+ float[] greensArr = new float[speciesLength];

0 commit comments

Comments
 (0)