Update tasks

This commit is contained in:
Iaroslav Postovalov 2020-10-04 13:39:39 +07:00
parent fb4d74e90f
commit 8f6163698c
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7
3 changed files with 15 additions and 13 deletions

View File

@ -29,10 +29,10 @@ jobs:
path: | path: |
~/.konan/dependencies ~/.konan/dependencies
~/.konan/kotlin-native-prebuilt-linux-1.4.20-eap-37 ~/.konan/kotlin-native-prebuilt-linux-1.4.20-eap-37
key: ${{ runner.os }}-konan-1.4.0 key: ${{ runner.os }}-konan-1.4.20-eap-37
restore-keys: ${{ runner.os }}-konan-1.4.0 restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
- name: Build with Gradle - 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: build-osx:
runs-on: macos-latest runs-on: macos-latest
@ -59,7 +59,7 @@ jobs:
path: | path: |
~/.konan/dependencies ~/.konan/dependencies
~/.konan/kotlin-native-prebuilt-macos-1.4.20-eap-37 ~/.konan/kotlin-native-prebuilt-macos-1.4.20-eap-37
key: ${{ runner.os }}-konan-1.4.0 key: ${{ runner.os }}-konan-1.4.20-eap-37
restore-keys: ${{ runner.os }}-konan-1.4.0 restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
- name: Build with Gradle - 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

View File

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

View File

@ -12,7 +12,11 @@ import org.gnu.gsl.gsl_matrix_equal
import org.gnu.gsl.gsl_matrix_get import org.gnu.gsl.gsl_matrix_get
public sealed class GslMatrix<T : Any> : FeaturedMatrix<T> { public sealed class GslMatrix<T : Any> : FeaturedMatrix<T> {
public abstract val nativeHandle: CValues<out CStructVar> protected abstract val nativeHandle: CValues<out CStructVar>
override fun equals(other: Any?): Boolean {
return NDStructure.equals(this, other as? NDStructure<*> ?: return false)
}
public override fun hashCode(): Int { public override fun hashCode(): Int {
var result = nativeHandle.hashCode() var result = nativeHandle.hashCode()
@ -21,7 +25,7 @@ public sealed class GslMatrix<T : Any> : FeaturedMatrix<T> {
} }
} }
public class GslRealMatrix(public override val nativeHandle: CValues<gsl_matrix>, features: Set<MatrixFeature>) : public class GslRealMatrix(protected override val nativeHandle: CValues<gsl_matrix>, features: Set<MatrixFeature>) :
GslMatrix<Double>() { GslMatrix<Double>() {
public override val rowNum: Int public override val rowNum: Int
@ -42,6 +46,6 @@ public class GslRealMatrix(public override val nativeHandle: CValues<gsl_matrix>
public override fun equals(other: Any?): Boolean { public override fun equals(other: Any?): Boolean {
if (other is GslRealMatrix) gsl_matrix_equal(nativeHandle, other.nativeHandle) if (other is GslRealMatrix) gsl_matrix_equal(nativeHandle, other.nativeHandle)
return NDStructure.equals(this, other as? NDStructure<*> ?: return false) return super.equals(other)
} }
} }