RADIANS(3clc)

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

πŸ’« 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 Β© 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) πŸ“Ž

  1. 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