Re: Row-major order, column-major order, and currying arrays: an exegesis Bradley Lucier (18 Aug 2024 22:08 UTC)

Re: Row-major order, column-major order, and currying arrays: an exegesis Bradley Lucier 18 Aug 2024 22:08 UTC

On 8/18/24 5:36 PM, Arthur A. Gleckler wrote:
>
> On Sun, Aug 18, 2024 at 2:32 PM Bradley Lucier <xxxxxx@purdue.edu
> <mailto:xxxxxx@purdue.edu>> wrote:
>
>     In my opinion, array currying is important in algorithms, so I made
>     this
>     discussion before continuing with the idea of library version with
>     arrays in column-major order.
>
>
> Would you then make a library version with arrays in column-major order,
> or a version that allows one to specify the order used?  The latter
> would be more flexible, but would bring into consideration what to do
> when operations on more than one array are used.

Do you mean "specify when the library is loaded the element order of all
arrays" or "specify the element order each array when that array is
created"?  Either way, it seems to be a much more complicated question.
I don't know of any library that does either thing (not that I know
every library).

Perhaps only the loops that run through indices and do stuff with array
elements (in interval-for-each, for example, or array-every, etc.) and
%%interval->basic-indexer would need to be changed for a library using
column-major order.  I don't know, I haven't tried it yet.

Brad