[Insight-developers] Rounding and itkMath.h (Class vs Namespace)

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Oct 23 10:41:45 EDT 2009


On Oct 23, 2009, at 5:07 AM, Tom Vercauteren wrote:
>
> Indeed, the availability of these _mm_cvtss_si64 and _mm_cvtsd_si64  
> intrinsics apparently depend on the compiler, compiler version,  
> architecture and maybe more...
>
> I guess that we need to ad a try-compile to see whether we may use  
> them or not. Another option would be to not use them and only  
> implement the assembly versions.
>

Is there any advantage to the intrinsics over the assembly?

>
>>
>> Now that you ask, I am starting to doubt. I haven't access to my
>> computer right now but I kind of remember that using _mm_cvtss_si64
>> and _mm_cvtsd_si64 didn't compile on my 32 bit box. This seems
>> supported by the following link
>> http://msdn.microsoft.com/en-us/library/bb514009.aspx
>> that states that  _mm_cvtsd_si64 is for x64
>
> This may be different on linux and apple system then on widows.  
> Complicated!
>
> Just checked, I don't think that this is platform dependent. It  
> really looks like _mm_cvtss_si64 and _mm_cvtsd_si64 are only for  
> x86_64, looking at emmintrin.h from the intel compiler icc (they  
> should know there own processors), I see:
>
> /*
>  * Support for 64-bit extension intrinsics
>  */
> #if defined(__x86_64) || defined(_M_X64)
> extern __int64 __cdecl _mm_cvtsd_si64(__m128d a);
> extern __int64 __cdecl _mm_cvttsd_si64(__m128d a);
> extern __m128d __cdecl _mm_cvtsi64_sd(__m128d a, __int64 b);
> extern __m128i __cdecl _mm_cvtsi64_si128(__int64 a);
> extern __int64 __cdecl _mm_cvtsi128_si64(__m128i a);
> extern    void __cdecl _mm_stream_si64(__int64 *p, __int64 a);
> #endif
>
> Tom
>
>
>

========================================================
Bradley Lowekamp
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20091023/3594b197/attachment.htm>


More information about the Insight-developers mailing list