MIN(3clc)

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

πŸ’– MIN β€” bestie edition πŸ’–

okay so this is min from the OpenCL Manual, and she is min(3clc) if you're being formal about it. pull up a chair, we're finding the lesser of two values and we're doing it adorably. πŸŽ€


✨ NAME ✨

min β€” returns the lesser of two values. literally just vibes-based comparison, no cap. πŸ¦‹


🌸 SYNOPSIS 🌸

bestie the signatures are giving versatile. here they are, verbatim, don't touch:

gentype min(gentype x, gentype y);

gentypef min(gentypef x, float y);

gentyped min(gentyped x, double y);

gentype min (gentype x, half y)      //
if half extension enabled

yes that last one has the comment in the signature. iconic. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

okay so min returns y if y < x, otherwise it returns x. that's the whole thing. that's the tea. β˜•

🚨 MAJOR WARNING 🚨 if x and y are infinite or NaN, the return values are undefined. not "kinda weird", not "close enough" β€” undefined. don't come crying to me. 😭

πŸŽ€ NOTES πŸŽ€

  • the generic type name gentype is used to indicate that the function can take float, float2, float3, float4, float8, float16, double, double2, double3, double4, double8, or double16 as the type for the arguments. so many options, she's flexible, we love that. ✨
  • the generic type name gentypef is used to indicate that the function can take float, float2, float3, float4, float8, or float16 as the type for the arguments. float girlies only. πŸ’–
  • the generic type name gentyped is used to indicate that the function can take double, double2, double3, double4, double8, or double16 as the type for the arguments. double precision divas, this one's for you. πŸ‘‘
  • the built-in common functions are implemented using the round to nearest even rounding mode. that's the rules, babe. no arguing. 🌈
  • if extended with cl_khr_fp16(3clc), generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values. so like, half the size, double the drama. 🧚

⭐ SPECIFICATION ⭐

OpenCL Specification[1] β€” the source material, the blueprint, the moment. πŸ”₯


🫢 SEE ALSO 🫢


πŸ‘‘ AUTHORS πŸ‘‘

The Khronos Group. legends only, honestly. πŸ’œ


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 conditions:

the above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials. periodt. πŸ’…


πŸ’€ NOTES (yes, again, the numbered kind) πŸ’€

  1. OpenCL Specification β€” page 260, section 6.12.4 - Common Functions

and that's the whole page bestie πŸ“ this lil manual is brought to you by The Khronos Group, dated 01/14/2021, and it lives at MIN(3clc) forever and ever. mwah. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from