I have a passion for games programming so this one really rings close for me.  The tricky thing is that early SSE and AVX instructions have to fill and use the entire register - it's only AVX512 that starts to allow partial filling, so things like packed 3-dimensional vectors are a little difficult to manage.  One can't just add a dummy 4th component because then storage won't behave as expected.

Gareth aka. Kit

On 10/01/2022 03:08, Ryan Joseph via fpc-devel wrote:

On Jan 9, 2022, at 2:09 PM, J. Gareth Moreton via fpc-devel 
<fpc-devel@lists.freepascal.org> wrote:

https://www.patreon.com/posts/60922821
Your plans are vectorization are an important gain for linear algebra and games.

Could you detect things like:

var
   a, b, c: TVec2;
begin
   c := a + b * V2(10, 10);

where the vec2 type has operator overloads for common operations? This kind of 
thing is very common in graphics math and I bet there's some clever ways you 
could compress that operation down. Curious how the C++ compilers do this 
also...

Regards,
        Ryan Joseph

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to