From 8f6163698c54e19a77eae4e0db7086d973e5ed93 Mon Sep 17 00:00:00 2001 From: Iaroslav Postovalov Date: Sun, 4 Oct 2020 13:39:39 +0700 Subject: [PATCH] Update tasks --- .github/workflows/gradle.yml | 12 ++++++------ gradle.properties | 6 ++---- .../kotlin/kscience/kmath/gsl/GslRealMatrix.kt | 10 +++++++--- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 02b7ee2cf..0355ff78d 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -29,10 +29,10 @@ jobs: path: | ~/.konan/dependencies ~/.konan/kotlin-native-prebuilt-linux-1.4.20-eap-37 - key: ${{ runner.os }}-konan-1.4.0 - restore-keys: ${{ runner.os }}-konan-1.4.0 + key: ${{ runner.os }}-konan-1.4.20-eap-37 + restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37 - name: Build with Gradle - run: ./gradlew -Dorg.gradle.daemon=false --build-cache :kmath-gsl:cinteropLibgslNative build + run: ./gradlew -Dorg.gradle.daemon=false --build-cache :kmath-gsl:cinteropLibgslLinuxX64 build build-osx: runs-on: macos-latest @@ -59,7 +59,7 @@ jobs: path: | ~/.konan/dependencies ~/.konan/kotlin-native-prebuilt-macos-1.4.20-eap-37 - key: ${{ runner.os }}-konan-1.4.0 - restore-keys: ${{ runner.os }}-konan-1.4.0 + key: ${{ runner.os }}-konan-1.4.20-eap-37 + restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37 - name: Build with Gradle - run: ./gradlew -Dorg.gradle.daemon=false --build-cache :kmath-gsl:cinteropLibgslNative build + run: ./gradlew -Dorg.gradle.daemon=false --build-cache :kmath-gsl:cinteropLibgslMacosX64 build diff --git a/gradle.properties b/gradle.properties index 930bba550..b16859f29 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,7 @@ kotlin.code.style=official -kotlin.parallel.tasks.in.project=true kotlin.mpp.enableGranularSourceSetsMetadata=true -kotlin.native.enableDependencyPropagation=false kotlin.mpp.stability.nowarn=true - +kotlin.parallel.tasks.in.project=true org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m org.gradle.parallel=true -systemProp.org.gradle.internal.publish.checksums.insecure=true \ No newline at end of file +systemProp.org.gradle.internal.publish.checksums.insecure=true diff --git a/kmath-gsl/src/nativeMain/kotlin/kscience/kmath/gsl/GslRealMatrix.kt b/kmath-gsl/src/nativeMain/kotlin/kscience/kmath/gsl/GslRealMatrix.kt index 56e397aed..6ef3abdc8 100644 --- a/kmath-gsl/src/nativeMain/kotlin/kscience/kmath/gsl/GslRealMatrix.kt +++ b/kmath-gsl/src/nativeMain/kotlin/kscience/kmath/gsl/GslRealMatrix.kt @@ -12,7 +12,11 @@ import org.gnu.gsl.gsl_matrix_equal import org.gnu.gsl.gsl_matrix_get public sealed class GslMatrix : FeaturedMatrix { - public abstract val nativeHandle: CValues + protected abstract val nativeHandle: CValues + + override fun equals(other: Any?): Boolean { + return NDStructure.equals(this, other as? NDStructure<*> ?: return false) + } public override fun hashCode(): Int { var result = nativeHandle.hashCode() @@ -21,7 +25,7 @@ public sealed class GslMatrix : FeaturedMatrix { } } -public class GslRealMatrix(public override val nativeHandle: CValues, features: Set) : +public class GslRealMatrix(protected override val nativeHandle: CValues, features: Set) : GslMatrix() { public override val rowNum: Int @@ -42,6 +46,6 @@ public class GslRealMatrix(public override val nativeHandle: CValues public override fun equals(other: Any?): Boolean { if (other is GslRealMatrix) gsl_matrix_equal(nativeHandle, other.nativeHandle) - return NDStructure.equals(this, other as? NDStructure<*> ?: return false) + return super.equals(other) } }