From 20174ac09115e396dee964119ccec1bf96cac354 Mon Sep 17 00:00:00 2001 From: MajidAbdelilah Date: Fri, 8 Nov 2024 20:26:24 +0100 Subject: [PATCH] testing --- Physics3D/math/linalg/vec.h | 98 ++++++++++++++++++------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/Physics3D/math/linalg/vec.h b/Physics3D/math/linalg/vec.h index c1ec0c19..34f9308c 100644 --- a/Physics3D/math/linalg/vec.h +++ b/Physics3D/math/linalg/vec.h @@ -773,32 +773,32 @@ constexpr T pointToLineDistanceSquared(const Vector& line, const Vector template -requires (!(std::is_arithmetic_v)) +// requires (!(std::is_arithmetic_v)) constexpr Vector elementWiseMul(const Vector& first, const Vector& second) noexcept { Vector result; for(size_t i = 0; i < Size; i++) result[i] = first[i] * second[i]; return result; } -template -requires std::is_arithmetic_v -constexpr Vector elementWiseMul(const Vector& first, const Vector& second) noexcept { - stdx::fixed_size_simd result; - stdx::fixed_size_simd first_simd(&first[0], stdx::element_aligned); - stdx::fixed_size_simd second_simd(&second[0], stdx::element_aligned); - result = first_simd * second_simd; - Vector result_vec; - result.copy_to(result_vec.data, stdx::element_aligned); - return result_vec; - - // Vector result; - // for(size_t i = 0; i < Size; i++) - // result[i] = first[i] * second[i]; - // return result; -} +// template +// requires std::is_arithmetic_v +// constexpr Vector elementWiseMul(const Vector& first, const Vector& second) noexcept { +// stdx::fixed_size_simd result; +// stdx::fixed_size_simd first_simd(&first[0], stdx::element_aligned); +// stdx::fixed_size_simd second_simd(&second[0], stdx::element_aligned); +// result = first_simd * second_simd; +// Vector result_vec; +// result.copy_to(result_vec.data, stdx::element_aligned); +// return result_vec; + +// // Vector result; +// // for(size_t i = 0; i < Size; i++) +// // result[i] = first[i] * second[i]; +// // return result; +// } template -requires (!(std::is_arithmetic_v)) +// requires (!(std::is_arithmetic_v)) constexpr Vector elementWiseSquare(const Vector& vec) noexcept { Vector result; for(size_t i = 0; i < Size; i++) @@ -806,24 +806,24 @@ constexpr Vector elementWiseSquare(const Vector& vec) noexcept return result; } -template -requires std::is_arithmetic_v -constexpr Vector elementWiseSquare(const Vector& vec) noexcept { - stdx::fixed_size_simd result; - stdx::fixed_size_simd vec_simd(&vec[0], stdx::element_aligned); - result = vec_simd * vec_simd; - Vector result_vec; - result.copy_to(result_vec.data, stdx::element_aligned); - return result_vec; - - // Vector result; - // for(size_t i = 0; i < Size; i++) - // result[i] = vec[i] * vec[i]; - // return result; -} +// template +// requires std::is_arithmetic_v +// constexpr Vector elementWiseSquare(const Vector& vec) noexcept { +// stdx::fixed_size_simd result; +// stdx::fixed_size_simd vec_simd(&vec[0], stdx::element_aligned); +// result = vec_simd * vec_simd; +// Vector result_vec; +// result.copy_to(result_vec.data, stdx::element_aligned); +// return result_vec; + +// // Vector result; +// // for(size_t i = 0; i < Size; i++) +// // result[i] = vec[i] * vec[i]; +// // return result; +// } template -requires (!(std::is_arithmetic_v)) +// requires (!(std::is_arithmetic_v)) constexpr Vector elementWiseCube(const Vector& vec) noexcept { Vector result; for(size_t i = 0; i < Size; i++) @@ -831,21 +831,21 @@ constexpr Vector elementWiseCube(const Vector& vec) noexcept { return result; } -template -requires std::is_arithmetic_v -constexpr Vector elementWiseCube(const Vector& vec) noexcept { - stdx::fixed_size_simd result; - stdx::fixed_size_simd vec_simd(&vec[0], stdx::element_aligned); - result = vec_simd * vec_simd * vec_simd; - Vector result_vec; - result.copy_to(result_vec.data, stdx::element_aligned); - return result_vec; - - // Vector result; - // for(size_t i = 0; i < Size; i++) - // result[i] = vec[i] * vec[i] * vec[i]; - // return result; -} +// template +// requires std::is_arithmetic_v +// constexpr Vector elementWiseCube(const Vector& vec) noexcept { +// stdx::fixed_size_simd result; +// stdx::fixed_size_simd vec_simd(&vec[0], stdx::element_aligned); +// result = vec_simd * vec_simd * vec_simd; +// Vector result_vec; +// result.copy_to(result_vec.data, stdx::element_aligned); +// return result_vec; + +// // Vector result; +// // for(size_t i = 0; i < Size; i++) +// // result[i] = vec[i] * vec[i] * vec[i]; +// // return result; +// } /* computes ( a.y * b.z + a.z * b.y,