Sentinel floating-point conversion functions
Microsoft Specific
Conversion functions between floating-point types and integral types that use an Intel Architecture (IA) AVX-512 compatible sentinel strategy.
Syntax
int _cvt_ftoi_sent(float value);
long long _cvt_ftoll_sent(float value);
unsigned _cvt_ftoui_sent(float value);
unsigned long long _cvt_ftoull_sent(float value);
int _cvt_dtoi_sent(double value);
long long _cvt_dtoll_sent(double value);
unsigned _cvt_dtoui_sent(double value);
unsigned long long _cvt_dtoull_sent(double value);
Parameters
value
[in] A floating-point value to convert.
Return value
The integer-typed result of the conversion.
Requirements
Header: <intrin.h>
Architecture: x86, x64
Remarks
These intrinsics are floating-point to integral type conversion functions that use a sentinel strategy: They return the result value farthest from zero as a proxy sentinel value for NaN
. Any invalid conversion returns this sentinel value. The specific sentinel value returned depends on the result type.
Result type | Sentinel | <limits.h> constant |
---|---|---|
int |
-2147483648 (0x80000000) | INT_MIN |
unsigned int |
4294967295 (0xFFFFFFFF) | UINT_MAX |
long long |
-9223372036854775808 (0x8000000000000000) | LLONG_MIN |
unsigned long long |
18446744073709551615 (0xFFFFFFFFFFFFFFFF) | ULLONG_MAX |
The sentinel conversion intrinsics are available starting in Visual Studio 2019 version 16.10.
END Microsoft Specific
See also
Compiler intrinsics
Fast floating-point conversion functions
Saturation floating-point conversion functions
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho