[Libre-soc-dev] DCT/FFT augmentations

Hendrik Boom hendrik at topoi.pooq.com
Fri Jul 2 23:10:11 BST 2021


On Fri, Jul 02, 2021 at 12:03:32AM +0100, Luke Kenneth Casson Leighton wrote:
> got it
> https://git.libre-soc.org/?p=libreriscv.git;a=blob;f=openpower/sv/remapmatrix.py;hb=HEAD
> 
> that's a quick demo of how to use generators to crush 2D data down into
> linear form, using *three* separate (synchronised) generators to create
> the *appearance* of three nested for-loops:
> 
>     for k in range(len(Y)):       # ydim2
>         for i in range(len(X)):              # ydim1
>            for j in range(len(Y[0])):        # xdim2
>                result[i][j] += X[i][k] * Y[k][j]

Just a note:  interpreting + as 'or', and * as 'and',
operating on Boolean matrices, 
and having result, X, and Y be the exact same matrix,
updated while being used,
gives the traditional Warshall transitive-closure
algorithm, if the loops are nested exactly in thie order.

And probably a truckload of read-write conflicts.

-- hendrik
 
> 
> with that in place it should be possible to integrate the generators
> into ISACaller fairly easily.  should be done tomorrow.
> 
> after that i can look at FFT again, doing the same thing, by
> analysing the triple for-loop.
> 
> l.
> 
> _______________________________________________
> Libre-soc-dev mailing list
> Libre-soc-dev at lists.libre-soc.org
> http://lists.libre-soc.org/mailman/listinfo/libre-soc-dev



More information about the Libre-soc-dev mailing list