[libre-riscv-dev] [isa-dev] 3D Matrix-style operations / primitives
Jacob Lifshay
programmerjake at gmail.com
Wed Sep 18 10:36:02 BST 2019
On Wed, Sep 18, 2019, 02:14 lkcl <luke.leighton at gmail.com> wrote:
> On Wednesday, September 18, 2019 at 3:41:49 PM UTC+8, Jacob Lifshay wrote:
>
> > | m00 m10 m20 m30 |
> > | m01 m11 m21 m31 |
> > | m02 m12 m22 m32 |
> > | m03 m13 m23 m33 |
> >
> >
> > transpose 4 corner 2x2 matrices
> >
> >
> >
> > intermediate:
> > | m00 m01 m20 m21 |
> > | m10 m11 m30 m31 |
> > | m02 m03 m22 m23 |
> > | m12 m13 m32 m33 |
>
> How does that work with only SUBVL swizzle in only 4 intructions? The
> swizzles only apply horizontally, afaik.
>
didn't think through it completely, since I know it can be done...
anyway, here's a web page showing one way it can be done (the swizzles will
need to be decoded from the matrices provided, or just look up the sse2
instructions):
http://web.archive.org/web/20100111104515/http://www.randombit.net:80/bitbashing/programming/integer_matrix_transpose_in_sse2.html
Jacob
More information about the libre-riscv-dev
mailing list