DOT(3clc)

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

✨ DOT(3clc) ✨

okay bestie, welcome to dot from the OpenCL Manual πŸ’– this one's a lil geometric function and she is so simple it's almost rude. let's get into it πŸ¦‹


πŸ’… NAME πŸ’…

dot β€” Dot product. that's it. that's the whole job. πŸ‘‘

float dot(floatn p0, floatn p1);

double dot(doublen p0, doublen p1);

half dot (gentype p0, gentype p1)
// if half extension enabled

look at her. three lil signatures, all vibes, no drama 🌸


🌈 DESCRIPTION 🌈

Computes the dot product. genuinely that is the entire description, she's lowkey iconic for how little she needs to say πŸ’€


πŸŽ€ NOTES πŸŽ€

okay so here's the tea, and it matters:

  • The built-in geometric functions operate component-wise. The description is per-component. like, each lane does its own lil thing, no cap.
  • floatn is float, float2, float3, or float4 β€” so pick your size bestie ✨
  • doublen is double, double2, double3, or double4 β€” same energy, more precision πŸ’œ
  • The built-in geometric functions are implemented using the round to nearest even rounding mode. yes, that one. the banker's rounding one. she's real and she's here.
  • The geometric functions can be implemented using contractions such as mad(3clc) or fma(3clc). so like, the compiler might fuse things. iykyk πŸ”₯
  • If extended with cl_khr_fp16(3clc), the generic type name gentype may indicate half and half{2|3|4} as arguments. so when the half extension is enabled, gentype can be half, half2, half3, or half4 🧚

πŸ“œ SPECIFICATION πŸ“œ

OpenCL Specification[1] β€” she's official, she's certified, she's got receipts 🫢


πŸ‘€ SEE ALSO πŸ‘€


πŸ‘‘ AUTHORS πŸ‘‘

The Khronos Group. periodt. πŸ’…


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 conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials.

yes bestie, i copy-pasted the legal text word for word. you do not freestyle a license. that's the one thing you never remix 😭

🌸 NOTES 🌸

  1. OpenCL Specification β€” page 262, section 6.12.5 - Geometric Functions. go look it up, it's giving authoritative ✨

and that's the whole page, angel πŸ¦‹ this lil manual came from The Khronos Group and it's dated 01/14/2021 β€” the DOT(3clc) era, truly a moment. take care of her, she just multiplies and sums πŸ’– bye bestie!! πŸŽ€

πŸ“¦ where this page comes from