In this series, I am casually asking GPT-4 to solve some old problems, mainly focusing on software optimization and algorithm development. The goal is to show the capability of the model to understand natural language and solve easy to medium problems one would typically find in day-to-day work in software engineering.
QUESTION:
Using C++ 20 and AVX (AVX, AVX2 and AVX-512) compiler intrinsics implement fast calculation of distance between a 3D point and a line segment, using 32-bit float precision