5#include "acme/prototype/prototype/hash32.h"
11constexpr ::i32 get_bool_int(
bool b){
return b? 1:0;}
13 template <
typename TYPE >
19 using EQUALITY = for_type < TYPE >;
20 using ORDERING = for_type < TYPE >;
23 constexpr bool equals(
const TYPE & a,
const TYPE & b)
const {
return a == b; }
24 constexpr auto order(
const TYPE & a,
const TYPE & b)
const {
return a <=> b; }
35 using EQUALITY = for_type < bool >;
36 using ORDERING = for_type < bool >;
39 constexpr bool equals(
bool a,
bool b)
const {
return get_bool_int(a) == get_bool_int(b); }
40 constexpr auto order(
bool a,
bool b)
const {
return get_bool_int(a) <=> get_bool_int(b); }
46 template < prototype_fundamental TYPE >
52 using EQUALITY = for_type < TYPE >;
53 using ORDERING = for_type < TYPE >;
56 constexpr bool equals(TYPE a, TYPE b)
const {
return a == b; }
57 constexpr auto order(TYPE a, TYPE b)
const {
return a <=> b; }
94template <
typename LITERAL >
103 template <
typename BLOCK >
104 literal_cast(
const BLOCK &
block)
107 static_assert(
sizeof(m_literal) <=
sizeof(
block));
109 memory_copy(&m_literal, &
block,
sizeof(m_literal));
114 operator LITERAL &() {
return m_literal; }
116 operator const LITERAL &()
const {
return m_literal; }
122template <
typename BLOCK >
131 template <
typename LITERAL >
132 block_cast(
const LITERAL & literal)
135 static_assert(
sizeof(m_block) >=
sizeof(literal));
137 memory_copy(&m_block, &literal,
sizeof(literal));
141 operator BLOCK &() {
return m_block; }
143 operator const BLOCK &()
const {
return m_block; }
150template <
typename T1,
typename T2>
159inline constexpr std::strong_ordering to_strong_ordering(std::partial_ordering po) {
160 if (po == std::partial_ordering::less) {
161 return std::strong_ordering::less;
163 else if (po == std::partial_ordering::equivalent) {
164 return std::strong_ordering::equal;
166 else if (po == std::partial_ordering::greater) {
167 return std::strong_ordering::greater;
174 return std::strong_ordering::equal;
179inline constexpr std::partial_ordering to_partial_ordering(std::strong_ordering strongordering) {
180 if (strongordering == std::strong_ordering::less) {
181 return std::partial_ordering::less;
183 else if (strongordering == std::strong_ordering::equal) {
184 return std::partial_ordering::equivalent;
186 else if (strongordering == std::strong_ordering::greater) {
187 return std::partial_ordering::greater;
194 return std::partial_ordering::equivalent;
200inline constexpr std::strong_ordering as <::std::strong_ordering, ::std::partial_ordering >(
201 const std::partial_ordering& partialordering)
204 return to_strong_ordering(partialordering);
211inline constexpr std::partial_ordering as <::std::partial_ordering, ::std::strong_ordering >(
212 const std::strong_ordering& strongordering)
215 return to_partial_ordering(strongordering);
220template<prototype_
floating FLOATING_TYPE, ::i32 t_iDimension, enum_matrix_major t_emajor = e_matrix_major_column>
Definition _template_after_initial_concepts.h:15
Matrix class.
Definition matrix.h:73