RADIANS(3clc)
π« RADIANS(3clc) π«
okay bestie, sit down, because we're doing RADIANS today β straight out of the OpenCL Manual, no cap. it's giving trigonometry but make it GPU. β¨
π NAME π
radians β converts degrees to radians. that's it. that's the whole job. π
gentype radians(gentype degrees);
π¦ DESCRIPTION π¦
she takes your degrees and turns them into radians, literally:
(pi / 180) * degrees
that's the vibe. degree in, radian out, slay. π₯
π NOTES π
okay so about gentype β it's a generic type name, which is just fancy speak for "this function is flexible and accepts a whole squad of types". the generic type name gentype means the function can take float, float2, float3, float4, float8, float16, double, double2, double3, double4, double8, or double16 as the type for the arguments. yes, all twelve. she's versatile like that. π
the generic type name gentypef means the function can take float, float2, float3, float4, float8, or float16 as the type for the arguments. (the f is for float, iykyk π)
the generic type name gentyped means the function can take double, double2, double3, double4, double8, or double16 as the type for the arguments. (the d is for double, she's bougie π)
lowkey important: the built-in common functions are implemented using the round to nearest even rounding mode. remember that bestie, it comes up.
and if it's extended with cl_khr_fp16(3clc), the generic type name gentype also includes half and half{2|3|4|8|16}. tiny floats, iconic behaviour. π§
π SPECIFICATION π
OpenCL Specification[1]
π SEE ALSO π
(the reverse of this one, go look, she's cute too π«Ά)
π AUTHORS π
The Khronos Group
βοΈ 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.
π NOTES (the footnote one, bestie) π
- OpenCL Specification page 260, section 6.12.4 - Common Functions
and that's the whole page, we ate and left no crumbs. π½οΈπ this was RADIANS(3clc) from the OpenCL Manual, brought to you by The Khronos Group, dated 01/14/2021. go convert some degrees, bestie. bye!! πΈπ¦β¨
π¦ 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