MACROLIMITS(3clc)

πŸ“¦
version 1.0~svn33624 Β· 3 versions
, in ubuntu jammy, ubuntu noble

πŸ’– MACROS AND LIMITS πŸ’–

okay bestie, welcome to the OpenCL Manual page for MACROS AND LIMITS(3clc) β€” yes the title is literally in all caps like that, she's dramatic, we love her πŸŽ€


✨ NAME ✨

Macros_and_Limits β€” macros for math limits, and bestie, that's the whole vibe πŸ’…


🌸 DESCRIPTION 🌸

The macro names in the list below must use the values specified. These constant expressions are suitable for use in #if preprocessing directives. no cap, the numbers are the numbers πŸ“Œ

#define FLT_DIG          6
#define FLT_MANT_DIG     24
#define FLT_MAX_10_EXP   +38
#define FLT_MAX_EXP      +128
#define FLT_MIN_10_EXP   -37
#define FLT_MIN_EXP      -125
#define FLT_RADIX        2
#define FLT_MAX          0x1.fffffep127f
#define FLT_MIN          0x1.0p-126f
#define FLT_EPSILON      0x1.0p-23f

The macro names in the next list β€” these ones are only available if the double option is supported β€” must use the values specified. These constant expressions are suitable for use in #if preprocessing directives. slay πŸ¦‹

#define DBL_DIG          15
#define DBL_MANT_DIG     53
#define DBL_MAX_10_EXP   +308
#define DBL_MAX_EXP      +1024
#define DBL_MIN_10_EXP   -307
#define DBL_MIN_EXP      -1021
#define DBL_MAX          0x1.fffffffffffffp1023
#define DBL_MIN          0x1.0p-1022
#define DBL_EPSILON      0x1.0p-52

The macro names in the following list must use the values specified. These constant expressions are suitable for use in #if preprocessing directives. Also, heads up: an application that wants to use half and halfn types will need to include the #pragma OPENCL EXTENSION cl_khr_fp16(3clc) : enable directive. like, you literally cannot skip that step 🫢

#define HALF_DIG          3
#define HALF_MANT_DIG     11
#define HALF_MAX_10_EXP   +4
#define HALF_MAX_EXP      +16
#define HALF_MIN_10_EXP   -4
#define HALF_MIN_EXP      -13
#define HALF_MAX          0x1.ffcp15h
#define HALF_MIN          0x1.0p-14h
#define HALF_EPSILON      0x1.0p-10h

The macro names in the following list must use the values specified. These constant expressions are suitable for use in #if preprocessing directives. int energy, iconic behavior ✨

#define CHAR_BIT    8
#define CHAR_MAX    SCHAR_MAX
#define CHAR_MIN    SCHAR_MIN
#define INT_MAX     2147483647
#define INT_MIN     (-2147483647- 1)
#define LONG_MAX    0x7fffffffffffffffL
#define LONG_MIN    (-0x7fffffffffffffffL- 1)
#define SCHAR_MAX   127
#define SCHAR_MIN   (-127 - 1)
#define SHRT_MAX    32767
#define SHRT_MIN    (-32767- 1)
#define UCHAR_MAX   255
#define USHRT_MAX   65535
#define UINT_MAX    0xffffffff
#define ULONG_MAX   0xffffffffffffffffUL

πŸ‘‘ SPECIFICATION πŸ‘‘

OpenCL Specification[1] β€” that's the source of truth, periodt πŸ’œ


🌈 SEE ALSO 🌈

go read those too bestie, the whole little family is worth your time 🧚


πŸ’œ AUTHORS πŸ’œ

The Khronos Group β€” the actual main characters, no notes πŸ‘‘


Copyright Β© 2007-2011 The Khronos Group Inc.

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.

like yes, keep the notice, it's not optional πŸ’…


⭐ NOTES ⭐

  1. OpenCL Specification page 252, section 6.12.2.1 - Floating-point macros and pragmas

fr fr, that's the whole page. every macro, every value, every directive, exactly where it belongs 🌟

and that's a wrap, bestie β€” this beauty is brought to you by The Khronos Group, dated 01/14/2021, and she's the MACROS AND LIMITS(3clc) page. bye ilysm, go compile something cute πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from