Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MB hacks, required changes and brainstorming for latest master #115

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ce227a4
Clang-CL: (quick) fixed compile-time option settings.
May 8, 2023
61f780a
Clang-CL: workaround for static-order-initialization--fiasco in TTS.
May 8, 2023
f308152
Fixed a -Wsign-conversion warning.
May 22, 2023
ac687e3
'Some change' (I guess in kumi) prevents shape from being treated as …
Jul 19, 2023
c7486c8
Quick-hack fix for MB: we need default axis type to be 16 bits (a pro…
Jul 19, 2023
6dfff49
prefilled operator[] improvement attempts and quick-fixes:
Jul 19, 2023
a0a1066
Fixed coordinates() to use the correct underlying std::array type.
Jul 19, 2023
c969e1d
Quick-hack fix for MB: we need default axis type to be 16 bits (a pro…
Jul 19, 2023
ac9cbb5
prefilled::get disambiguation.
Jul 19, 2023
fb4f448
Minor stylistic fixes.
Jul 21, 2023
76f2aae
Hack-fix for compilation errors in coordinates() for shapes created w…
Jul 22, 2023
902560d
axis_:
Jul 22, 2023
85af75c
Fixed warning-as-error on non-Clang compilers.
Jul 22, 2023
686e177
Fixed as_dimension for axis.
Aug 3, 2023
1e76764
Add operator== to tuple [to enable easier and simpler equivalents in …
Aug 3, 2023
87ad842
Ad-hoc ability to configure underlying joker integral type (its size).
Aug 3, 2023
5bc8bf7
'Fixed' KWK_DEFAULT_SHAPE_CONSTRAINTS support by adding the accompany…
Aug 3, 2023
6351533
Updated with joker changes.
Aug 3, 2023
68d2c50
Added static_axes and static_values 'accessors' to shape (should prob…
Aug 3, 2023
d27c852
New shiny CMake objects.
Aug 3, 2023
c358a4c
Replaced the configurable-joker-underlying-type ugliness with a simpl…
Aug 3, 2023
6b3271d
Simplified KWK_DEFAULT_SHAPE* logic.
Aug 3, 2023
01fa3e5
Updated the unit tests with the latest changes.
Aug 3, 2023
dd4c6e1
Made constant usable in assume statements w/o compiler warnings.
Aug 3, 2023
3649d35
Ditto extent.
Aug 3, 2023
0c34146
Missing axis_with_extent for type_info.
Aug 3, 2023
6afa7f7
Fixed (hopefully) axis == integral and joker comparisons.
Aug 3, 2023
f4cd4ed
Properly fixed the issue of shape<> not being trivially copyable.
Aug 9, 2023
07af4bd
use std::equality_comparable_with which is now fully supported
DoDoENT Jan 2, 2024
72e45da
fix narrowing cast
DoDoENT Jan 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/make_unit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(add_target_parent)
##==================================================================================================
add_library(kiwaku_test INTERFACE)

if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
if(MSVC)
psiha marked this conversation as resolved.
Show resolved Hide resolved
target_compile_options( kiwaku_test INTERFACE /W3 /EHsc /bigobj /std:c++20)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options( kiwaku_test INTERFACE -std=c++20 -Werror -Wall -Wextra -Wconversion -Wunused-variable -Wdocumentation)
Expand Down
2 changes: 1 addition & 1 deletion include/kwk/detail/assert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace kwk
[[noreturn]] inline
void assert_termination(std::ostringstream & stream, char const * const condition, char const * const function, char const * const file, unsigned const line) noexcept
{
boost::assertion_failed_msg(condition, std::move(stream).str().c_str(), function, file, line);
boost::assertion_failed_msg(condition, std::move(stream).str().c_str(), function, file, static_cast<long>(line));
KWK_UNREACHABLE();
}

Expand Down
12 changes: 12 additions & 0 deletions include/kwk/detail/kumi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ namespace kumi::_
{
static constexpr bool is_homogeneous = true;
T0 members[N];
constexpr bool operator==(binder_n const & other) const noexcept = default;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

care to make a PR over at kumi ?

};
template<int... Is, typename T0, typename T1, typename... Ts>
requires(all_the_same<T0,T1,Ts...> && no_references<T0,T1,Ts...>)
Expand Down Expand Up @@ -106,6 +107,7 @@ namespace kumi::_
using kumi_specific_layout = void;
using member0_type = T;
member0_type member0;
constexpr bool operator==(binder const & other) const noexcept = default;
};
template<typename T0, typename T1>
requires(no_references<T0,T1>)
Expand All @@ -117,6 +119,7 @@ namespace kumi::_
using member1_type = T1;
member0_type member0;
member1_type member1;
constexpr bool operator==(binder const & other) const noexcept = default;
};
template<typename T0, typename T1, typename T2>
requires(no_references<T0,T1,T2>)
Expand All @@ -130,6 +133,7 @@ namespace kumi::_
member0_type member0;
member1_type member1;
member2_type member2;
constexpr bool operator==(binder const & other) const noexcept = default;
};
template<typename T0, typename T1, typename T2, typename T3>
requires(no_references<T0,T1,T2,T3>)
Expand All @@ -145,6 +149,7 @@ namespace kumi::_
member1_type member1;
member2_type member2;
member3_type member3;
constexpr bool operator==(binder const & other) const noexcept = default;
};
template<typename T0, typename T1, typename T2, typename T3, typename T4>
requires(no_references<T0,T1,T2,T3,T4>)
Expand All @@ -162,6 +167,7 @@ namespace kumi::_
member2_type member2;
member3_type member3;
member4_type member4;
constexpr bool operator==(binder const & other) const noexcept = default;
};
template<typename T0, typename T1, typename T2, typename T3, typename T4, typename T5>
requires(no_references<T0,T1,T2,T3,T4,T5>)
Expand All @@ -181,6 +187,7 @@ namespace kumi::_
member3_type member3;
member4_type member4;
member5_type member5;
constexpr bool operator==(binder const & other) const noexcept = default;
};
template< typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6
Expand All @@ -204,6 +211,7 @@ namespace kumi::_
member4_type member4;
member5_type member5;
member6_type member6;
constexpr bool operator==(binder const & other) const noexcept = default;
};
template< typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7
Expand All @@ -229,6 +237,7 @@ namespace kumi::_
member5_type member5;
member6_type member6;
member7_type member7;
constexpr bool operator==(binder const & other) const noexcept = default;
};
template< typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8
Expand Down Expand Up @@ -256,6 +265,7 @@ namespace kumi::_
member6_type member6;
member7_type member7;
member8_type member8;
constexpr bool operator==(binder const & other) const noexcept = default;
};
template< typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
Expand Down Expand Up @@ -285,6 +295,7 @@ namespace kumi::_
member7_type member7;
member8_type member8;
member9_type member9;
constexpr bool operator==(binder const & other) const noexcept = default;
};
template<std::size_t I,typename Binder>
requires requires(Binder) { typename Binder::kumi_specific_layout; }
Expand Down Expand Up @@ -659,6 +670,7 @@ namespace kumi
(std::make_index_sequence<sizeof...(Ts)>());
return *this;
}
constexpr bool operator==(tuple const & other) const noexcept = default;
template<typename... Us>
friend constexpr auto operator==(tuple const &self, tuple<Us...> const &other) noexcept
requires( (sizeof...(Ts) == sizeof...(Us) ) && equality_comparable<tuple,tuple<Us...>> )
Expand Down
11 changes: 6 additions & 5 deletions include/kwk/detail/sequence/helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <kwk/concepts/axis.hpp>
#include <kwk/concepts/extent.hpp>
#include <kwk/concepts/values.hpp>
#include <kwk/detail/stdfix.hpp>
#include <kwk/detail/kumi.hpp>
#include <kwk/settings/axis.hpp>
Expand All @@ -34,7 +35,7 @@ namespace kwk::__
// Check if the current extent descriptor is an integer (ie a static size) or not
auto check = [&]<typename T>(T)
{
if constexpr(std::integral<T>) index[pos] = -1;
if constexpr(std::integral<T> || concepts::static_constant<T>) index[pos] = -1;
else
{
stored[stored_pos++] = pos;
Expand Down Expand Up @@ -113,9 +114,9 @@ namespace kwk::__
//====================================================================================================================
// Type short-cut for internal representation of types in axis
//====================================================================================================================
template<typename T> struct stored_type : T {};
template<concepts::joker T> struct stored_type<T> { using type = std::int32_t; };
template<typename T, unsigned N, auto descriptors> struct stored_type : T {};
template<concepts::joker T, unsigned N, auto descriptors> struct stored_type<T, N, descriptors> { using type = joker::value_type<get<N>(descriptors).value.integral_value_type_size>; };

template<typename T>
using stored_t = typename stored_type<typename T::content_type>::type;
template<typename T, unsigned N, auto descriptors>
using stored_t = typename stored_type<typename T::content_type, N, descriptors>::type;
}
Loading