NORMALIZE(3clc)

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

πŸ’– 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.
  • floatn means float, float2, float3, or float4. doublen means double, double2, double3, or double4. 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) or fma(3clc). slay.
  • If extended with cl_khr_fp16(3clc), the generic type name gentype may indicate half and half{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 Β© 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 πŸ“

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