I put my AVX2 code (image format conversions) in a FPC compiled dll, and use that in Delphi. The syntax is mostly the same, but FPC has a different way of doing .savenv/.pushnv. But the code will be 99.9% recyclable when Delphi gets it, which is why I chose it over doing it in VS2015
Desktop compiler doesn't support anything remotely close to AVX2. Heck it doesn't even have SSE2 intrinsics.
ReplyDeleteHorácio Filho You can't really target new hardware other than 486/P4 with Delphi.
ReplyDeleteYep, Delphi program CAN'T run on Pentium 5, core duo, or higher... lol
ReplyDeletePhillip Woon It can run sure but can it generate fast AVX2 instructions?
ReplyDeleteI doubt it's even possible to write it with asm.
Fast enough for me. But I guess there are some that need the speed.
ReplyDeleteJosé RamÃrez
ReplyDeleteDelphi supports up to SSE 4.2 (in asm), but not yet AVX.
The old db/dw/dd trick in asm will work obviously.
The major problem with Delphi (or any other compiler) using such instructions is that not all CPU's support them.
Very few compilers use cpu-mashhalling code and if they do only in a few select places.
I put my AVX2 code (image format conversions) in a FPC compiled dll, and use that in Delphi. The syntax is mostly the same, but FPC has a different way of doing .savenv/.pushnv. But the code will be 99.9% recyclable when Delphi gets it, which is why I chose it over doing it in VS2015
ReplyDelete