BITSELECT(3clc)

๐Ÿ“ฆ
version 1.0~svn33624 ยท 3 versions
, in ubuntu jammy, ubuntu noble

๐Ÿ’– BITSELECT(3clc) โ€” the OpenCL Manual, but make it cute ๐Ÿ’–

okay bestie, pull up a chair, we're doing bitselect from the OpenCL manual and it's genuinely lowkey iconic ๐ŸŽ€


โœจ NAME โœจ

bitselect โ€” each bit of the result is the corresponding bit of a if the corresponding bit of c is 0 ๐Ÿซถ

gentype bitselect(gentype a, gentype b, gentype c);

halfn bitselect (halfn a, halfn b,
halfn c)      // if half extension
enabled

๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so here's the whole vibe: every single bit of the result is the corresponding bit of a if the corresponding bit of c is 0 ๐Ÿ’… otherwise? it's the corresponding bit of b. that's it. that's the function. a little bit-picking queen ๐Ÿ‘‘


๐Ÿฆ‹ NOTES ๐Ÿฆ‹

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 like, NaNs are not the drama here, periodt ๐Ÿ’€

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 argument type gentype can be char, charn, uchar, ucharn, short, shortn, ushort, ushortn, int, intn, uint, uintn, long, longn, ulong, ulongn, float, floatn, double, and doublen. that's the whole roster, no cap ๐Ÿ‘‘


๐Ÿ“œ 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 โญ

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

and that's the whole page bestie ๐ŸŒˆ this absolute banger was brought to you by The Khronos Group, dated 01/14/2021, filed under BITSELECT(3clc) โ€” go forth and select your bits, you main character ๐Ÿซถ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from