This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: Unlicense | |
// Created by Andrej Redeky © 2024. | |
// | |
// Demo of how we could use the C++20 to generalize common vector math. It works with basic | |
// standard vector structures with 2-4 dimensions via pre-defined Vector2D-Vector4D, and also | |
// with vectors with some arbitrary number of dimensions via pre-defined VectorND. All of the | |
// demo structures are fully generic, supporting any scalar type. The demo heavily relies on | |
// auto-vectorization features of the compiler to generate optimal code for different cases | |
// without the need to manually use different SIMD intrinsics for different architectures. | |
// |