Sujet : Re: What integer C type to use
De : terje.mathisen (at) *nospam* tmsw.no (Terje Mathisen)
Groupes : comp.archDate : 15. Mar 2024, 10:16:37
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <ut13lm$26ugq$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.1
MitchAlsup1 wrote:
Michael S wrote:
Doctor, it hurts when I do this!
So, what prevents you from providing no gather with resolution
below 64 bits?
Well, then, you have SP values in a container than could hold 2 and you
don't get any SIMD speedup.
I've looked at this issue since Larrabee (which was the first cpu I had access to which supported gather):
For a 32-bit gather in a 64-bit environment, the only good solution I've been able to come up with is to use a 64-bit base register and then require all the sources to be within 4GB from that base, so that you can use the 32-bit wide gather addresses as indices/offsets from that base.
<dest_vector_reg> = gather(base_reg, src_vector_reg)
It would be up to the implementer to decide if the src_vector_reg is used as signed or unsigned offsets from the base. It is also possible to extend adressability by having the offsets be scaled by the element size, so effectively
dest[i] = [base+src[i]*4]
for single precision values.
Terje
-- - <Terje.Mathisen at tmsw.no>"almost all programming can be viewed as an exercise in caching"