2019-06-08 16:25:51 +03:00
|
|
|
import org.jetbrains.kotlin.allopen.gradle.AllOpenExtension
|
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
java
|
|
|
|
kotlin("jvm")
|
2020-06-23 20:03:45 +03:00
|
|
|
kotlin("plugin.allopen") version "1.3.72"
|
|
|
|
id("kotlinx.benchmark") version "0.2.0-dev-8"
|
2019-06-08 16:25:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
configure<AllOpenExtension> {
|
|
|
|
annotation("org.openjdk.jmh.annotations.State")
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven("http://dl.bintray.com/kyonifer/maven")
|
2020-04-03 22:29:23 +03:00
|
|
|
maven("https://dl.bintray.com/mipt-npm/scientifik")
|
|
|
|
maven("https://dl.bintray.com/mipt-npm/dev")
|
2019-06-08 16:25:51 +03:00
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
register("benchmarks")
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2020-06-25 16:10:38 +03:00
|
|
|
implementation(project(":kmath-ast"))
|
2019-06-08 16:25:51 +03:00
|
|
|
implementation(project(":kmath-core"))
|
|
|
|
implementation(project(":kmath-coroutines"))
|
|
|
|
implementation(project(":kmath-commons"))
|
2020-05-22 21:28:14 +03:00
|
|
|
implementation(project(":kmath-prob"))
|
2019-06-08 16:25:51 +03:00
|
|
|
implementation(project(":kmath-koma"))
|
2019-12-08 15:48:25 +03:00
|
|
|
implementation(project(":kmath-viktor"))
|
2019-12-09 19:52:00 +03:00
|
|
|
implementation(project(":kmath-dimensions"))
|
2020-09-12 14:22:59 +03:00
|
|
|
implementation(project(":kmath-bignum"))
|
|
|
|
implementation(project(":kmath-memory"))
|
2019-06-08 16:25:51 +03:00
|
|
|
implementation("com.kyonifer:koma-core-ejml:0.12")
|
2020-04-03 22:29:23 +03:00
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-io-jvm:0.2.0-npm-dev-6")
|
2020-09-13 12:18:35 +03:00
|
|
|
"benchmarksImplementation"("org.jetbrains.kotlinx:kotlinx.benchmark.runtime-jvm:0.2.0-dev-8")
|
|
|
|
"benchmarksImplementation"(sourceSets.main.get().output.plus(sourceSets.main.get().runtimeClasspath))
|
2019-06-08 16:25:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Configure benchmark
|
|
|
|
benchmark {
|
|
|
|
// Setup configurations
|
|
|
|
targets {
|
|
|
|
// This one matches sourceSet name above
|
2019-07-17 14:21:37 +03:00
|
|
|
register("benchmarks")
|
2019-06-08 16:25:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
register("fast") {
|
|
|
|
warmups = 5 // number of warmup iterations
|
|
|
|
iterations = 3 // number of iterations
|
|
|
|
iterationTime = 500 // time in seconds per iteration
|
|
|
|
iterationTimeUnit = "ms" // time unity for iterationTime, default is seconds
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-22 12:49:21 +03:00
|
|
|
kotlin.sourceSets.all {
|
|
|
|
with(languageSettings) {
|
|
|
|
useExperimentalAnnotation("kotlin.contracts.ExperimentalContracts")
|
|
|
|
useExperimentalAnnotation("kotlin.ExperimentalUnsignedTypes")
|
|
|
|
}
|
|
|
|
}
|
2019-06-08 16:25:51 +03:00
|
|
|
|
|
|
|
tasks.withType<KotlinCompile> {
|
|
|
|
kotlinOptions {
|
2020-05-06 10:50:08 +03:00
|
|
|
jvmTarget = Scientifik.JVM_TARGET.toString()
|
2020-08-21 22:42:59 +03:00
|
|
|
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn"
|
2019-06-08 16:25:51 +03:00
|
|
|
}
|
2020-08-21 22:42:59 +03:00
|
|
|
}
|