More preparations for array broadcasting
Bradley Lucier 07 Oct 2025 01:02 UTC
The most recent github commit
https://github.com/gambiteer/srfi-231/commit/90c70e02dd975562c1c4af02e48c4af1486d9e97
adds `interval-insert-axis`, `array-insert-axis`,
`compute-broadcast-array`, and `object->array`, all routines that are
needed to implement general array broadcasting.
In the next commit, I will add a stripped-down version of the array
library, with all the functionality but *no* error checking and *no*
"optimizations". (I put "optimizations in quotes because it seems that
sometimes the stripped-down library is faster than the general library.)
The usual `generic-arrays.scm` has much code specialization for
special cases and tries to catch and raise errors as soon as possible.
The idea behind `mini-arrays.scm` is to offer a second implementation,
so that independent implementers can choose where on the axis between
`mini-arrays.scm` and `generic-arrays.scm` they would like their
implementations to sit.
There will also be a file `test-mini-arrays.scm` that is instrumented to
include or elide tests to see that appropriate exceptions are raised, so
it can be used to test both `generic-arrays.scm` and `mini-arrays.scm`.
Brad