Compare commits
5 Commits
dev
...
beta/kotli
Author | SHA1 | Date | |
---|---|---|---|
8f55d89daf | |||
7064546f83 | |||
8a453bf0b9 | |||
0a90d2e8c9 | |||
07aeec6dfb |
@ -19,6 +19,14 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
|
jvmToolchain(17)
|
||||||
|
|
||||||
|
compilerOptions {
|
||||||
|
optIn.addAll(
|
||||||
|
"space.kscience.kmath.UnstableKMathAPI"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
jvm()
|
jvm()
|
||||||
|
|
||||||
js(IR) {
|
js(IR) {
|
||||||
@ -58,7 +66,7 @@ kotlin {
|
|||||||
implementation(project(":kmath-nd4j"))
|
implementation(project(":kmath-nd4j"))
|
||||||
implementation(project(":kmath-kotlingrad"))
|
implementation(project(":kmath-kotlingrad"))
|
||||||
implementation(project(":kmath-viktor"))
|
implementation(project(":kmath-viktor"))
|
||||||
implementation(project(":kmath-jafama"))
|
// implementation(project(":kmath-jafama"))
|
||||||
implementation(projects.kmath.kmathTensorflow)
|
implementation(projects.kmath.kmathTensorflow)
|
||||||
implementation("org.tensorflow:tensorflow-core-platform:0.4.0")
|
implementation("org.tensorflow:tensorflow-core-platform:0.4.0")
|
||||||
implementation("org.nd4j:nd4j-native:1.0.0-M1")
|
implementation("org.nd4j:nd4j-native:1.0.0-M1")
|
||||||
@ -152,15 +160,6 @@ benchmark {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
|
||||||
jvmToolchain(11)
|
|
||||||
compilerOptions {
|
|
||||||
optIn.addAll(
|
|
||||||
"space.kscience.kmath.UnstableKMathAPI"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private data class JmhReport(
|
private data class JmhReport(
|
||||||
val jmhVersion: String,
|
val jmhVersion: String,
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2018-2024 KMath contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package space.kscience.kmath.benchmarks
|
|
||||||
|
|
||||||
import kotlinx.benchmark.Blackhole
|
|
||||||
import org.openjdk.jmh.annotations.Benchmark
|
|
||||||
import org.openjdk.jmh.annotations.Scope
|
|
||||||
import org.openjdk.jmh.annotations.State
|
|
||||||
import space.kscience.kmath.jafama.JafamaDoubleField
|
|
||||||
import space.kscience.kmath.jafama.StrictJafamaDoubleField
|
|
||||||
import space.kscience.kmath.operations.Float64Field
|
|
||||||
import space.kscience.kmath.operations.invoke
|
|
||||||
import kotlin.random.Random
|
|
||||||
|
|
||||||
@State(Scope.Benchmark)
|
|
||||||
internal class JafamaBenchmark {
|
|
||||||
@Benchmark
|
|
||||||
fun jafama(blackhole: Blackhole) = invokeBenchmarks(blackhole) { x ->
|
|
||||||
JafamaDoubleField { x * power(x, 4) * exp(x) / cos(x) + sin(x) }
|
|
||||||
}
|
|
||||||
|
|
||||||
@Benchmark
|
|
||||||
fun core(blackhole: Blackhole) = invokeBenchmarks(blackhole) { x ->
|
|
||||||
Float64Field { x * power(x, 4) * exp(x) / cos(x) + sin(x) }
|
|
||||||
}
|
|
||||||
|
|
||||||
@Benchmark
|
|
||||||
fun strictJafama(blackhole: Blackhole) = invokeBenchmarks(blackhole) { x ->
|
|
||||||
StrictJafamaDoubleField { x * power(x, 4) * exp(x) / cos(x) + sin(x) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private inline fun invokeBenchmarks(blackhole: Blackhole, expr: (Double) -> Double) {
|
|
||||||
val rng = Random(0)
|
|
||||||
repeat(1000000) { blackhole.consume(expr(rng.nextDouble())) }
|
|
||||||
}
|
|
@ -19,6 +19,12 @@ allprojects {
|
|||||||
version = "0.4.1-dev"
|
version = "0.4.1-dev"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies{
|
||||||
|
subprojects.forEach {
|
||||||
|
dokka(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
if (name.startsWith("kmath")) apply<MavenPublishPlugin>()
|
if (name.startsWith("kmath")) apply<MavenPublishPlugin>()
|
||||||
|
|
||||||
|
@ -27,8 +27,6 @@ dependencies {
|
|||||||
implementation(project(":kmath-tensors"))
|
implementation(project(":kmath-tensors"))
|
||||||
implementation(project(":kmath-symja"))
|
implementation(project(":kmath-symja"))
|
||||||
implementation(project(":kmath-for-real"))
|
implementation(project(":kmath-for-real"))
|
||||||
//jafama
|
|
||||||
implementation(project(":kmath-jafama"))
|
|
||||||
//multik
|
//multik
|
||||||
implementation(project(":kmath-multik"))
|
implementation(project(":kmath-multik"))
|
||||||
implementation(libs.multik.default)
|
implementation(libs.multik.default)
|
||||||
@ -54,7 +52,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvmToolchain(11)
|
jvmToolchain(17)
|
||||||
sourceSets.all {
|
sourceSets.all {
|
||||||
languageSettings {
|
languageSettings {
|
||||||
optIn("kotlin.contracts.ExperimentalContracts")
|
optIn("kotlin.contracts.ExperimentalContracts")
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2018-2024 KMath contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package space.kscience.kmath.jafama
|
|
||||||
|
|
||||||
import space.kscience.kmath.operations.invoke
|
|
||||||
|
|
||||||
fun main() {
|
|
||||||
val a = 2.0
|
|
||||||
val b = StrictJafamaDoubleField { exp(a) }
|
|
||||||
println(JafamaDoubleField { b + a })
|
|
||||||
println(StrictJafamaDoubleField { ln(b) })
|
|
||||||
}
|
|
@ -2,12 +2,15 @@
|
|||||||
# Copyright 2018-2021 KMath contributors.
|
# Copyright 2018-2021 KMath contributors.
|
||||||
# Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
# Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
#
|
#
|
||||||
kotlin.code.style=official
|
|
||||||
kotlin.mpp.stability.nowarn=true
|
|
||||||
kotlin.native.ignoreDisabledTargets=true
|
|
||||||
org.gradle.configureondemand=true
|
org.gradle.configureondemand=true
|
||||||
org.gradle.jvmargs=-Xmx4096m
|
org.gradle.jvmargs=-Xmx4096m
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.workers.max=4
|
org.gradle.workers.max=4
|
||||||
|
|
||||||
toolsVersion=0.15.4-kotlin-2.0.0
|
kotlin.code.style=official
|
||||||
|
kotlin.mpp.stability.nowarn=true
|
||||||
|
kotlin.native.ignoreDisabledTargets=true
|
||||||
|
org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelpers
|
||||||
|
kotlin.native.enableKlibsCrossCompilation=true
|
||||||
|
|
||||||
|
toolsVersion=0.16.0-kotlin-2.1.20-Beta1
|
||||||
|
@ -7,14 +7,18 @@ kscience {
|
|||||||
js{
|
js{
|
||||||
nodejs {
|
nodejs {
|
||||||
testTask {
|
testTask {
|
||||||
useMocha().timeout = "0"
|
useMocha {
|
||||||
|
timeout = "0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
browser {
|
browser {
|
||||||
useCommonJs()
|
useCommonJs()
|
||||||
testTask {
|
testTask {
|
||||||
useMocha().timeout = "0"
|
useMocha {
|
||||||
|
timeout = "0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("space.kscience.gradle.jvm")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin.sourceSets
|
kotlin.sourceSets
|
||||||
@ -9,11 +9,18 @@ kotlin.sourceSets
|
|||||||
|
|
||||||
description = "Kotlin∇ integration module"
|
description = "Kotlin∇ integration module"
|
||||||
|
|
||||||
dependencies {
|
kscience{
|
||||||
api("ai.hypergraph:kaliningraph:0.1.9")
|
jvm()
|
||||||
api("ai.hypergraph:kotlingrad:0.4.7")
|
|
||||||
api(project(":kmath-core"))
|
jvmMain{
|
||||||
testImplementation(project(":kmath-ast"))
|
api("ai.hypergraph:kaliningraph:0.1.9")
|
||||||
|
api("ai.hypergraph:kotlingrad:0.4.7")
|
||||||
|
api(project(":kmath-core"))
|
||||||
|
}
|
||||||
|
|
||||||
|
jvmTest{
|
||||||
|
implementation(project(":kmath-ast"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
readme {
|
readme {
|
||||||
|
@ -11,6 +11,10 @@ kscience {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api(projects.kmathCore)
|
api(projects.kmathCore)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wasmJsMain{
|
||||||
|
api(spclibs.kotlinx.browser)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
readme {
|
readme {
|
||||||
|
@ -1,14 +1,21 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("space.kscience.gradle.jvm")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
description = "ND4J NDStructure implementation and according NDAlgebra classes"
|
description = "ND4J NDStructure implementation and according NDAlgebra classes"
|
||||||
|
|
||||||
dependencies {
|
|
||||||
api(project(":kmath-tensors"))
|
kscience {
|
||||||
api("org.nd4j:nd4j-api:1.0.0-M1")
|
jvm()
|
||||||
testImplementation("org.nd4j:nd4j-native-platform:1.0.0-M1")
|
|
||||||
testImplementation("org.slf4j:slf4j-simple:1.7.32")
|
jvmMain {
|
||||||
|
api(project(":kmath-tensors"))
|
||||||
|
api("org.nd4j:nd4j-api:1.0.0-M2.1")
|
||||||
|
}
|
||||||
|
|
||||||
|
jvmTest{
|
||||||
|
implementation("org.nd4j:nd4j-native-platform:1.0.0-M1")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
readme {
|
readme {
|
||||||
|
@ -18,8 +18,7 @@ public class RandomSourceGenerator internal constructor(
|
|||||||
public val source: RandomSource,
|
public val source: RandomSource,
|
||||||
seed: Long?,
|
seed: Long?,
|
||||||
) : RandomGenerator {
|
) : RandomGenerator {
|
||||||
internal val random: UniformRandomProvider = seed?.let { source.create(seed) }
|
internal val random: UniformRandomProvider = seed?.let { source.create(seed) } ?: source.create()
|
||||||
?: RandomSource.create(source)
|
|
||||||
|
|
||||||
override fun nextBoolean(): Boolean = random.nextBoolean()
|
override fun nextBoolean(): Boolean = random.nextBoolean()
|
||||||
override fun nextDouble(): Double = random.nextDouble()
|
override fun nextDouble(): Double = random.nextDouble()
|
||||||
|
@ -4,38 +4,24 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("space.kscience.gradle.jvm")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
description = "Symja integration module"
|
description = "Symja integration module"
|
||||||
|
|
||||||
dependencies {
|
kscience{
|
||||||
api("org.matheclipse:matheclipse-core:2.0.0") {
|
jvm()
|
||||||
// Incorrect transitive dependencies
|
|
||||||
exclude("org.apfloat", "apfloat")
|
jvmMain {
|
||||||
exclude("org.hipparchus", "hipparchus-clustering")
|
api("org.matheclipse:matheclipse-core:3.0.0")
|
||||||
exclude("org.hipparchus", "hipparchus-core")
|
|
||||||
exclude("org.hipparchus", "hipparchus-fft")
|
api(project(":kmath-core"))
|
||||||
exclude("org.hipparchus", "hipparchus-fitting")
|
|
||||||
exclude("org.hipparchus", "hipparchus-ode")
|
|
||||||
exclude("org.hipparchus", "hipparchus-optim")
|
|
||||||
exclude("org.hipparchus", "hipparchus-stat")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replaces for incorrect transitive dependencies
|
|
||||||
api("org.apfloat:apfloat:1.10.0")
|
|
||||||
api("org.hipparchus:hipparchus-clustering:1.8")
|
|
||||||
api("org.hipparchus:hipparchus-core:1.8")
|
|
||||||
api("org.hipparchus:hipparchus-fft:1.8")
|
|
||||||
api("org.hipparchus:hipparchus-fitting:1.8")
|
|
||||||
api("org.hipparchus:hipparchus-ode:1.8")
|
|
||||||
api("org.hipparchus:hipparchus-optim:1.8")
|
|
||||||
api("org.hipparchus:hipparchus-stat:1.8")
|
|
||||||
|
|
||||||
api(project(":kmath-core"))
|
|
||||||
testImplementation("org.slf4j:slf4j-simple:1.7.31")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
readme {
|
readme {
|
||||||
maturity = space.kscience.gradle.Maturity.PROTOTYPE
|
maturity = space.kscience.gradle.Maturity.PROTOTYPE
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,9 @@ kscience {
|
|||||||
js {
|
js {
|
||||||
browser {
|
browser {
|
||||||
testTask {
|
testTask {
|
||||||
useMocha().timeout = "0"
|
useMocha {
|
||||||
|
timeout = "0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("space.kscience.gradle.jvm")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
description = "Binding for https://github.com/JetBrains-Research/viktor"
|
description = "Binding for https://github.com/JetBrains-Research/viktor"
|
||||||
|
|
||||||
dependencies {
|
kscience{
|
||||||
api(project(":kmath-core"))
|
jvm()
|
||||||
api("org.jetbrains.bio:viktor:1.2.0")
|
jvmMain{
|
||||||
|
api(project(":kmath-core"))
|
||||||
|
api("org.jetbrains.bio:viktor:1.2.0")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
readme {
|
readme {
|
||||||
|
@ -61,7 +61,6 @@ include(
|
|||||||
":kmath-tensors",
|
":kmath-tensors",
|
||||||
":kmath-jupyter",
|
":kmath-jupyter",
|
||||||
":kmath-symja",
|
":kmath-symja",
|
||||||
":kmath-jafama",
|
|
||||||
":examples",
|
":examples",
|
||||||
":benchmarks",
|
":benchmarks",
|
||||||
)
|
)
|
||||||
|
@ -14,6 +14,7 @@ kotlin.sourceSets {
|
|||||||
dependencies {
|
dependencies {
|
||||||
api(projects.kmath.kmathCore)
|
api(projects.kmath.kmathCore)
|
||||||
api(kotlin("test"))
|
api(kotlin("test"))
|
||||||
|
api(spclibs.logback.classic)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user