42#if (defined (WIN32) || defined (_WIN32)) && defined(_MSC_VER) && defined(_M_IX86)
46 #pragma function( lrint, lrintf )
84 __inline
long long int
86 {
long long int intgr;
96 __inline
long long int
98 {
long long int intgr;
107#elif (defined (WIN32) || defined (_WIN32)) && defined(_M_X64)
110 #include <immintrin.h>
111 #include <emmintrin.h>
114 #pragma function(lrint, lrintf)
118 long int lrint(
double flt)
120 return _mm_cvtsd_si32(_mm_set_sd(flt));
124 long int lrintf (
float flt)
126 return _mm_cvtss_si32(_mm_set_ss(flt));
130 long long int llrint(
double flt)
132 return _mm_cvtsd_si64(_mm_set_sd(flt));
136 long long int llrintf(
float flt)
138 return _mm_cvtss_si64(_mm_set_ss(flt));
141#elif (HAVE_LRINT && HAVE_LRINTF)
150 #define _ISOC9X_SOURCE 1
151 #define _ISOC99_SOURCE 1
153 #define __USE_ISOC9X 1
154 #define __USE_ISOC99 1
169 #define lrint(dbl) ((int)rint(dbl))
170 #define lrintf(flt) ((int)rint(flt))