diff --git a/include/kernel_float/base.h b/include/kernel_float/base.h index b3edb20..056c46c 100644 --- a/include/kernel_float/base.h +++ b/include/kernel_float/base.h @@ -36,113 +36,6 @@ struct aligned_array { } }; -template -struct alignas(Alignment) aligned_array { - KERNEL_FLOAT_INLINE - aligned_array(T value = {}) : x(value) {} - - KERNEL_FLOAT_INLINE - operator T() const { - return x; - } - - KERNEL_FLOAT_INLINE - T* data() { - return &x; - } - - KERNEL_FLOAT_INLINE - const T* data() const { - return &x; - } - - T x; -}; - -template -struct alignas(Alignment) aligned_array { - KERNEL_FLOAT_INLINE - aligned_array(T x, T y) : x(x), y(y) {} - - KERNEL_FLOAT_INLINE - aligned_array() : aligned_array(T {}, T {}) {} - - KERNEL_FLOAT_INLINE - T* data() { - return items; - } - - KERNEL_FLOAT_INLINE - const T* data() const { - return items; - } - - union { - T items[2]; - struct { - T x; - T y; - }; - }; -}; - -template -struct alignas(Alignment) aligned_array { - KERNEL_FLOAT_INLINE - aligned_array(T x, T y, T z) : x(x), y(y), z(z) {} - - KERNEL_FLOAT_INLINE - aligned_array() : aligned_array(T {}, T {}, T {}) {} - - KERNEL_FLOAT_INLINE - T* data() { - return items; - } - - KERNEL_FLOAT_INLINE - const T* data() const { - return items; - } - - union { - T items[3]; - struct { - T x; - T y; - T z; - }; - }; -}; - -template -struct alignas(Alignment) aligned_array { - KERNEL_FLOAT_INLINE - aligned_array(T x, T y, T z, T w) : x(x), y(y), z(z), w(w) {} - - KERNEL_FLOAT_INLINE - aligned_array() : aligned_array(T {}, T {}, T {}, T {}) {} - - KERNEL_FLOAT_INLINE - T* data() { - return items; - } - - KERNEL_FLOAT_INLINE - const T* data() const { - return items; - } - - union { - T items[4]; - struct { - T x; - T y; - T z; - T w; - }; - }; -}; - KERNEL_FLOAT_INLINE static constexpr size_t compute_max_alignment(size_t total_size, size_t min_align) { if (total_size % 32 == 0 || min_align >= 32) { diff --git a/single_include/kernel_float.h b/single_include/kernel_float.h index fb02c84..de03575 100644 --- a/single_include/kernel_float.h +++ b/single_include/kernel_float.h @@ -16,8 +16,8 @@ //================================================================================ // this file has been auto-generated, do not modify its contents! -// date: 2023-09-28 12:12:55.542179 -// git hash: 0ae5853b782118d9842541588429b4aec7ff186a +// date: 2023-10-06 15:55:05.139317 +// git hash: fcfd9c119c1d510c5d98f1b93ab2ca47a2785922 //================================================================================ #ifndef KERNEL_FLOAT_MACROS_H @@ -380,113 +380,6 @@ struct aligned_array { } }; -template -struct alignas(Alignment) aligned_array { - KERNEL_FLOAT_INLINE - aligned_array(T value = {}) : x(value) {} - - KERNEL_FLOAT_INLINE - operator T() const { - return x; - } - - KERNEL_FLOAT_INLINE - T* data() { - return &x; - } - - KERNEL_FLOAT_INLINE - const T* data() const { - return &x; - } - - T x; -}; - -template -struct alignas(Alignment) aligned_array { - KERNEL_FLOAT_INLINE - aligned_array(T x, T y) : x(x), y(y) {} - - KERNEL_FLOAT_INLINE - aligned_array() : aligned_array(T {}, T {}) {} - - KERNEL_FLOAT_INLINE - T* data() { - return items; - } - - KERNEL_FLOAT_INLINE - const T* data() const { - return items; - } - - union { - T items[2]; - struct { - T x; - T y; - }; - }; -}; - -template -struct alignas(Alignment) aligned_array { - KERNEL_FLOAT_INLINE - aligned_array(T x, T y, T z) : x(x), y(y), z(z) {} - - KERNEL_FLOAT_INLINE - aligned_array() : aligned_array(T {}, T {}, T {}) {} - - KERNEL_FLOAT_INLINE - T* data() { - return items; - } - - KERNEL_FLOAT_INLINE - const T* data() const { - return items; - } - - union { - T items[3]; - struct { - T x; - T y; - T z; - }; - }; -}; - -template -struct alignas(Alignment) aligned_array { - KERNEL_FLOAT_INLINE - aligned_array(T x, T y, T z, T w) : x(x), y(y), z(z), w(w) {} - - KERNEL_FLOAT_INLINE - aligned_array() : aligned_array(T {}, T {}, T {}, T {}) {} - - KERNEL_FLOAT_INLINE - T* data() { - return items; - } - - KERNEL_FLOAT_INLINE - const T* data() const { - return items; - } - - union { - T items[4]; - struct { - T x; - T y; - T z; - T w; - }; - }; -}; - KERNEL_FLOAT_INLINE static constexpr size_t compute_max_alignment(size_t total_size, size_t min_align) { if (total_size % 32 == 0 || min_align >= 32) {