Skip to content

Commit

Permalink
Cleanup old decorators related files than needed to be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou authored Apr 22, 2024
1 parent eb82b67 commit 99f533d
Show file tree
Hide file tree
Showing 198 changed files with 560 additions and 3,753 deletions.
3 changes: 0 additions & 3 deletions include/eve/module/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,9 @@
#include <eve/module/core/constant/core.hpp>
#include <eve/module/core/decorator/core.hpp>
#include <eve/module/core/detail/core.hpp>
#include <eve/module/core/fuzzy/core.hpp>
#include <eve/module/core/named_shuffles/core.hpp>
#include <eve/module/core/regular/core.hpp>
#include <eve/module/core/numeric/core.hpp>
#include <eve/module/core/pedantic/core.hpp>
#include <eve/module/core/promote/core.hpp>
#include <eve/module/core/saturated/core.hpp>
#include <eve/wide.hpp>
#include <eve/arch/nofs.hpp>
43 changes: 0 additions & 43 deletions include/eve/module/core/decorator/associated.hpp

This file was deleted.

53 changes: 0 additions & 53 deletions include/eve/module/core/decorator/compensated.hpp

This file was deleted.

43 changes: 0 additions & 43 deletions include/eve/module/core/decorator/condon_shortley.hpp

This file was deleted.

131 changes: 42 additions & 89 deletions include/eve/module/core/decorator/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,130 +7,96 @@
//======================================================================================================================
#pragma once

#include <eve/module/core/decorator/associated.hpp>
#include <eve/module/core/decorator/compensated.hpp>
#include <eve/module/core/decorator/condon_shortley.hpp>
#include <eve/module/core/decorator/cyl.hpp>
#include <eve/module/core/decorator/fuzzy.hpp>
#include <eve/module/core/decorator/kind.hpp>
#include <eve/module/core/decorator/musl.hpp>
#include <eve/module/core/decorator/numeric.hpp>
#include <eve/detail/abi.hpp>
#include <eve/detail/overload.hpp>
#include <eve/detail/raberu.hpp>
#include <eve/module/core/decorator/pedantic.hpp>
#include <eve/module/core/decorator/plain.hpp>
#include <eve/module/core/decorator/promote.hpp>
#include <eve/module/core/decorator/raw.hpp>
#include <eve/module/core/decorator/regular.hpp>
#include <eve/module/core/decorator/roundings.hpp>
#include <eve/module/core/decorator/saturated.hpp>
#include <eve/module/core/decorator/sph.hpp>
#include <eve/module/core/decorator/spherical.hpp>
#include <eve/module/core/decorator/successor.hpp>
#include <eve/as_element.hpp>
#include <eve/as.hpp>

//======================================================================================================================
// New option style - TODO rename later without the '2'
//======================================================================================================================
#include <eve/detail/raberu.hpp>

