Skip to content

Commit 63f4143

Browse files
committed
.
1 parent 3663fc4 commit 63f4143

3 files changed

Lines changed: 12 additions & 10 deletions

File tree

build.mill

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ object V {
2727
val spire = "0.18.0"
2828
val laminar = "17.2.0"
2929
val scalatags = "0.13.1"
30+
val scalaVersion = "3.7.0"
31+
val munitVersion = "1.1.1"
3032
}
3133

3234
trait Common extends ScalaModule with PublishModule with ScalafixModule {
33-
def scalaVersion = "3.6.2"
35+
def scalaVersion = V.scalaVersion
3436

3537
def publishVersion = VcsVersion.vcsState().format()
3638

@@ -59,7 +61,7 @@ trait Common extends ScalaModule with PublishModule with ScalafixModule {
5961
val vecIncubatorFlag = Seq("""--add-modules=jdk.incubator.vector""")
6062

6163
trait CommonJS extends ScalaJSModule {
62-
def scalaJSVersion = "1.18.2"
64+
def scalaJSVersion = "1.19.0"
6365
// def ivyDeps = super.ivyDeps() ++ Seq(ivy"com.raquo::ew::0.2.0")
6466
// def moduleKind = ModuleKind.
6567
}
@@ -69,12 +71,12 @@ trait CommonNative extends ScalaNativeModule {
6971
def ivyDeps = super.ivyDeps() ++ Agg(
7072
ivy"org.ekrich::sblas::0.7.0"
7173
)
72-
def scalaNativeVersion: mill.T[String] = "0.5.5"
74+
def scalaNativeVersion: mill.T[String] = "0.5.7"
7375
}
7476

7577
trait CommonTests extends TestModule.Munit {
7678
def ivyDeps = super.ivyDeps() ++ Agg(
77-
ivy"org.scalameta::munit::1.1.0",
79+
ivy"org.scalameta::munit:${V.munitVersion}",
7880
)
7981
}
8082

vecxt/src/MatrixHelper.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ object MatrixHelper:
108108
case _: Double => 0.0.asInstanceOf[A]
109109
case _: Boolean => false.asInstanceOf[A]
110110
case _: Int => 0.asInstanceOf[A]
111-
case _: A => error("Unsupported type")
111+
case _: A => error("Vecxt: call to eye for an unsupported type")
112112
end match
113113
end zero
114114

@@ -117,7 +117,7 @@ object MatrixHelper:
117117
case _: Double => 1.0.asInstanceOf[A]
118118
case _: Boolean => true.asInstanceOf[A]
119119
case _: Int => 1.asInstanceOf[A]
120-
case _: A => error("Unsupported type")
120+
case _: A => error("Vecxt: call to one for an unsupported type")
121121
end match
122122
end one
123123

@@ -126,21 +126,21 @@ object MatrixHelper:
126126
case _: Int => eyeOf(one[A], dim)(zero[A])
127127
case _: Double => eyeOf(one[A], dim)(zero[A])
128128
case _: Boolean => eyeOf(one[A], dim)(zero[A])
129-
case _ => error("Unsupported eye type")
129+
case _ => error("Vecxt: call to eye for an unsupported type")
130130

131131
inline def eye[A: ClassTag](dim: RowCol): Matrix[A] =
132132
inline erasedValue[A] match
133133
case _: Int => eyeOf(one[A], dim)(zero[A])
134134
case _: Double => eyeOf(one[A], dim)(zero[A])
135135
case _: Boolean => eyeOf(one[A], dim)(zero[A])
136-
case _ => error("Unsupported eye type")
136+
case _ => error("Vecxt: call to eye for an unsupported type")
137137

138138
inline def ones[A: ClassTag](dim: RowCol): Matrix[A] =
139139
inline erasedValue[A] match
140140
case _: Int => fill(one[A], dim)
141141
case _: Double => fill(one[A], dim)
142142
case _: Boolean => fill(one[A], dim)
143-
case _ => error("Unsupported type for ones")
143+
case _ => error("Vecxt: call to `ones` is for an unsupported type")
144144

145145
inline def fill[A](singleton: A, dim: RowCol)(using ClassTag[A]): Matrix[A] =
146146
val (rows, cols) = dim

vecxt/src/MatrixInstance.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ object MatrixInstance:
109109
* @param ct
110110
* @return
111111
*/
112-
inline def apply(indexes: Array[RowCol])(using inline boundsCheck: BoundsCheck, ct: ClassTag[A]): Matrix[A] =
112+
inline def apply(indexes: NArray[RowCol])(using inline boundsCheck: BoundsCheck, ct: ClassTag[A]): Matrix[A] =
113113
val newMat = Matrix.zeros(m.shape)
114114
var i = 0
115115
while i < indexes.length do

0 commit comments

Comments
 (0)