Changes for upcoming GSL extension project #148

Merged
CommanderTvis merged 98 commits from gsl-experiment into dev 2021-02-19 13:34:27 +03:00
4 changed files with 16 additions and 17 deletions
Showing only changes of commit 4fc8d7b57c - Show all commits

View File

@ -33,9 +33,9 @@ jobs:
with:
path: |
~/.konan/dependencies
~/.konan/kotlin-native-prebuilt-linux-1.4.20-eap-37
key: ${{ runner.os }}-konan-1.4.20-eap-37
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
~/.konan/kotlin-native-prebuilt-linux-1.4.20
key: ${{ runner.os }}-konan-1.4.20
restore-keys: ${{ runner.os }}-konan-1.4.20
- name: Build with Gradle
run: ./gradlew -Dorg.gradle.daemon=false --build-cache build
build-osx:
@ -63,9 +63,9 @@ jobs:
with:
path: |
~/.konan/dependencies
~/.konan/kotlin-native-prebuilt-macos-1.4.20-eap-37
key: ${{ runner.os }}-konan-1.4.20-eap-37
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
~/.konan/kotlin-native-prebuilt-macos-1.4.20
key: ${{ runner.os }}-konan-1.4.20
restore-keys: ${{ runner.os }}-konan-1.4.20
- name: Build with Gradle
run: sudo ./gradlew -Dorg.gradle.daemon=false --build-cache build
@ -94,8 +94,8 @@ jobs:
with:
path: |
~/.konan/dependencies
~/.konan/kotlin-native-prebuilt-mingw-1.4.20-eap-37
key: ${{ runner.os }}-konan-1.4.20-eap-37
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
~/.konan/kotlin-native-prebuilt-mingw-1.4.20
key: ${{ runner.os }}-konan-1.4.20
restore-keys: ${{ runner.os }}-konan-1.4.20
- name: Build with Gradle
run: ./gradlew --build-cache build

View File

@ -1,6 +1,7 @@
kotlin.code.style=official
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.stability.nowarn=true
kotlin.native.enableDependencyPropagation=false
kotlin.native.ignoreDisabledTargets=true
kotlin.parallel.tasks.in.project=true
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m

View File

@ -12,7 +12,7 @@ kotlin {
val nativeTarget = when (System.getProperty("os.name")) {
"Mac OS X" -> macosX64()
"Linux" -> linuxX64("native")
"Linux" -> linuxX64()
else -> {
logger.warn("Current OS cannot build any of kmath-gsl targets.")
@ -29,7 +29,7 @@ kotlin {
val test by nativeTarget.compilations.getting
sourceSets {
val nativeMain by getting {
val nativeMain by creating {
val codegen by tasks.creating {
matricesCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Matrices.kt")
vectorsCodegen(kotlin.srcDirs.first().absolutePath + "/kscience/kmath/gsl/_Vectors.kt")
@ -42,11 +42,11 @@ kotlin {
}
}
val nativeTest by getting {
val nativeTest by creating {
dependsOn(nativeMain)
}
// main.defaultSourceSet.dependsOn(nativeMain)
// test.defaultSourceSet.dependsOn(nativeTest)
main.defaultSourceSet.dependsOn(nativeMain)
test.defaultSourceSet.dependsOn(nativeTest)
}
}

View File

@ -1,8 +1,6 @@
package kscience.kmath.gsl
import kotlinx.cinterop.CPointer
import kotlinx.cinterop.DeferScope
import kotlinx.cinterop.pointed
import kotlinx.cinterop.*
import org.gnu.gsl.*
internal class GslRealVector(override val nativeHandle: CPointer<gsl_vector>, scope: DeferScope) :