#convert float vector to int vector and back

1 messages · Page 1 of 1 (latest)

meager flicker
#

I am trying to convert a float vector, specifically Vector(2,f32) into Vector(2,i32) and attempting to use @wooden bearToInt fails even though there is a specific ( x64 ) instruction for conversion (CVTPS2DQ)

#

Note there is a way to convert back as well (CVTDQ2PS)

#

Like I know I can do this manually with a function but I would like it to use this vector instruction as to not slow down my code severely.

#

And I was wondering if there was an actual way to do it