namespace eve
{
struct almost_mode {};
struct associated_mode {};
struct compensated_mode {};
struct almost_mode {};
struct associated_mode {};
struct compensated_mode {};
struct condon_shortley_mode {};
struct definitely_mode {};
struct definitely_mode {};
struct kind_1_mode {};
struct kind_2_mode {};
struct numeric_mode {};
struct p_kind_mode {};
struct promote_mode {};
struct q_kind_mode {};
struct spherical_mode {};
struct successor_mode {};

struct downward_mode {};
struct kind_1_mode {};
struct kind_2_mode {};
struct musl_mode {};
struct numeric_mode {};
struct p_kind_mode {};
struct pedantic_mode {};
struct plain_mode {};
struct promote_mode {};
struct q_kind_mode {};
struct raw_mode {};
struct regular_mode {};
struct saturated_mode {};
struct spherical_mode {};
struct successor_mode {};
struct to_nearest_mode {};
struct toward_zero_mode {};
struct upward_mode {};

[[maybe_unused]] inline constexpr auto associated2 = ::rbr::flag( associated_mode{} );
[[maybe_unused]] inline constexpr auto compensated2 = ::rbr::flag( compensated_mode{} );
[[maybe_unused]] inline constexpr auto condon_shortley2 = ::rbr::flag( condon_shortley_mode{} );
[[maybe_unused]] inline constexpr auto associated = ::rbr::flag( associated_mode{} );
[[maybe_unused]] inline constexpr auto compensated = ::rbr::flag( compensated_mode{} );
[[maybe_unused]] inline constexpr auto condon_shortley = ::rbr::flag( condon_shortley_mode{} );
[[maybe_unused]] inline constexpr auto kind_1 = ::rbr::flag( kind_1_mode{} );
[[maybe_unused]] inline constexpr auto kind_2 = ::rbr::flag( kind_2_mode{} );
[[maybe_unused]] inline constexpr auto numeric = ::rbr::flag( numeric_mode{} );
[[maybe_unused]] inline constexpr auto p_kind = ::rbr::flag( p_kind_mode{} );
[[maybe_unused]] inline constexpr auto promote = ::rbr::flag( promote_mode{} );
[[maybe_unused]] inline constexpr auto q_kind = ::rbr::flag( q_kind_mode{} );
[[maybe_unused]] inline constexpr auto spherical = ::rbr::flag( spherical_mode{} );
[[maybe_unused]] inline constexpr auto successor = ::rbr::flag( successor_mode{} );

[[maybe_unused]] inline constexpr auto downward2 = ::rbr::flag( downward_mode{} );
[[maybe_unused]] inline constexpr auto kind_12 = ::rbr::flag( kind_1_mode{} );
[[maybe_unused]] inline constexpr auto kind_22 = ::rbr::flag( kind_2_mode{} );
[[maybe_unused]] inline constexpr auto musl2 = ::rbr::flag( musl_mode{} );
[[maybe_unused]] inline constexpr auto numeric2 = ::rbr::flag( numeric_mode{} );
[[maybe_unused]] inline constexpr auto p_kind2 = ::rbr::flag( p_kind_mode{} );
[[maybe_unused]] inline constexpr auto pedantic2 = ::rbr::flag( pedantic_mode{} );
[[maybe_unused]] inline constexpr auto plain2 = ::rbr::flag( plain_mode{} );
[[maybe_unused]] inline constexpr auto promote2 = ::rbr::flag( promote_mode{} );
[[maybe_unused]] inline constexpr auto q_kind2 = ::rbr::flag( q_kind_mode{} );
[[maybe_unused]] inline constexpr auto raw2 = ::rbr::flag( raw_mode{} );
[[maybe_unused]] inline constexpr auto regular2 = ::rbr::flag( regular_mode{} );
[[maybe_unused]] inline constexpr auto saturated2 = ::rbr::flag( saturated_mode{} );
[[maybe_unused]] inline constexpr auto spherical2 = ::rbr::flag( spherical_mode{} );
[[maybe_unused]] inline constexpr auto successor2 = ::rbr::flag( successor_mode{} );
[[maybe_unused]] inline constexpr auto to_nearest2 = ::rbr::flag( to_nearest_mode{} );
[[maybe_unused]] inline constexpr auto toward_zero2 = ::rbr::flag( toward_zero_mode{} );
[[maybe_unused]] inline constexpr auto upward2 = ::rbr::flag( upward_mode{} );

struct associated_option : detail::exact_option<associated2> {};
struct compensated_option : detail::exact_option<compensated2> {};
struct condon_shortley_option : detail::exact_option<condon_shortley2> {};
struct associated_option : detail::exact_option<associated> {};
struct compensated_option : detail::exact_option<compensated> {};
struct condon_shortley_option : detail::exact_option<condon_shortley> {};
struct kind_1_option : detail::exact_option<kind_1> {};
struct kind_2_option : detail::exact_option<kind_2> {};
struct numeric_option : detail::exact_option<numeric> {};
struct p_kind_option : detail::exact_option<p_kind> {};
struct promote_option : detail::exact_option<promote> {};
struct q_kind_option : detail::exact_option<q_kind> {};
struct spherical_option : detail::exact_option<spherical> {};
struct successor_option : detail::exact_option<successor> {};

struct downward_option : detail::exact_option<downward2> {};
struct kind_1_option : detail::exact_option<kind_12> {};
struct kind_2_option : detail::exact_option<kind_22> {};
struct musl_option : detail::exact_option<musl2> {};
struct numeric_option : detail::exact_option<numeric2> {};
struct p_kind_option : detail::exact_option<p_kind2> {};
struct pedantic_option : detail::exact_option<pedantic2> {};
struct plain_option : detail::exact_option<plain2> {};
struct promote_option : detail::exact_option<promote2> {};
struct q_kind_option : detail::exact_option<q_kind2> {};
struct raw_option : detail::exact_option<raw2> {};
struct regular_option : detail::exact_option<regular2> {};
struct saturated_option : detail::exact_option<saturated2> {};
struct spherical_option : detail::exact_option<spherical2> {};
struct successor_option : detail::exact_option<successor2> {};
struct to_nearest_option : detail::exact_option<to_nearest2> {};
struct toward_zero_option : detail::exact_option<toward_zero2> {};
struct upward_option : detail::exact_option<upward2> {};

// ----------------------------------------------------------------------------------
// [TEMPORARY] Will be removed when all decorator have been converted
// ----------------------------------------------------------------------------------
inline constexpr auto as_option(associated_type const&) { return associated2; }
inline constexpr auto as_option(compensated_type const&) { return compensated2; }
inline constexpr auto as_option(condon_shortley_type const&) { return condon_shortley2; }
inline constexpr auto as_option(downward_type const&) { return downward2; }
inline constexpr auto as_option(kind_1_type const&) { return kind_12; }
inline constexpr auto as_option(kind_2_type const&) { return kind_22; }
inline constexpr auto as_option(musl_type const&) { return musl2; }
inline constexpr auto as_option(numeric_type const&) { return numeric2; }
inline constexpr auto as_option(p_kind_type const&) { return p_kind2; }
inline constexpr auto as_option(pedantic_type const&) { return pedantic2; }
inline constexpr auto as_option(plain_type const&) { return plain2; }
inline constexpr auto as_option(promote_type const&) { return promote2; }
inline constexpr auto as_option(q_kind_type const&) { return q_kind2; }
inline constexpr auto as_option(raw_type const&) { return raw2; }
inline constexpr auto as_option(regular_type const&) { return regular2; }
inline constexpr auto as_option(saturated_type const&) { return saturated2; }
inline constexpr auto as_option(spherical_type const&) { return spherical2; }
inline constexpr auto as_option(successor_type const&) { return successor2; }
inline constexpr auto as_option(to_nearest_type const&) { return to_nearest2; }
inline constexpr auto as_option(toward_zero_type const&) { return toward_zero2; }
inline constexpr auto as_option(upward_type const&) { return upward2; }

// New tolerance option that carry a value
template<typename Value>
struct almost_t;
template<typename Value> struct almost_t;

struct almost_option
{
Expand All @@ -144,8 +110,7 @@ namespace eve
EVE_FORCEINLINE constexpr auto default_to(auto const& base) const { return base; }
};

template<typename Value>
struct definitely_t;
template<typename Value> struct definitely_t;

struct definitely_option
{
Expand All @@ -158,16 +123,4 @@ namespace eve

EVE_FORCEINLINE constexpr auto default_to(auto const& base) const { return base; }
};

struct tolerant_mode {};
struct default_tolerance
{
friend std::ostream& operator<<(std::ostream& os, default_tolerance const&) { return os << "3 * eps"; }
};

[[maybe_unused]] inline constexpr auto tolerance = ::rbr::keyword( tolerant_mode{} );
[[maybe_unused]] inline constexpr auto tolerant2 = (tolerance = default_tolerance{});

struct tolerant_option : detail::exact_option<tolerance> {};
inline constexpr auto as_option(tolerant_type const&) { return tolerant2; }
}
Loading

0 comments on commit 99f533d

Please sign in to comment.