Skip to content

Commit

Permalink
step 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Nov 9, 2023
1 parent 091fb4d commit c4905e6
Show file tree
Hide file tree
Showing 5 changed files with 477 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,25 @@ ThisBuild / tlSonatypeUseLegacyHost := false

// publish website from this branch
ThisBuild / tlSitePublishBranch := Some("main")
ThisBuild / scalaVersion := "3.4.0-RC1-bin-20231106-f61026d-NIGHTLY"
ThisBuild / scalaVersion := "3.3.1"

lazy val root = tlCrossRootProject.aggregate(core, tests)

lazy val core = crossProject(
JSPlatform,
JVMPlatform
// NativePlatform
).crossType(CrossType.Full)
)
.crossType(CrossType.Full)
.settings(
name := "vecxt",
description := """High performance extensions for numeric workloads for
- Array[Double] on JVM
- Array[Double] on native.
- Float64Array on JS"""
- Float64Array on JS""",
libraryDependencies ++= Seq(
"ai.dragonfly" %%% "narr" % "0.103"
)
)
.jvmSettings(
)
Expand Down
2 changes: 2 additions & 0 deletions core/js/src/main/scala/vecxt/array.extensions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import scala.scalajs.js
import scala.scalajs.js.typedarray.Float64Array
import scala.util.chaining.*

type NArray = Float64Array

extension (v: Float64Array)
inline def sort(): Unit = v.asInstanceOf[TypedArrayFacade].sort()
inline def reverse(): Unit = v.asInstanceOf[TypedArrayFacade].reverse()
Expand Down
2 changes: 2 additions & 0 deletions core/jvm/src/main/scala/vecxt/array.extensions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import vecxt.BoundsCheck
import vecxt.Limits.Limit
import vecxt.Retentions.Retention

type NArray = Array[Double]

extension (vec: Array[Boolean])
inline def countTrue: Int =
var sum = 0
Expand Down
Loading

0 comments on commit c4905e6

Please sign in to comment.