ISGREATEREQUAL(3clc)

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

🌸 ISGREATEREQUAL 🌸

okay bestie, welcome to the OpenCL Manual page for isgreaterequal(3clc) πŸ’– β€” yes that's the manual name, yes it's a mouthful, no we're not renaming it, sit down, sip your strawberry matcha, we're doing math πŸ“


✨ NAME ✨

isgreaterequal β€” literally just compares x >= y. that's it. that's the whole gig. πŸ‘‘

here's every single flavor it comes in, and I mean every one:

int isgreaterequal(float x, float y);
intn isgreaterequal(floatn x, floatn y);
int isgreaterequal(double x, double y);
longn isgreaterequal(doublen x, doublen y);
int isgreaterequal (half x, half y)
// if half extension enabled
shortn isgreaterequal (halfn x, halfn
y)   // if half extension enabled
note the half ones only exist if half extension enabled, bestie. no extension, no half vibes. 🧚

πŸ’« DESCRIPTION πŸ’«

returns the component-wise compare of x >= y. so like, it goes down the list, checks each pair, and tells you how each one did. slay. ✨


πŸ”₯ NOTES πŸ”₯

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. like, they just keep it moving. no dramatic meltdown. πŸ’…

the built-in relational functions get 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. tiny numbers, big energy. πŸŽ€

now the important part, the return values, pay attention bestie:

  • for scalar argument types: returns a 0 if the specified relation is false, and a 1 if the specified relation is true.
  • for vector argument types: returns a 0 if the specified relation is false, and a - 1 (i.e. all bits set) if the specified relation is true.

and the group chat behavior of the whole relational crew:

isequal, isgreater, isgreaterequal, isless, islessequal, and islessgreater always return 0 if either argument is not a number (NaN). no cap.

isnotequal is the messy one (affectionate): it returns 1 if one or both arguments are not a number (NaN) and the argument type is a scalar, and returns -1 if one or both arguments are not a number (NaN) and the argument type is a vector. πŸ™ˆ


πŸ“œ SPECIFICATION πŸ“œ

OpenCL Specification[1]


πŸ¦‹ SEE ALSO πŸ¦‹

relationalFunctions(3clc)


πŸ’œ 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 condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.


πŸ“ NOTES πŸ“ (the footnote one, not the other one, iykyk)

  1. OpenCL Specification page 264, section 6.12.6 - Relational Functions

and that's the whole page, bestie!! 🫢 this came from The Khronos Group, dated 01/14/2021, and it lives under the name ISGREATEREQUAL(3clc). go forth and compare responsibly. mwah πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from