Sujet : Re: Cost of handling misaligned access
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.archDate : 08. Feb 2025, 19:02:49
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250208200249.00005047@yahoo.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)
On Fri, 7 Feb 2025 22:27:03 +0000
mitchalsup@aol.com (MitchAlsup1) wrote:
Simple question:: how would you port this code to a machine
with a different SIMD instruction set ??
>
In this case, one possibility is to write it differently in the first
place.
May be, I'd use completely different programming model, like implicit
SPMD. It was promoted by Intel ispc compiler. I tried it once, it
works and it's cross-platform. I am not sure that this specific
compiler (ispc) is still supported, but there should be others of the
same kind.
Or I can use some sort of SIMD portable toolkit. There are several,
with somewhat different levels of abstraction. The developer of one of
them used to post on RWT forum.
gcc vector extensions, mentioned in post above by Anton Ertl, is
another ideologically similar possibility.
For me, personally, all those options are harder to use than intrinsic
functions. So, there is the third and the most likely way - to learn
new set of intrinsic functions and to rewrite manually. The routines
tend to be small, so it's likely faster than fighting with tools. And
it's not like I would ever have to port to a dozen of different SIMD
architectures in 3 months.