Kotlin / multik

Multidimensional array library for Kotlin
https://kotlin.github.io/multik/
Apache License 2.0
646 stars 39 forks source link

c fun doesn't work via cinterop #131

Open devcrocod opened 2 years ago

devcrocod commented 2 years ago

Native functions from math, linalg don't work in multik-openblas for native targets via cinterop wrapper

devcrocod commented 2 years ago

Need use Pinned<T>, because CValues copy arrays. https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.cinterop/-pinned/ https://kotlinlang.org/docs/native-c-interop.html#object-pinning

But frequent use pin can lead to a lot of problems with performance.