belated feedback Alex Shinn (16 Apr 2021 15:00 UTC)
Re: belated feedback Bradley Lucier (16 Apr 2021 17:08 UTC)
Re: belated feedback John Cowan (16 Apr 2021 18:25 UTC)
Re: belated feedback Bradley Lucier (17 Apr 2021 21:48 UTC)
Re: belated feedback Alex Shinn (18 Apr 2021 23:45 UTC)
Re: belated feedback Bradley Lucier (16 Apr 2021 23:46 UTC)
Re: belated feedback Alex Shinn (17 Apr 2021 00:03 UTC)
Re: belated feedback Bradley Lucier (17 Apr 2021 01:10 UTC)
Re: belated feedback Alex Shinn (17 Apr 2021 01:22 UTC)
Re: belated feedback Alex Shinn (30 Apr 2021 05:41 UTC)
Re: belated feedback Bradley Lucier (30 Apr 2021 14:17 UTC)
Re: belated feedback John Cowan (30 Apr 2021 15:04 UTC)
Re: belated feedback Bradley Lucier (30 Apr 2021 16:42 UTC)
Re: belated feedback Alex Shinn (01 May 2021 09:27 UTC)
array-elements-in-order? (Was: belated feedback) Bradley Lucier (16 Jan 2022 19:08 UTC)

Re: belated feedback Bradley Lucier 17 Apr 2021 01:10 UTC

On 4/16/21 8:03 PM, Alex Shinn wrote:
> Hi Bradley,
>
> Sorry, my explanation of that hack was brief, mostly because it was
> only a hack.  The key comment was:
>
>    "However, I intend to flatten all of the affine transformations
> next, at which point I'll need to implement this properly."
>
> The entire point of composing affine transformations is that their
> composition is another affine transformation, so the indexer never
> grows in complexity.  In particular, for a 2D matrix this
> transformation is just a matter of strides, which means BLAS can
> multiply any SRFI 179 f32 or f64 vectors.

OK, sorry, I said I didn't understand this statement, and it turned out
to be critical!

> What surprised me most is that after completing my work and looking at
> the reference implementation, the latter does not seem to perform this
> optimization.  In fact, the array record type only holds the indexer,
> not the affine coefficients, so it cannot perform this optimization
> (unless the compiler is smart enough to combine these closures at
> runtime).

The strides, lower bounds, and base index are implicit in the closures
that implement the indexers in %%indexer-1/2/3/4/generic.  It's not the
compiler that computes these parameters, it's code in
%%compose-indexers.  Perhaps there's a better way.

Brad