kyonifer / koma

A scientific computing library for Kotlin. https://kyonifer.github.io/koma
Other
270 stars 23 forks source link

Investigate the applicability of inline classes to koma #58

Open kyonifer opened 5 years ago

kyonifer commented 5 years ago

Now that inline classes look slated for kotlin mainline (experimental in 1.3-M2), it would be very useful to implement Matrix<T> with inline classes to eliminate any overhead using koma might have had over using the underlying libs on each platform. It appears the feature currently supports a single wrapped property and interfaces (but not abstract bases), which could work for Matrix. There are some backends where a single thing isnt enough currently (e.g. native wants both a pointer to memory and a length) but we can probably refactor a bit to make every implementation wrap a single object.