'\" t .\" Title: macros and limits .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 02/03/2019 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "MACROS AND LIMITS" "3clc" "02/03/2019" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" Macros_and_Limits \- Macros for math limits\&. .SH "DESCRIPTION" .PP The macro names given in the following list must use the values specified\&. These constant expressions are suitable for use in #if preprocessing directives\&. .PP .TS tab(:); l l l l l l l l l l l l l l l l l l l l. T{ #define FLT_DIG T}:T{ 6 T} T{ #define FLT_MANT_DIG T}:T{ 24 T} T{ #define FLT_MAX_10_EXP T}:T{ +38 T} T{ #define FLT_MAX_EXP T}:T{ +128 T} T{ #define FLT_MIN_10_EXP T}:T{ \-37 T} T{ #define FLT_MIN_EXP T}:T{ \-125 T} T{ #define FLT_RADIX T}:T{ 2 T} T{ #define FLT_MAX T}:T{ 0x1\&.fffffep127f T} T{ #define FLT_MIN T}:T{ 0x1\&.0p\-126f T} T{ #define FLT_EPSILON T}:T{ 0x1\&.0p\-23f T} .TE .sp 1 .PP The macro names given in the following list (available if the double option is supported) must use the values specified\&. These constant expressions are suitable for use in #if preprocessing directives\&. .PP .TS tab(:); l l l l l l l l l l l l l l l l l l. T{ #define DBL_DIG T}:T{ 15 T} T{ #define DBL_MANT_DIG T}:T{ 53 T} T{ #define DBL_MAX_10_EXP T}:T{ +308 T} T{ #define DBL_MAX_EXP T}:T{ +1024 T} T{ #define DBL_MIN_10_EXP T}:T{ \-307 T} T{ #define DBL_MIN_EXP T}:T{ \-1021 T} T{ #define DBL_MAX T}:T{ 0x1\&.fffffffffffffp1023 T} T{ #define DBL_MIN T}:T{ 0x1\&.0p\-1022 T} T{ #define DBL_EPSILON T}:T{ 0x1\&.0p\-52 T} .TE .sp 1 .PP The macro names given in the following list must use the values specified\&. These constant expressions are suitable for use in #if preprocessing directives\&. An application that wants to use \fBhalf\fR and \fBhalf\fR\fB\fIn\fR\fR types will need to include the #pragma OPENCL EXTENSION \fBcl_khr_fp16\fR(3clc) : enable directive\&. .PP .TS tab(:); l l l l l l l l l l l l l l l l l l. T{ #define HALF_DIG T}:T{ 3 T} T{ #define HALF_MANT_DIG T}:T{ 11 T} T{ #define HALF_MAX_10_EXP T}:T{ +4 T} T{ #define HALF_MAX_EXP T}:T{ +16 T} T{ #define HALF_MIN_10_EXP T}:T{ \-4 T} T{ #define HALF_MIN_EXP T}:T{ \-13 T} T{ #define HALF_MAX T}:T{ 0x1\&.ffcp15h T} T{ #define HALF_MIN T}:T{ 0x1\&.0p\-14h T} T{ #define HALF_EPSILON T}:T{ 0x1\&.0p\-10h T} .TE .sp 1 .PP The macro names given in the following list must use the values specified\&. These constant expressions are suitable for use in #if preprocessing directives\&. .PP .TS tab(:); l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l. T{ #define CHAR_BIT T}:T{ 8 T} T{ #define CHAR_MAX T}:T{ SCHAR_MAX T} T{ #define CHAR_MIN T}:T{ SCHAR_MIN T} T{ #define INT_MAX T}:T{ 2147483647 T} T{ #define INT_MIN T}:T{ (\-2147483647\- 1) T} T{ #define LONG_MAX T}:T{ 0x7fffffffffffffffL T} T{ #define LONG_MIN T}:T{ (\-0x7fffffffffffffffL\- 1) T} T{ #define SCHAR_MAX T}:T{ 127 T} T{ #define SCHAR_MIN T}:T{ (\-127 \- 1) T} T{ #define SHRT_MAX T}:T{ 32767 T} T{ #define SHRT_MIN T}:T{ (\-32767\- 1) T} T{ #define UCHAR_MAX T}:T{ 255 T} T{ #define USHRT_MAX T}:T{ 65535 T} T{ #define UINT_MAX T}:T{ 0xffffffff T} T{ #define ULONG_MAX T}:T{ 0xffffffffffffffffUL T} .TE .sp 1 .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBmathFunctions\fR(3clc), \fBmathConstants\fR(3clc), \fBFP_CONTRACT\fR(3clc), \fBscalarDataTypes\fR(3clc), \fBvectorDataTypes\fR(3clc), \fBreservedDataTypes\fR(3clc), \fBotherDataTypes\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 252, section 6.12.2.1 - Floating-point macros and pragmas .RE