ISFINITE(3clc)

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

✨ 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 take half, and half{2|3|4|8|16} as arguments and return values. the half girlies get to play too 🧚
  • The function returns a 0 if the specified relation is false and a 1 if the specified relation is true for scalar argument types. These functions shall return a 0 if 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 get 0/1, vectors get 0/- 1 (all bits set). that's giving very different energy fr fr 😭

🌈 SPECIFICATION 🌈

OpenCL Specification[1]


πŸ’œ SEE ALSO πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

The Khronos Group


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 πŸ’–

  1. 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