Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Dec 19, 2024
1 parent 580692f commit 760cb84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions vecxt/jvm/src/arrays.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import jdk.incubator.vector.ByteVector
import jdk.incubator.vector.DoubleVector
import jdk.incubator.vector.VectorOperators
import jdk.incubator.vector.IntVector
import jdk.incubator.vector.VectorMask
import scala.reflect.ClassTag

object arrays:
Expand Down Expand Up @@ -205,6 +206,11 @@ object arrays:

inline def increments: Array[Int] =
val out = new Array[Int](vec.length)
val limit = spi.loopBound(vec.length - 2)
// val inc = spil - 1
// val maskInit = spi.maskAll(true).toArray()
// maskInit(maskInit.length - 1) = false
// val mask = VectorMask.fromArray(spi, maskInit, 0)

var i = 1
while i < spi.loopBound(vec.length - 2) do
Expand Down
2 changes: 1 addition & 1 deletion vecxt/test/src/intarray.test.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class IntArrayExtensionSuite extends munit.FunSuite:
assertEquals(v1.sum, 45)
}

test("increments") {
test("increments".only) {

val v1 = NArray[Int](1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
v1.increments.foreach(d => assertEquals(d, 1))
Expand Down

0 comments on commit 760cb84

Please sign in to comment.