forked from kscience/kmath
2.0.0
This commit is contained in:
parent
c418607bf6
commit
c585c59552
@ -1,6 +1,5 @@
|
|||||||
@file:Suppress("UNUSED_VARIABLE")
|
@file:Suppress("UNUSED_VARIABLE")
|
||||||
|
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
|
||||||
import space.kscience.kmath.benchmarks.addBenchmarkProperties
|
import space.kscience.kmath.benchmarks.addBenchmarkProperties
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
@ -152,18 +151,12 @@ benchmark {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin.sourceSets.all {
|
kotlin {
|
||||||
with(languageSettings) {
|
jvmToolchain(11)
|
||||||
optIn("kotlin.contracts.ExperimentalContracts")
|
compilerOptions {
|
||||||
optIn("kotlin.ExperimentalUnsignedTypes")
|
optIn.addAll(
|
||||||
optIn("space.kscience.kmath.UnstableKMathAPI")
|
"space.kscience.kmath.UnstableKMathAPI"
|
||||||
}
|
)
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<KotlinJvmCompile> {
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "11"
|
|
||||||
freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all" + "-Xlambdas=indy"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,10 +26,8 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvmToolchain {
|
jvmToolchain(11)
|
||||||
languageVersion.set(JavaLanguageVersion.of(11))
|
compilerOptions {
|
||||||
}
|
optIn.add("kotlin.OptIn")
|
||||||
sourceSets.all {
|
|
||||||
languageSettings.optIn("kotlin.OptIn")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,6 @@ 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.2-kotlin-2.0.0-RC2
|
toolsVersion=0.15.4-kotlin-2.0.0
|
||||||
#kotlin.experimental.tryK2=true
|
#kotlin.experimental.tryK2=true
|
||||||
#kscience.wasm.disabled=true
|
#kscience.wasm.disabled=true
|
@ -6,13 +6,11 @@
|
|||||||
package space.kscience.kmath.nd
|
package space.kscience.kmath.nd
|
||||||
|
|
||||||
import space.kscience.kmath.UnsafeKMathAPI
|
import space.kscience.kmath.UnsafeKMathAPI
|
||||||
import kotlin.jvm.JvmInline
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A read-only ND shape
|
* A read-only ND shape
|
||||||
*/
|
*/
|
||||||
@JvmInline
|
public class ShapeND(@PublishedApi internal val array: IntArray) {
|
||||||
public value class ShapeND(@PublishedApi internal val array: IntArray) {
|
|
||||||
public val size: Int get() = array.size
|
public val size: Int get() = array.size
|
||||||
public operator fun get(index: Int): Int = array[index]
|
public operator fun get(index: Int): Int = array[index]
|
||||||
override fun toString(): String = array.contentToString()
|
override fun toString(): String = array.contentToString()
|
||||||
|
Loading…
Reference in New Issue
Block a user