CEIL(3clc)
π 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
gentypeis used to indicate that the function can takefloat,float2,float3,float4,float8,float16,double,double2,double3,double4,double8, ordouble16as the type for the arguments π - if extended with
cl_khr_fp16(3clc), the generic type namegentypemay indicatehalfandhalf{2|3|4|8|16}as arguments and return values π§ - the generic type name
gentypefis used to indicate that the function can takefloat,float2,float3,float4,float8, orfloat16as the type for the arguments π - the generic type name
gentypedis used to indicate that the function can takedouble,double2,double3,double4,double8, ordouble16as the type for the arguments π
π SPECIFICATION π
OpenCL Specification[1] β
π SEE ALSO π
mathFunctions(3clc)β go say hi to the whole math family, they're all iconic π
π AUTHORS π
The Khronos Group π«Ά
Β©οΈ COPYRIGHT Β©οΈ
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 π)
- 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
- ubuntu jammy: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- ubuntu noble: opencl-1.2-man-doc 1.0~svn33624-5 Β· other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms