[clang] [HLSL] Implement the HLSL distance intrinsic (PR #122357)
Joshua Batista via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 9 12:55:22 PST 2025
================
@@ -871,6 +871,34 @@ float3 degrees(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
float4 degrees(float4);
+//===----------------------------------------------------------------------===//
+// distance builtins
+//===----------------------------------------------------------------------===//
+
+/// \fn K distance(T X, T Y)
+/// \brief Returns a distance scalar between two vectors of \a X and \a Y.
----------------
bob80905 wrote:
The scalar overload conflicts with the comment. Wouldn't
"Returns a distance scalar between two vectors or scalars X and Y" be better?
https://github.com/llvm/llvm-project/pull/122357
More information about the cfe-commits
mailing list