[Mono-list] How to convert _mm_cvttps_epi32 to Mono.Simd code

jetthink jetthink at gmail.com
Fri Sep 25 23:43:07 EDT 2009


Hi,
  I try to convert http://gruntthepeon.free.fr/ssemath/sse_mathfun.h to
Mono.
But it seems some sse command was missing in Mono.Simd.
Just like follow 2 commands:
  v4si emm0 = _mm_cvttps_epi32(fx);
  v4sf tmp  = _mm_cvtepi32_ps(emm0);

Also I have try use "cast" Vector4f to Vector4i, but the result is so
strange.
Vector4f f=new  Vector4f(1.1f, 55.3f, 0.3f,0.4f);
Console.WriteLine(f);
Vector4i i=(Vector4i)f;
Console.WriteLine(i);
Vector4f newf = (Vector4f)i;
Console.WriteLine(newf);

output will be:
<1.1, 55.3, 0.3, 0.4>
<1066192077, 1113404211, 1050253722, 1053609165>
<1.1, 55.3, 0.3, 0.4>

I dont know whether this is a bug. 

Thanks,
Jet
-- 
View this message in context: http://www.nabble.com/How-to-convert-_mm_cvttps_epi32-to-Mono.Simd-code-tp25577177p25577177.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list