ISLESSEQUAL(3clc)
π ISLESSEQUAL β the 3clc era π
okay bestie, welcome to the OpenCL manual, this one's called islessequal(3clc) and it's literally just here to answer one question: is x less than or equal to y? that's it. that's the whole personality. π¦
β¨ NAME β¨
islessequal β the compare of x <= y. no cap.
here's every single form it comes in, exactly as written, don't @ me:
int islessequal(float x, float y);
intn islessequal(floatn x, floatn y);
int islessequal(double x, double y);
longn islessequal(doublen x, doublen y);
int islessequal (half x, half y) //
if half extension enabled
shortn islessequal (halfn x, halfn y)
// if half extension enabled
see those last two? they only show up if the half extension is enabled. gatekept fr fr. π
πΈ DESCRIPTION πΈ
it returns the component-wise compare of x <= y. component-wise meaning it goes through your vectors element by element, one by one, like a bestie checking every single text in the group chat. π
π NOTES π
okay so here's the tea, and this part actually matters:
- if an implementation extends this spec 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. yes, even with NaN in the mix. iconic behaviour honestly. π
- the built-in relational functions get extended with
cl_khr_fp16(3clc)to include the appropriate versions of functions that takehalf, andhalf{2|3|4|8|16}as arguments and return values. glow up courtesy of an extension. β¨ - for scalar argument types, the function returns a
0if the specified relation is false and a1if the specified relation is true. clean, simple, no drama. - for vector argument types, it shall return a
0if the specified relation is false and a- 1(i.e. all bits set) if the specified relation is true. not a plain1, bestie β all bits set. that's the vibe check right there. π«Ά - and here's the big one: the relational functions
isequal,isgreater,isgreaterequal,isless,islessequal, andislessgreateralways return 0 if either argument is not a number (NaN). meanwhileisnotequalreturns1if one or both arguments are not a number (NaN) and the argument type is a scalar, and returns-1if one or both arguments are not a number (NaN) and the argument type is a vector. soisnotequalis the one friend who says yes when everyone else says no. main character energy tbh. π
π SPECIFICATION π
OpenCL Specification[1] β go read it, it's giving documentation. π
π SEE ALSO π
relationalFunctions(3clc)β the whole squad. go meet the family. π
π 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 condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.
β οΈ yes this is the real license text and yes you have to keep it. don't touch it, don't paraphrase it, don't vibe-edit it. it's load-bearing. π
π NOTES π
the footnote kind, not the tea-spilling kind:
- OpenCL Specification β page 264, section 6.12.6 - Relational Functions π
that's the whole page bestie!! π every option, every return value, every NaN rule, untouched, just narrated with love. mwah. π
The Khronos Group Β· 01/14/2021 Β· ISLESSEQUAL(3clc) β that's a wrap, slay, 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