NAN(3clc)

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

✨ NAN(3clc) β€” the OpenCL Manual's lil' NaN factory ✨

okay bestie, welcome to NAN, straight outta the OpenCL Manual πŸ’– this is the page about making yourself a quiet NaN, and honestly? it's giving "short but iconic."


πŸŽ€ NAME πŸŽ€

nan β€” Quiet NaN. that's it. that's the whole vibe. a quiet queen. πŸ€«πŸ‘‘


🌸 SYNOPSIS 🌸

floatn nan(uintn nancode);

float nan(uintn nancode);

doublen nan(ulongn nancode);

double nan(ulong nancode);

halfn nan (ushortn nancode)      // if
half extension enabled

like. look at all these overloads. so many flavors of the same energy. ✨


πŸ’… DESCRIPTION πŸ’…

nan returns a quiet NaN. and here's the lil detail that slaps: the nancode may be placed in the significand of the resulting NaN. so you can sneak your own lil signature into the NaN itself. it's your NaN, you get to decorate it πŸŽ€


πŸ¦‹ NOTES πŸ¦‹

okay this is the part where I gotta be fr fr, because there's a whole pile of ground rules:

  • the vector versions of the math functions operate component-wise. the description is per-component. so like, per lil lane, yk?
  • the built-in math functions are not affected by the prevailing rounding mode in the calling environment, and they always return the same value as they would if called with the round to nearest even rounding mode. periodt. they don't care what mood your environment is in πŸ’…
  • the built-in math functions take scalar or vector arguments. for any specific use of these function, the actual type has to be the same for all arguments and the return type unless otherwise specified. no mix-and-matching, bestie 😭
  • 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.
  • 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. half girlies rise up πŸ™ˆ
  • 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.
  • 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.

🌈 SPECIFICATION 🌈

OpenCL Specification[1] β€” yep, that's the whole thing. iconic minimalism. ✨


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

The Khronos Group. the founders. the main characters. 🧚


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, ALL of them. no skipping, bestie. 🫢

🌟 NOTES (the numbered kind) 🌟

  1. OpenCL Specification β€” page 244, section 6.12.2 - Math Functions πŸ“–

and that's the whole page, bestie!! πŸŽ€ sending you off with the official sign-off: this was brought to you by The Khronos Group, dated 01/14/2021, and it lives at NAN(3clc) in the OpenCL Manual. slay, stay quiet, stay NaN πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from