FLOOR(3clc)
β¨ FLOOR(3clc) β¨
okay bestie, welcome to the OpenCL Manual π this is FLOOR(3clc) and it's literally one of the math girlies, she's giving "round down and chill" and honestly? obsessed.
π NAME π
floor β round to integer toward negative infinity, no cap.
gentype floor(gentype );
like. that's her. that's the whole vibe. π¦
π DESCRIPTION π
floor rounds to an integral value using the round to negative infinity rounding mode.
so if you're sitting at like 2.9 and you call floor, you get 2. she does NOT round up, she rounds down, always, toward negative infinity, periodt. π
πΈ NOTES πΈ
okay this is the important part, pay attention bestie, i'm gonna need you to lock in π
- The vector versions of the math functions operate component-wise. The description is per-component. so every lane does its own lil thing, independently, main character energy in each slot. β¨
- 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. like, she does not care what your environment is going through, she's stable, she's consistent, she's that girl. π
- 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, no chaos, we match here. π«Ά
- 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. pick your fighter. π₯ - If extended with
cl_khr_fp16(3clc), generic type namegentypemay indicatehalfandhalf{2|3|4|8|16}as arguments and return values. half precision has entered the chat π - The generic type name
gentypefis used to indicate that the function can takefloat,float2,float3,float4,float8, orfloat16as the type for the arguments. float girlies only. π - The generic type name
gentypedis used to indicate that the function can takedouble,double2,double3,double4,double8, ordouble16as the type for the arguments. double girlies only, precision princesses. π
π SPECIFICATION π
OpenCL Specification[1] β she's official, she's documented, she's in the book. π
π SEE ALSO π
mathFunctions(3clc)β go read the whole math squad, iykyk
π AUTHORS π
The Khronos Group. yeah. the Khronos Group. iconic behavior only. π
π COPYRIGHT π
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.
(translation: use it, love it, but keep the receipt bestie π§Ύπ)
π NOTES π
OpenCL Specificationβ page 244, section 6.12.2 - Math Functions. the exact receipts, go look it up, no guessing. π
and that's the whole page!! this manual page came from The Khronos Group, dated 01/14/2021, and it lives in section 3clc as FLOOR(3clc) β mwah, take care of her, she rounds down so you don't have to πβ¨
π¦ 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