CEIL(3clc)

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

πŸ’– CEIL β€” the OpenCL manual page, but make it make sense πŸ’–

okay so bestie, this is the man page for CEIL(3clc) out of the OpenCL Manual β€” it's short, it's sweet, it's literally just rounding a number up toward infinity, and we're gonna go through every single crumb of it together πŸ“βœ¨


✨ NAME ✨

ceil β€” round to integer toward + infinity πŸŽ€

gentype ceil(gentype );

like that's it. that's the whole vibe. it takes your gentype and gives you back a gentype that's been yeeted upward to the nearest whole number πŸ’…


🌸 DESCRIPTION 🌸

ceil rounds to integral value using the round to +ve infinity rounding mode. periodt. no matter how tiny the fractional part is, if there's anything after the decimal point, it's going up, not down πŸ¦‹


🫢 NOTES 🫢

okay this is the part where the man page gets chatty, and honestly? we love her for it.

  • the vector versions of the math functions operate component-wise. the description is per-component. so like, each lane does its own little thing, no cross-talk, no drama 🌈
  • the built-in math functions are not affected by the prevailing rounding mode in the calling environment, and always return the same value as they would if called with the round to nearest even rounding mode. iykyk β€” your environment's rounding mode is not the main character here πŸ’€
  • the built-in math functions take scalar or vector arguments. for any specific use of these functions, the actual type has to be the same for all arguments and the return type, unless otherwise specified. no mixing, bestie, the type match has to eat πŸ”₯
  • 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), the generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values 🧚
  • 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] ⭐


πŸ‘€ SEE ALSO πŸ‘€


πŸ‘‘ AUTHORS πŸ‘‘

The Khronos Group 🫢


okay here's the legal bit, verbatim, no edits, because we respect the paperwork bestie 😌

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.

no cap, that permission notice has to travel with every copy or substantial portion of the Materials. it's the plus-one that's always invited πŸŽ€

πŸ—’οΈ NOTES πŸ—’οΈ

(the footnote kind, not the vibe kind β€” keep scrolling πŸ’€)

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

and that's the whole page, bestie!! 🌸 this beauty is brought to you by The Khronos Group, dated 01/14/2021 β€” and yeah, the source is the OpenCL Manual itself. now go round something up, you absolute icon πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from