ISFINITE(3clc)
β¨ ISFINITE(3clc) β¨
okay bestie, welcome to the OpenCL Manual π this is isfinite from the 3clc girlies, and we're gonna vibe check your floats together π«Ά
πΈ NAME πΈ
isfinite β test for finite value. that's it, that's the whole job π
int isfinite(float );
intn isfinite(floatn );
int isfinite(double );
longn isfinite(doublen );
int isfinite (half) // if half
extension enabled
shortn isfinite (halfn) // if half
extension enabled
no cap, those are the exact signatures, don't come for me π
π¦ DESCRIPTION π¦
Test for finite value. literally just... is it finite? yes or no. icon behavior β¨
π NOTES π
okay so here's the tea β
- If an implementation extends this specification to support IEEE-754 flags or exceptions, then all built-in relational functions shall proceed without raising the invalid floating-point exception when one or more of the operands are NaNs. so no dramatic meltdown when a NaN walks in, she's unbothered π
- The built-in relational functions are extended with
cl_khr_fp16(3clc)to include appropriate versions of functions that takehalf, andhalf{2|3|4|8|16}as arguments and return values. the half girlies get to play too π§ - The function returns a
0if the specified relation is false and a1if the specified relation is true for scalar argument types. These functions shall return a0if the specified relation is false and a- 1(i.e. all bits set) if the specified relation is true for vector argument types. π
β οΈ bestie do NOT mix these up β scalars get0/1, vectors get0/- 1(all bits set). that's giving very different energy fr fr π
π SPECIFICATION π
OpenCL Specification[1]
π SEE ALSO π
π AUTHORS π
The Khronos Group
π COPYRIGHT π
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 following condition:
the above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials.
(yes queen, keep the notice, it's the law β¨)
π NOTES π
- OpenCL Specification β page 264, section 6.12.6 - Relational Functions
and that's the whole page bestie!! π source + version: The Khronos Group, dated 01/14/2021, filed under ISFINITE(3clc). go check if your floats are finite, periodt π
β¨π¦
π¦ where this page comes from
- ubuntu jammy: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- ubuntu noble: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms