/* * Copyright (c) 2021, Stephan Unverwerth * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace SoftGPU { ALWAYS_INLINE static constexpr Vector2 expand4(Vector2 const& v) { return Vector2 { AK::SIMD::expand4(v.x()), AK::SIMD::expand4(v.y()), }; } ALWAYS_INLINE static constexpr Vector3 expand4(Vector3 const& v) { return Vector3 { AK::SIMD::expand4(v.x()), AK::SIMD::expand4(v.y()), AK::SIMD::expand4(v.z()), }; } ALWAYS_INLINE static constexpr Vector4 expand4(Vector4 const& v) { return Vector4 { AK::SIMD::expand4(v.x()), AK::SIMD::expand4(v.y()), AK::SIMD::expand4(v.z()), AK::SIMD::expand4(v.w()), }; } ALWAYS_INLINE static constexpr Vector2 expand4(Vector2 const& v) { return Vector2 { AK::SIMD::expand4(v.x()), AK::SIMD::expand4(v.y()), }; } ALWAYS_INLINE static constexpr Vector3 expand4(Vector3 const& v) { return Vector3 { AK::SIMD::expand4(v.x()), AK::SIMD::expand4(v.y()), AK::SIMD::expand4(v.z()), }; } ALWAYS_INLINE static constexpr Vector4 expand4(Vector4 const& v) { return Vector4 { AK::SIMD::expand4(v.x()), AK::SIMD::expand4(v.y()), AK::SIMD::expand4(v.z()), AK::SIMD::expand4(v.w()), }; } }