Kotlin / multik

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

support vector api like jdk21 #163

Open shouriken opened 1 year ago

shouriken commented 1 year ago

I'd like to have a sqrt, cbrt , ceil, floor, abs function and so on unary operator for NDArray. ceil function Behaviors:

array [1.2, 2.3] ceil return a new array [1.0, 2.0] for double or [1, 2] for int

I know, this can be resolved by map; but it can be more efficient if use native function with openblas. These functions more like jdk21 vector api. Do you have any plan for this? Thanks.

devcrocod commented 1 year ago

I have been thinking about it for a long time, even since the days when Vector API was in the incubator. And I really want to do it. Especially in the context of matrix multiplication, it would provide a significant performance boost. Unfortunately, due to the support for two different JDKs, it is necessary to maintain two codebases, which complicates the already complex artifact dependency.

I will leave this issue, but its priority is currently lower than that of other tasks.