NORMALIZE(3clc)
π NORMALIZE(3clc) π
okay bestie, welcome to the OpenCL Manual, section 3clc β today's main character is normalize, and she's literally just here to make your vectors the right length. no cap. β¨
πΈ NAME πΈ
normalize β Normal vector length 1.
floatn normalize(floatn p);
doublen normalize(doublen p);
gentype normalize (gentype p) //
if half extension enabled
π¦ DESCRIPTION π¦
Gives you back a vector pointing the exact same way as p, but with a length of 1. same direction, new length, glow-up complete. π
π NOTES π
k so here's the tea, and it matters:
- The built-in geometric functions work component-wise. The description? Per-component. every single one of them, no exceptions.
floatnmeansfloat,float2,float3, orfloat4.doublenmeansdouble,double2,double3, ordouble4. that's the whole roster, periodt.- These built-in geometric functions are implemented using the round to nearest even rounding mode. iconic behavior, honestly.
- The geometric functions can be implemented using contractions such as
mad(3clc)orfma(3clc). slay. - If extended with
cl_khr_fp16(3clc), the generic type namegentypemay indicatehalfandhalf{2|3|4}as arguments and return values. half girlies get to play too π«Ά
π SPECIFICATION π
OpenCL Specification[1]
π SEE ALSO π
fast_normalize(3clc) geometricFunctions(3clc)
π 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 following condition:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials.
π NOTES π
- OpenCL Specification page 262, section 6.12.5 - Geometric Functions
and that's the whole page, bestie π this one came to you from The Khronos Group, dated 01/14/2021, filed under NORMALIZE(3clc) in the OpenCL Manual β go normalize something and make it iconic πβ
π¦ 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