From e13c8ca8492b0425184f1c146bba97a07710c9f5 Mon Sep 17 00:00:00 2001 From: Matthew Andres Moreno Date: Thu, 13 Oct 2022 22:17:26 -0700 Subject: [PATCH] Replace all emp_assert, emp_always_assert --- .../arrange/AdjacencyFileTopologyFactory.hpp | 4 +- .../netuit/arrange/ProConTopologyFactory.hpp | 3 +- .../netuit/assign/AssignPerfectHypercube.hpp | 23 ++- .../assign/GenerateMetisAssignments.hpp | 10 +- include/netuit/topology/Topology.hpp | 15 +- .../backend/AccumulatingPooledBackEnd.hpp | 7 +- .../proc/impl/backend/AggregatedBackEnd.hpp | 7 +- .../ducts/proc/impl/backend/PooledBackEnd.hpp | 7 +- .../f::AccumulateDuct.hpp | 14 +- .../f::RaccumulateDuct.hpp | 21 +- .../impl/AccumulatingSpanIsendDuct.hpp | 9 +- .../sf::AccumulateDuct.hpp | 8 +- .../sf::RaccumulateDuct.hpp | 8 +- .../impl/AccumulatingTrivialIsendDuct.hpp | 7 +- .../impl/CerealRingImmediateSendDuct.hpp | 11 +- .../impl/SpanRingImmediateSendDuct.hpp | 13 +- .../impl/TrivialRingImmediateSendDuct.hpp | 11 +- .../t::RingRputDuct.hpp | 12 +- .../impl/CerealBlockingSendDuct.hpp | 10 +- .../impl/CerealDequeImmediateSendDuct.hpp | 10 +- .../impl/TrivialBlockingSendDuct.hpp | 12 +- .../impl/TrivialDequeImmediateSendDuct.hpp | 13 +- .../t::DequeRputDuct.hpp | 13 +- .../put=growing+type=trivial/t::PutDuct.hpp | 14 +- .../templated/AccumulatingPooledInletDuct.hpp | 13 +- .../inlet/templated/AggregatedInletDuct.hpp | 13 +- .../inlet/templated/BufferedInletDuct.hpp | 13 +- .../impl/inlet/templated/PooledInletDuct.hpp | 13 +- .../f::WithdrawingWindowDuct.hpp | 14 +- .../accumulating+type=span/s::IrecvDuct.hpp | 12 +- .../sf::WithdrawingWindowDuct.hpp | 12 +- .../t::IrecvDuct.hpp | 11 +- .../s::BlockIrecvDuct.hpp | 11 +- .../t::BlockIrecvDuct.hpp | 11 +- .../t::WindowDuct.hpp | 15 +- .../c::IprobeDuct.hpp | 10 +- .../get=stepping+type=span/s::IprobeDuct.hpp | 10 +- .../t::RingIrecvDuct.hpp | 11 +- .../AccumulatingPooledOutletDuct.hpp | 11 +- .../outlet/templated/AggregatedOutletDuct.hpp | 11 +- .../outlet/templated/BufferedOutletDuct.hpp | 11 +- .../outlet/templated/PooledOutletDuct.hpp | 11 +- include/uit/spouts/Inlet.hpp | 5 +- include/uit/spouts/Outlet.hpp | 17 +- include/uit_emp/_codegen/make_pop_macros.py | 10 - include/uit_emp/_codegen/make_push_macros.py | 11 - .../vendorization/pop_assert_macros.hh | 123 ----------- .../vendorization/push_assert_macros.hh | 193 ------------------ include/uitsl/algorithm/clamp_cast.hpp | 6 +- .../uitsl/datastructs/MirroredRingBuffer.hpp | 25 +-- include/uitsl/datastructs/RingBuffer.hpp | 7 +- include/uitsl/debug/OccupancyCap.hpp | 20 +- include/uitsl/debug/OccupancyCaps.hpp | 10 +- include/uitsl/debug/err_audit.hpp | 8 +- include/uitsl/debug/err_verify.hpp | 6 +- include/uitsl/debug/metis_utils.hpp | 8 +- include/uitsl/debug/uitsl_always_assert.hpp | 6 +- include/uitsl/fetch/fetch_native.hpp | 11 +- include/uitsl/math/math_utils.hpp | 11 +- include/uitsl/math/shift_mod.hpp | 3 +- include/uitsl/meta/fwd_or_cast.hpp | 17 ++ include/uitsl/meta/is_streamable.hpp | 20 ++ include/uitsl/mpi/group_utils.hpp | 11 +- include/uitsl/mpi/mpi_audit.hpp | 6 +- include/uitsl/nonce/spector.hpp | 11 +- include/uitsl/parallel/RecursiveMutex.hpp | 5 +- .../uitsl/parallel/_ThreadIbarrierManager.hpp | 15 +- .../uitsl/utility/get_exec_instance_uuid.hpp | 22 +- .../uitsl/utility/keyname_directory_min.hpp | 3 +- 69 files changed, 317 insertions(+), 748 deletions(-) delete mode 100644 include/uit_emp/vendorization/pop_assert_macros.hh delete mode 100644 include/uit_emp/vendorization/push_assert_macros.hh create mode 100644 include/uitsl/meta/fwd_or_cast.hpp create mode 100644 include/uitsl/meta/is_streamable.hpp diff --git a/include/netuit/arrange/AdjacencyFileTopologyFactory.hpp b/include/netuit/arrange/AdjacencyFileTopologyFactory.hpp index 282e7d181f..c64cefb20b 100644 --- a/include/netuit/arrange/AdjacencyFileTopologyFactory.hpp +++ b/include/netuit/arrange/AdjacencyFileTopologyFactory.hpp @@ -4,6 +4,8 @@ #include +#include "../../uitsl/debug/uitsl_always_assert.hpp" + #include "../topology/TopoEdge.hpp" #include "../topology/Topology.hpp" #include "../topology/TopoNode.hpp" @@ -13,7 +15,7 @@ namespace netuit { inline Topology make_adjacency_file_topology(const std::string& filename) { std::ifstream file(filename); - emp_always_assert(file); + uitsl_always_assert(file); return dynamic_cast(file); } diff --git a/include/netuit/arrange/ProConTopologyFactory.hpp b/include/netuit/arrange/ProConTopologyFactory.hpp index 3799ff4db7..82e928930b 100644 --- a/include/netuit/arrange/ProConTopologyFactory.hpp +++ b/include/netuit/arrange/ProConTopologyFactory.hpp @@ -2,6 +2,7 @@ #ifndef NETUIT_ARRANGE_PROCONTOPOLOGYFACTORY_HPP_INCLUDE #define NETUIT_ARRANGE_PROCONTOPOLOGYFACTORY_HPP_INCLUDE +#include #include #include "../topology/TopoEdge.hpp" @@ -52,7 +53,7 @@ struct ProConTopologyFactory { } netuit::Topology operator()(const std::vector cardinality) const { - emp_assert(cardinality.size() == 1); + assert(cardinality.size() == 1); return make_producer_consumer_topology(cardinality.front()); } diff --git a/include/netuit/assign/AssignPerfectHypercube.hpp b/include/netuit/assign/AssignPerfectHypercube.hpp index 1eb2ac91a4..6ad1f91d8b 100644 --- a/include/netuit/assign/AssignPerfectHypercube.hpp +++ b/include/netuit/assign/AssignPerfectHypercube.hpp @@ -7,13 +7,10 @@ #include #include -#include "../../uit_emp/base/assert.hpp" - +#include "../../uitsl/debug/uitsl_assert.hpp" #include "../../uitsl/math/is_perfect_hypercube.hpp" #include "../../uitsl/math/mapping_utils.hpp" -#include "../../uit_emp/vendorization/push_assert_macros.hh" - namespace netuit { template @@ -52,10 +49,18 @@ struct AssignPerfectHypercube { // get partition id const auto res = uitsl::linear_encode( coordinates, partition_dims ); - emp_assert( res < std::accumulate( - std::begin(partition_dims), std::end(partition_dims), - 1ul, std::multiplies{} - ), node_id, res, coordinates, uitsl::linear_decode( node_id, item_dims ), item_dims, partition_dims ); + uitsl_assert( + res < std::accumulate( + std::begin(partition_dims), std::end(partition_dims), + 1ul, std::multiplies{} + ), + node_id + << res + << coordinates + << uitsl::linear_decode( node_id, item_dims ) + << item_dims + << partition_dims + ); return res; } @@ -64,6 +69,4 @@ struct AssignPerfectHypercube { } // namespace netuit -#include "../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef NETUIT_ASSIGN_ASSIGNPERFECTHYPERCUBE_HPP_INCLUDE diff --git a/include/netuit/assign/GenerateMetisAssignments.hpp b/include/netuit/assign/GenerateMetisAssignments.hpp index 051aaf13b3..0c05ef9e1f 100644 --- a/include/netuit/assign/GenerateMetisAssignments.hpp +++ b/include/netuit/assign/GenerateMetisAssignments.hpp @@ -12,16 +12,14 @@ #include #endif -#include "../../uit_emp/base/assert.hpp" - #include "../../uitsl/debug/audit_cast.hpp" +#include "../../uitsl/debug/uitsl_assert.hpp" #include "../../uitsl/debug/EnumeratedFunctor.hpp" #include "../../uitsl/mpi/mpi_init_utils.hpp" #include "../../uitsl/parallel/thread_utils.hpp" #include "../topology/Topology.hpp" -#include "../../uit_emp/vendorization/push_assert_macros.hh" namespace netuit { /// Apply METIS' K-way partitioning algorithm to subdivide topology @@ -32,7 +30,10 @@ std::vector PartitionMetis( const size_t num_parts, const netuit::Topology& topology ) { - emp_assert( num_parts <= topology.GetSize(), num_parts, topology.GetSize() ); + uitsl_assert( + num_parts <= topology.GetSize(), + num_parts << topology.GetSize() + ); // set up result vector std::vector result( topology.GetSize(), 0 ); @@ -189,6 +190,5 @@ std::pair< } } // namespace netuit -#include "../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef NETUIT_ASSIGN_GENERATEMETISASSIGNMENTS_HPP_INCLUDE diff --git a/include/netuit/topology/Topology.hpp b/include/netuit/topology/Topology.hpp index 8a792f61b2..84da936c07 100644 --- a/include/netuit/topology/Topology.hpp +++ b/include/netuit/topology/Topology.hpp @@ -3,6 +3,7 @@ #define NETUIT_TOPOLOGY_TOPOLOGY_HPP_INCLUDE #include +#include #include #include #include @@ -55,7 +56,7 @@ class Topology { /// @param[in] topo_node Node to register. void RegisterNodeInputs(const node_id_t node_id, const netuit::TopoNode& topo_node) { for (const auto& input : topo_node.GetInputs()) { - emp_assert(input_registry.count(input.GetEdgeID()) == 0); + assert(input_registry.count(input.GetEdgeID()) == 0); input_registry[input.GetEdgeID()] = node_id; } } @@ -65,7 +66,7 @@ class Topology { /// @param[in] topo_node Node to register. void RegisterNodeOutputs(const node_id_t node_id, const netuit::TopoNode& topo_node) { for (const auto& output : topo_node.GetOutputs()) { - emp_assert(output_registry.count(output.GetEdgeID()) == 0); + assert(output_registry.count(output.GetEdgeID()) == 0); output_registry[output.GetEdgeID()] = node_id; } } @@ -119,7 +120,7 @@ class Topology { } // make sure the node ids are less than the number of lines - emp_assert( std::all_of( + assert( std::all_of( std::begin(node_map), std::end(node_map), [num_lines = lines.size()](const auto& kv) { @@ -212,7 +213,7 @@ class Topology { []( const auto& node ){ return node.GetNumOutputs(); } ); - emp_assert( degrees.size() == GetSize() ); + assert( degrees.size() == GetSize() ); // get each starting position of each node's adjacency list std::vector x_adj{ 0 }; @@ -222,7 +223,7 @@ class Topology { std::back_inserter( x_adj ) ); - emp_assert( x_adj.size() == GetSize() + 1 ); + assert( x_adj.size() == GetSize() + 1 ); // build vector of concatenated adjacency lists std::vector adjacency; @@ -235,12 +236,12 @@ class Topology { ); } - emp_assert( uitsl::safe_equal( + assert( uitsl::safe_equal( adjacency.size(), std::accumulate( std::begin(degrees), std::end(degrees), int32_t{} ) ) ); - emp_assert( std::all_of( + assert( std::all_of( std::begin( x_adj ), std::end( x_adj ), [&adjacency]( const auto val ){ diff --git a/include/uit/ducts/proc/impl/backend/AccumulatingPooledBackEnd.hpp b/include/uit/ducts/proc/impl/backend/AccumulatingPooledBackEnd.hpp index 530eb5b19a..f5995372ad 100644 --- a/include/uit/ducts/proc/impl/backend/AccumulatingPooledBackEnd.hpp +++ b/include/uit/ducts/proc/impl/backend/AccumulatingPooledBackEnd.hpp @@ -7,9 +7,10 @@ #include "../../../../../../third-party/Empirical/third-party/robin-hood-hashing/src/include/robin_hood.h" -#include "../../../../../uit_emp/base/assert.hpp" #include "../../../../../uit_emp/datastructs/tuple_utils.hpp" +#include "../../../../../uitsl/debug/uitsl_assert.hpp" + #include "../../../../setup/InterProcAddress.hpp" #include "impl/InletMemoryAccumulatingPool.hpp" @@ -155,9 +156,7 @@ class AccumulatingPooledBackEnd { auto& pool = inlet_pools.at( address.WhichProcsThreads() ); - #include "../../../../../uit_emp/vendorization/push_assert_macros.hh" - emp_assert( pool.IsInitialized(), pool.GetSize() ); - #include "../../../../../uit_emp/vendorization/pop_assert_macros.hh" + uitsl_assert( pool.IsInitialized(), pool.GetSize() ); return pool; } diff --git a/include/uit/ducts/proc/impl/backend/AggregatedBackEnd.hpp b/include/uit/ducts/proc/impl/backend/AggregatedBackEnd.hpp index fbd79fa0c2..dfc2c93afc 100644 --- a/include/uit/ducts/proc/impl/backend/AggregatedBackEnd.hpp +++ b/include/uit/ducts/proc/impl/backend/AggregatedBackEnd.hpp @@ -7,9 +7,10 @@ #include "../../../../../../third-party/Empirical/third-party/robin-hood-hashing/src/include/robin_hood.h" -#include "../../../../../uit_emp/base/assert.hpp" #include "../../../../../uit_emp/datastructs/tuple_utils.hpp" +#include "../../../../../uitsl/debug/uitsl_assert.hpp" + #include "../../../../setup/InterProcAddress.hpp" #include "impl/AggregatorSpec.hpp" @@ -156,9 +157,7 @@ class AggregatedBackEnd { auto& aggregator = inlet_aggregators.at( address.WhichProcsThreads() ); - #include "../../../../../uit_emp/vendorization/push_assert_macros.hh" - emp_assert( aggregator.IsInitialized(), aggregator.GetSize() ); - #include "../../../../../uit_emp/vendorization/pop_assert_macros.hh" + uitsl_assert( aggregator.IsInitialized(), aggregator.GetSize() ); return aggregator; } diff --git a/include/uit/ducts/proc/impl/backend/PooledBackEnd.hpp b/include/uit/ducts/proc/impl/backend/PooledBackEnd.hpp index ffb6c041f6..ef4c8aa819 100644 --- a/include/uit/ducts/proc/impl/backend/PooledBackEnd.hpp +++ b/include/uit/ducts/proc/impl/backend/PooledBackEnd.hpp @@ -6,9 +6,10 @@ #include "../../../../../../third-party/Empirical/third-party/robin-hood-hashing/src/include/robin_hood.h" -#include "../../../../../uit_emp/base/assert.hpp" #include "../../../../../uit_emp/datastructs/tuple_utils.hpp" +#include "../../../../../uitsl/debug/uitsl_assert.hpp" + #include "../../../../setup/InterProcAddress.hpp" #include "impl/InletMemoryPool.hpp" @@ -153,9 +154,7 @@ class PooledBackEnd { auto& pool = inlet_pools.at( address.WhichProcsThreads() ); - #include "../../../../../uit_emp/vendorization/push_assert_macros.hh" - emp_assert( pool.IsInitialized(), pool.GetSize() ); - #include "../../../../../uit_emp/vendorization/pop_assert_macros.hh" + uitsl_assert( pool.IsInitialized(), pool.GetSize() ); return pool; } diff --git a/include/uit/ducts/proc/impl/inlet/accumulating+type=fundamental/f::AccumulateDuct.hpp b/include/uit/ducts/proc/impl/inlet/accumulating+type=fundamental/f::AccumulateDuct.hpp index 092fdb5b3d..8b5679a3e9 100644 --- a/include/uit/ducts/proc/impl/inlet/accumulating+type=fundamental/f::AccumulateDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/accumulating+type=fundamental/f::AccumulateDuct.hpp @@ -10,9 +10,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - -#include "../../../../../../uitsl/debug/WarnOnce.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/distributed/RdmaAccumulatorPacket.hpp" #include "../../../../../../uitsl/distributed/RdmaWindowManager.hpp" #include "../../../../../../uitsl/meta/f::static_test.hpp" @@ -25,7 +23,6 @@ #include "../../backend/RdmaBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" namespace uit { namespace f { @@ -88,7 +85,7 @@ class AccumulateDuct { std::vector{} ); - // we'll emp_assert later to make sure it actually completed + // we'll assert later to make sure it actually completed UITSL_Irecv( &target_offset, // void *buf 1, // int count @@ -119,17 +116,17 @@ class AccumulateDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on AccumulateDuct"); + uitsl_always_assert(false, "ConsumeGets called on AccumulateDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on AccumulateDuct"); + uitsl_always_assert(false, "Get called on AccumulateDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on AccumulateDuct"); + uitsl_always_assert(false, "Get called on AccumulateDuct"); __builtin_unreachable(); } @@ -147,6 +144,5 @@ class AccumulateDuct { } // namespace f } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_ACCUMULATING_TYPE_FUNDAMENTAL_F__ACCUMULATEDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/accumulating+type=fundamental/f::RaccumulateDuct.hpp b/include/uit/ducts/proc/impl/inlet/accumulating+type=fundamental/f::RaccumulateDuct.hpp index a98abc310c..474938415e 100644 --- a/include/uit/ducts/proc/impl/inlet/accumulating+type=fundamental/f::RaccumulateDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/accumulating+type=fundamental/f::RaccumulateDuct.hpp @@ -4,15 +4,14 @@ #include #include +#include #include #include #include #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - -#include "../../../../../../uitsl/debug/WarnOnce.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/distributed/RdmaAccumulatorPacket.hpp" #include "../../../../../../uitsl/distributed/RdmaWindowManager.hpp" #include "../../../../../../uitsl/meta/f::static_test.hpp" @@ -25,8 +24,6 @@ #include "../../backend/RdmaBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace f { @@ -64,7 +61,7 @@ class RaccumulateDuct { void DoPostAccumulate() { - emp_assert( uitsl::test_null( request ) ); + assert( uitsl::test_null( request ) ); std::swap( send_buffer, prep_buffer ); *prep_buffer = packet_t{}; @@ -82,7 +79,7 @@ class RaccumulateDuct { back_end->GetWindowManager().Unlock( address.GetOutletProc() ); - emp_assert( !uitsl::test_null( request ) ); + assert( !uitsl::test_null( request ) ); } @@ -106,7 +103,7 @@ class RaccumulateDuct { std::vector{} ); - // we'll emp_assert later to make sure it actually completed + // we'll assert later to make sure it actually completed UITSL_Irecv( &target_offset, // void *buf 1, // int count @@ -139,17 +136,17 @@ class RaccumulateDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on RaccumulateDuct"); + uitsl_always_assert(false, "ConsumeGets called on RaccumulateDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on RaccumulateDuct"); + uitsl_always_assert(false, "Get called on RaccumulateDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on RaccumulateDuct"); + uitsl_always_assert(false, "Get called on RaccumulateDuct"); __builtin_unreachable(); } @@ -168,6 +165,4 @@ class RaccumulateDuct { } // namespace f } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_ACCUMULATING_TYPE_FUNDAMENTAL_F__RACCUMULATEDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/accumulating+type=span/impl/AccumulatingSpanIsendDuct.hpp b/include/uit/ducts/proc/impl/inlet/accumulating+type=span/impl/AccumulatingSpanIsendDuct.hpp index 44ba3242bd..0f104d7ece 100644 --- a/include/uit/ducts/proc/impl/inlet/accumulating+type=span/impl/AccumulatingSpanIsendDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/accumulating+type=span/impl/AccumulatingSpanIsendDuct.hpp @@ -13,6 +13,7 @@ #include "../../../../../../../uitsl/datastructs/RingBuffer.hpp" #include "../../../../../../../uitsl/debug/err_audit.hpp" +#include "../../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../../uitsl/distributed/MsgAccumulatorBundle.hpp" #include "../../../../../../../uitsl/meta/s::static_test.hpp" #include "../../../../../../../uitsl/mpi/audited_routines.hpp" @@ -141,17 +142,19 @@ class AccumulatingSpanIsendDuct { } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on AccumulatingSpanIsendDuct"); + uitsl_always_assert( + false, "ConsumeGets called on AccumulatingSpanIsendDuct" + ); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on AccumulatingSpanIsendDuct"); + uitsl_always_assert(false, "Get called on AccumulatingSpanIsendDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on AccumulatingSpanIsendDuct"); + uitsl_always_assert(false, "Get called on AccumulatingSpanIsendDuct"); __builtin_unreachable(); } diff --git a/include/uit/ducts/proc/impl/inlet/accumulating+type=spanfundamental/sf::AccumulateDuct.hpp b/include/uit/ducts/proc/impl/inlet/accumulating+type=spanfundamental/sf::AccumulateDuct.hpp index 79da7b14b2..febffa5071 100644 --- a/include/uit/ducts/proc/impl/inlet/accumulating+type=spanfundamental/sf::AccumulateDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/accumulating+type=spanfundamental/sf::AccumulateDuct.hpp @@ -10,9 +10,9 @@ #include -#include "../../../../../../uitsl/debug/WarnOnce.hpp" #include "../../../../../../uitsl/distributed/RdmaAccumulatorBundle.hpp" #include "../../../../../../uitsl/distributed/RdmaWindowManager.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/meta/f::static_test.hpp" #include "../../../../../../uitsl/meta/s::static_test.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" @@ -137,17 +137,17 @@ class AccumulateDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on AccumulateDuct"); + uitsl_always_assert(false, "ConsumeGets called on AccumulateDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on AccumulateDuct"); + uitsl_always_assert(false, "Get called on AccumulateDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on AccumulateDuct"); + uitsl_always_assert(false, "Get called on AccumulateDuct"); __builtin_unreachable(); } diff --git a/include/uit/ducts/proc/impl/inlet/accumulating+type=spanfundamental/sf::RaccumulateDuct.hpp b/include/uit/ducts/proc/impl/inlet/accumulating+type=spanfundamental/sf::RaccumulateDuct.hpp index 66b6f20810..c5eee6308c 100644 --- a/include/uit/ducts/proc/impl/inlet/accumulating+type=spanfundamental/sf::RaccumulateDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/accumulating+type=spanfundamental/sf::RaccumulateDuct.hpp @@ -11,9 +11,9 @@ #include -#include "../../../../../../uitsl/debug/WarnOnce.hpp" #include "../../../../../../uitsl/distributed/RdmaAccumulatorBundle.hpp" #include "../../../../../../uitsl/distributed/RdmaWindowManager.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/meta/f::static_test.hpp" #include "../../../../../../uitsl/meta/s::static_test.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" @@ -146,17 +146,17 @@ class RaccumulateDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on RaccumulateDuct"); + uitsl_always_assert(false, "ConsumeGets called on RaccumulateDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on RaccumulateDuct"); + uitsl_always_assert(false, "Get called on RaccumulateDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on RaccumulateDuct"); + uitsl_always_assert(false, "Get called on RaccumulateDuct"); __builtin_unreachable(); } diff --git a/include/uit/ducts/proc/impl/inlet/accumulating+type=trivial/impl/AccumulatingTrivialIsendDuct.hpp b/include/uit/ducts/proc/impl/inlet/accumulating+type=trivial/impl/AccumulatingTrivialIsendDuct.hpp index af2d1e6036..d16aa23933 100644 --- a/include/uit/ducts/proc/impl/inlet/accumulating+type=trivial/impl/AccumulatingTrivialIsendDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/accumulating+type=trivial/impl/AccumulatingTrivialIsendDuct.hpp @@ -13,6 +13,7 @@ #include "../../../../../../../uitsl/datastructs/RingBuffer.hpp" #include "../../../../../../../uitsl/debug/err_audit.hpp" +#include "../../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../../uitsl/distributed/MsgAccumulatorPacket.hpp" #include "../../../../../../../uitsl/meta/t::static_test.hpp" #include "../../../../../../../uitsl/mpi/audited_routines.hpp" @@ -129,19 +130,19 @@ class AccumulatingTrivialIsendDuct { } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert( + uitsl_always_assert( false, "ConsumeGets called on AccumulatingTrivialIsendDuct" ); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on AccumulatingTrivialIsendDuct"); + uitsl_always_assert(false, "Get called on AccumulatingTrivialIsendDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on AccumulatingTrivialIsendDuct"); + uitsl_always_assert(false, "Get called on AccumulatingTrivialIsendDuct"); __builtin_unreachable(); } diff --git a/include/uit/ducts/proc/impl/inlet/put=dropping+type=cereal/impl/CerealRingImmediateSendDuct.hpp b/include/uit/ducts/proc/impl/inlet/put=dropping+type=cereal/impl/CerealRingImmediateSendDuct.hpp index 63030dd2d2..784a201ac5 100644 --- a/include/uit/ducts/proc/impl/inlet/put=dropping+type=cereal/impl/CerealRingImmediateSendDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/put=dropping+type=cereal/impl/CerealRingImmediateSendDuct.hpp @@ -11,11 +11,12 @@ #include #include "../../../../../../../../third-party/cereal/include/cereal/archives/binary.hpp" -#include "../../../../../../../uit_emp/base/always_assert.hpp" + #include "../../../../../../../uit_emp/io/ContiguousStream.hpp" #include "../../../../../../../uitsl/datastructs/RingBuffer.hpp" #include "../../../../../../../uitsl/debug/err_audit.hpp" +#include "../../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../../uitsl/meta/c::static_test.hpp" #include "../../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../../uitsl/mpi/Request.hpp" @@ -26,7 +27,6 @@ #include "../../../backend/MockBackEnd.hpp" -#include "../../../../../../../uit_emp/vendorization/push_assert_macros.hh" namespace uit { namespace internal { @@ -155,19 +155,19 @@ class CerealRingImmediateSendDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert( + uitsl_always_assert( false, "ConsumeGets called on CerealRingImmediateSendDuct" ); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on CerealRingImmediateSendDuct"); + uitsl_always_assert(false, "Get called on CerealRingImmediateSendDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on CerealRingImmediateSendDuct"); + uitsl_always_assert(false, "Get called on CerealRingImmediateSendDuct"); __builtin_unreachable(); } @@ -185,6 +185,5 @@ class CerealRingImmediateSendDuct { } // namespace internal } // namespace uit -#include "../../../../../../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_PUT_DROPPING_TYPE_CEREAL_IMPL_CEREALRINGIMMEDIATESENDDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/put=dropping+type=span/impl/SpanRingImmediateSendDuct.hpp b/include/uit/ducts/proc/impl/inlet/put=dropping+type=span/impl/SpanRingImmediateSendDuct.hpp index 8a35da3973..9d8c846e21 100644 --- a/include/uit/ducts/proc/impl/inlet/put=dropping+type=span/impl/SpanRingImmediateSendDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/put=dropping+type=span/impl/SpanRingImmediateSendDuct.hpp @@ -13,10 +13,9 @@ #include "../../../../../../../../third-party/cereal/include/cereal/archives/binary.hpp" -#include "../../../../../../../uit_emp/base/always_assert.hpp" - #include "../../../../../../../uitsl/datastructs/RingBuffer.hpp" #include "../../../../../../../uitsl/debug/err_audit.hpp" +#include "../../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../../uitsl/meta/s::static_test.hpp" #include "../../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../../uitsl/mpi/Request.hpp" @@ -27,7 +26,6 @@ #include "../../../backend/RuntimeSizeBackEnd.hpp" -#include "../../../../../../../uit_emp/vendorization/push_assert_macros.hh" namespace uit { namespace internal { @@ -189,17 +187,19 @@ class SpanRingImmediateSendDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on SpanRingImmediateSendDuct"); + uitsl_always_assert( + false, "ConsumeGets called on SpanRingImmediateSendDuct" + ); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on SpanRingImmediateSendDuct"); + uitsl_always_assert(false, "Get called on SpanRingImmediateSendDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on SpanRingImmediateSendDuct"); + uitsl_always_assert(false, "Get called on SpanRingImmediateSendDuct"); __builtin_unreachable(); } @@ -217,6 +217,5 @@ class SpanRingImmediateSendDuct { } // namespace internal } // namespace uit -#include "../../../../../../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_PUT_DROPPING_TYPE_SPAN_IMPL_SPANRINGIMMEDIATESENDDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/put=dropping+type=trivial/impl/TrivialRingImmediateSendDuct.hpp b/include/uit/ducts/proc/impl/inlet/put=dropping+type=trivial/impl/TrivialRingImmediateSendDuct.hpp index d41970706e..10c30f4042 100644 --- a/include/uit/ducts/proc/impl/inlet/put=dropping+type=trivial/impl/TrivialRingImmediateSendDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/put=dropping+type=trivial/impl/TrivialRingImmediateSendDuct.hpp @@ -10,10 +10,9 @@ #include -#include "../../../../../../../uit_emp/base/always_assert.hpp" - #include "../../../../../../../uitsl/datastructs/RingBuffer.hpp" #include "../../../../../../../uitsl/debug/err_audit.hpp" +#include "../../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../../uitsl/meta/t::static_test.hpp" #include "../../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../../uitsl/mpi/Request.hpp" @@ -24,7 +23,6 @@ #include "../../../backend/MockBackEnd.hpp" -#include "../../../../../../../uit_emp/vendorization/push_assert_macros.hh" namespace uit { namespace internal { @@ -145,19 +143,19 @@ class TrivialRingImmediateSendDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert( + uitsl_always_assert( false, "ConsumeGets called on TrivialRingImmediateSendDuct" ); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on TrivialRingImmediateSendDuct"); + uitsl_always_assert(false, "Get called on TrivialRingImmediateSendDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on TrivialRingImmediateSendDuct"); + uitsl_always_assert(false, "Get called on TrivialRingImmediateSendDuct"); __builtin_unreachable(); } @@ -175,6 +173,5 @@ class TrivialRingImmediateSendDuct { } // namespace internal } // namespace uit -#include "../../../../../../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_PUT_DROPPING_TYPE_TRIVIAL_IMPL_TRIVIALRINGIMMEDIATESENDDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/put=dropping+type=trivial/t::RingRputDuct.hpp b/include/uit/ducts/proc/impl/inlet/put=dropping+type=trivial/t::RingRputDuct.hpp index 77a5ab979c..801f859cd8 100644 --- a/include/uit/ducts/proc/impl/inlet/put=dropping+type=trivial/t::RingRputDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/put=dropping+type=trivial/t::RingRputDuct.hpp @@ -10,9 +10,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - -#include "../../../../../../uitsl/debug/WarnOnce.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/distributed/RdmaPacket.hpp" #include "../../../../../../uitsl/distributed/RdmaWindowManager.hpp" #include "../../../../../../uitsl/meta/t::static_test.hpp" @@ -25,7 +23,6 @@ #include "../../backend/RdmaBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" namespace uit { namespace t { @@ -273,17 +270,17 @@ class RingRputDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on RingRputDuct"); + uitsl_always_assert(false, "ConsumeGets called on RingRputDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on RingRputDuct"); + uitsl_always_assert(false, "Get called on RingRputDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on RingRputDuct"); + uitsl_always_assert(false, "Get called on RingRputDuct"); __builtin_unreachable(); } @@ -305,5 +302,4 @@ class RingRputDuct { } // namespace t } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_PUT_DROPPING_TYPE_TRIVIAL_T__RINGRPUTDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/put=growing+type=cereal/impl/CerealBlockingSendDuct.hpp b/include/uit/ducts/proc/impl/inlet/put=growing+type=cereal/impl/CerealBlockingSendDuct.hpp index b0616834a2..d30b6329d1 100644 --- a/include/uit/ducts/proc/impl/inlet/put=growing+type=cereal/impl/CerealBlockingSendDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/put=growing+type=cereal/impl/CerealBlockingSendDuct.hpp @@ -10,9 +10,9 @@ #include -#include "../../../../../../../uit_emp/base/always_assert.hpp" #include "../../../../../../../uit_emp/io/ContiguousStream.hpp" +#include "../../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../../uitsl/meta/c::static_test.hpp" #include "../../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../../uitsl/nonce/CircularIndex.hpp" @@ -22,7 +22,6 @@ #include "../../../backend/MockBackEnd.hpp" -#include "../../../../../../../uit_emp/vendorization/push_assert_macros.hh" namespace uit { namespace internal { @@ -92,17 +91,17 @@ class CerealBlockingSendDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on CerealBlockingSendDuct"); + uitsl_always_assert(false, "ConsumeGets called on CerealBlockingSendDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on CerealBlockingSendDuct"); + uitsl_always_assert(false, "Get called on CerealBlockingSendDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on CerealBlockingSendDuct"); + uitsl_always_assert(false, "Get called on CerealBlockingSendDuct"); __builtin_unreachable(); } @@ -120,6 +119,5 @@ class CerealBlockingSendDuct { } // namespace internal } // namespace uit -#include "../../../../../../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_PUT_GROWING_TYPE_CEREAL_IMPL_CEREALBLOCKINGSENDDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/put=growing+type=cereal/impl/CerealDequeImmediateSendDuct.hpp b/include/uit/ducts/proc/impl/inlet/put=growing+type=cereal/impl/CerealDequeImmediateSendDuct.hpp index e748c94fd0..7526068805 100644 --- a/include/uit/ducts/proc/impl/inlet/put=growing+type=cereal/impl/CerealDequeImmediateSendDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/put=growing+type=cereal/impl/CerealDequeImmediateSendDuct.hpp @@ -14,9 +14,9 @@ #include "../../../../../../../../third-party/cereal/include/cereal/archives/binary.hpp" -#include "../../../../../../../uit_emp/base/always_assert.hpp" #include "../../../../../../../uit_emp/io/ContiguousStream.hpp" +#include "../../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../../uitsl/meta/c::static_test.hpp" #include "../../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../../uitsl/mpi/Request.hpp" @@ -27,7 +27,6 @@ #include "../../../backend/MockBackEnd.hpp" -#include "../../../../../../../uit_emp/vendorization/push_assert_macros.hh" namespace uit { namespace internal { @@ -133,19 +132,19 @@ class CerealDequeImmediateSendDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert( + uitsl_always_assert( false, "ConsumeGets called on CerealDequeImmediateSendDuct" ); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on CerealDequeImmediateSendDuct"); + uitsl_always_assert(false, "Get called on CerealDequeImmediateSendDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on CerealDequeImmediateSendDuct"); + uitsl_always_assert(false, "Get called on CerealDequeImmediateSendDuct"); __builtin_unreachable(); } @@ -164,6 +163,5 @@ class CerealDequeImmediateSendDuct { } // namespace internal } // namespace uit -#include "../../../../../../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_PUT_GROWING_TYPE_CEREAL_IMPL_CEREALDEQUEIMMEDIATESENDDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/impl/TrivialBlockingSendDuct.hpp b/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/impl/TrivialBlockingSendDuct.hpp index 3ffc219948..8818726b09 100644 --- a/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/impl/TrivialBlockingSendDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/impl/TrivialBlockingSendDuct.hpp @@ -10,8 +10,7 @@ #include -#include "../../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../../uitsl/meta/t::static_test.hpp" #include "../../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../../uitsl/nonce/CircularIndex.hpp" @@ -21,7 +20,6 @@ #include "../../../backend/MockBackEnd.hpp" -#include "../../../../../../../uit_emp/vendorization/push_assert_macros.hh" namespace uit { namespace internal { @@ -80,17 +78,17 @@ class TrivialBlockingSendDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on TrivialBlockingSendDuct"); + uitsl_always_assert(false, "ConsumeGets called on TrivialBlockingSendDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on TrivialBlockingSendDuct"); + uitsl_always_assert(false, "Get called on TrivialBlockingSendDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on TrivialBlockingSendDuct"); + uitsl_always_assert(false, "Get called on TrivialBlockingSendDuct"); __builtin_unreachable(); } @@ -109,6 +107,4 @@ class TrivialBlockingSendDuct { } // namespace internal } // namespace uit -#include "../../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_PUT_GROWING_TYPE_TRIVIAL_IMPL_TRIVIALBLOCKINGSENDDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/impl/TrivialDequeImmediateSendDuct.hpp b/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/impl/TrivialDequeImmediateSendDuct.hpp index f71625d2b1..1d779c33bd 100644 --- a/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/impl/TrivialDequeImmediateSendDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/impl/TrivialDequeImmediateSendDuct.hpp @@ -12,8 +12,7 @@ #include -#include "../../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../../uitsl/meta/t::static_test.hpp" #include "../../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../../uitsl/mpi/Request.hpp" @@ -24,8 +23,6 @@ #include "../../../backend/MockBackEnd.hpp" -#include "../../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace internal { @@ -128,19 +125,19 @@ class TrivialDequeImmediateSendDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert( + uitsl_always_assert( false, "ConsumeGets called on TrivialDequeImmediateSendDuct" ); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on TrivialDequeImmediateSendDuct"); + uitsl_always_assert(false, "Get called on TrivialDequeImmediateSendDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on TrivialDequeImmediateSendDuct"); + uitsl_always_assert(false, "Get called on TrivialDequeImmediateSendDuct"); __builtin_unreachable(); } @@ -160,6 +157,4 @@ class TrivialDequeImmediateSendDuct { } // namespace internal } // namespace uit -#include "../../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_PUT_GROWING_TYPE_TRIVIAL_IMPL_TRIVIALDEQUEIMMEDIATESENDDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/t::DequeRputDuct.hpp b/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/t::DequeRputDuct.hpp index 837ce12498..391f2b1990 100644 --- a/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/t::DequeRputDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/t::DequeRputDuct.hpp @@ -13,9 +13,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - -#include "../../../../../../uitsl/debug/WarnOnce.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/distributed/RdmaPacket.hpp" #include "../../../../../../uitsl/distributed/RdmaWindowManager.hpp" #include "../../../../../../uitsl/meta/t::static_test.hpp" @@ -28,7 +26,6 @@ #include "../../backend/RdmaBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" namespace uit { namespace t { @@ -172,17 +169,17 @@ class DequeRputDuct { bool TryFlush() const { return true; } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on DequeRputDuct"); + uitsl_always_assert(false, "ConsumeGets called on DequeRputDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on DequeRputDuct"); + uitsl_always_assert(false, "Get called on DequeRputDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on DequeRputDuct"); + uitsl_always_assert(false, "Get called on DequeRputDuct"); __builtin_unreachable(); } @@ -201,6 +198,4 @@ class DequeRputDuct { } // namespace t } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_PUT_GROWING_TYPE_TRIVIAL_T__DEQUERPUTDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/t::PutDuct.hpp b/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/t::PutDuct.hpp index 0ddf19adb2..45bd7c6c60 100644 --- a/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/t::PutDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/put=growing+type=trivial/t::PutDuct.hpp @@ -10,9 +10,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - -#include "../../../../../../uitsl/debug/WarnOnce.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/distributed/RdmaPacket.hpp" #include "../../../../../../uitsl/distributed/RdmaWindowManager.hpp" #include "../../../../../../uitsl/meta/t::static_test.hpp" @@ -25,8 +23,6 @@ #include "../../backend/RdmaBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace t { @@ -122,17 +118,17 @@ class PutDuct { } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on PutDuct"); + uitsl_always_assert(false, "ConsumeGets called on PutDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on PutDuct"); + uitsl_always_assert(false, "Get called on PutDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on PutDuct"); + uitsl_always_assert(false, "Get called on PutDuct"); __builtin_unreachable(); } @@ -151,6 +147,4 @@ class PutDuct { } // namespace t } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_PUT_GROWING_TYPE_TRIVIAL_T__PUTDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/templated/AccumulatingPooledInletDuct.hpp b/include/uit/ducts/proc/impl/inlet/templated/AccumulatingPooledInletDuct.hpp index 2150234f5f..53767b7449 100644 --- a/include/uit/ducts/proc/impl/inlet/templated/AccumulatingPooledInletDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/templated/AccumulatingPooledInletDuct.hpp @@ -11,8 +11,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../uitsl/utility/print_utils.hpp" @@ -20,8 +19,6 @@ #include "../../backend/AccumulatingPooledBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { /** @@ -86,19 +83,19 @@ class AccumulatingPooledInletDuct { } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert( + uitsl_always_assert( false, "ConsumeGets called on AccumulatingPooledInletDuct" ); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on AccumulatingPooledInletDuct"); + uitsl_always_assert(false, "Get called on AccumulatingPooledInletDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on AccumulatingPooledInletDuct"); + uitsl_always_assert(false, "Get called on AccumulatingPooledInletDuct"); __builtin_unreachable(); } @@ -115,6 +112,4 @@ class AccumulatingPooledInletDuct { } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_TEMPLATED_ACCUMULATINGPOOLEDINLETDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/templated/AggregatedInletDuct.hpp b/include/uit/ducts/proc/impl/inlet/templated/AggregatedInletDuct.hpp index f0d59ed23a..644cce31dc 100644 --- a/include/uit/ducts/proc/impl/inlet/templated/AggregatedInletDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/templated/AggregatedInletDuct.hpp @@ -11,8 +11,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../uitsl/utility/print_utils.hpp" @@ -20,8 +19,6 @@ #include "../../backend/AggregatedBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { /** @@ -84,17 +81,17 @@ class AggregatedInletDuct { } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on AggregatedInletDuct"); + uitsl_always_assert(false, "ConsumeGets called on AggregatedInletDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on AggregatedInletDuct"); + uitsl_always_assert(false, "Get called on AggregatedInletDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on AggregatedInletDuct"); + uitsl_always_assert(false, "Get called on AggregatedInletDuct"); __builtin_unreachable(); } @@ -111,6 +108,4 @@ class AggregatedInletDuct { } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_TEMPLATED_AGGREGATEDINLETDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/templated/BufferedInletDuct.hpp b/include/uit/ducts/proc/impl/inlet/templated/BufferedInletDuct.hpp index bb3f0a6d3b..b78854146f 100644 --- a/include/uit/ducts/proc/impl/inlet/templated/BufferedInletDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/templated/BufferedInletDuct.hpp @@ -8,8 +8,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../uitsl/utility/print_utils.hpp" @@ -17,8 +16,6 @@ #include "impl/BufferSpec.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { /** @@ -97,17 +94,17 @@ class BufferedInletDuct { } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on BufferedInletDuct"); + uitsl_always_assert(false, "ConsumeGets called on BufferedInletDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on BufferedInletDuct"); + uitsl_always_assert(false, "Get called on BufferedInletDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on BufferedInletDuct"); + uitsl_always_assert(false, "Get called on BufferedInletDuct"); __builtin_unreachable(); } @@ -124,6 +121,4 @@ class BufferedInletDuct { } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_TEMPLATED_BUFFEREDINLETDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/inlet/templated/PooledInletDuct.hpp b/include/uit/ducts/proc/impl/inlet/templated/PooledInletDuct.hpp index 8a5cc301a5..ebccb41f8f 100644 --- a/include/uit/ducts/proc/impl/inlet/templated/PooledInletDuct.hpp +++ b/include/uit/ducts/proc/impl/inlet/templated/PooledInletDuct.hpp @@ -11,8 +11,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../uitsl/utility/print_utils.hpp" @@ -20,8 +19,6 @@ #include "../../backend/PooledBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { /** @@ -86,17 +83,17 @@ class PooledInletDuct { } [[noreturn]] size_t TryConsumeGets(size_t) const { - emp_always_assert(false, "ConsumeGets called on PooledInletDuct"); + uitsl_always_assert(false, "ConsumeGets called on PooledInletDuct"); __builtin_unreachable(); } [[noreturn]] const T& Get() const { - emp_always_assert(false, "Get called on PooledInletDuct"); + uitsl_always_assert(false, "Get called on PooledInletDuct"); __builtin_unreachable(); } [[noreturn]] T& Get() { - emp_always_assert(false, "Get called on PooledInletDuct"); + uitsl_always_assert(false, "Get called on PooledInletDuct"); __builtin_unreachable(); } @@ -113,6 +110,4 @@ class PooledInletDuct { } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_INLET_TEMPLATED_POOLEDINLETDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/accumulating+type=fundamental/f::WithdrawingWindowDuct.hpp b/include/uit/ducts/proc/impl/outlet/accumulating+type=fundamental/f::WithdrawingWindowDuct.hpp index 2ffff0d556..22c2f56802 100644 --- a/include/uit/ducts/proc/impl/outlet/accumulating+type=fundamental/f::WithdrawingWindowDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/accumulating+type=fundamental/f::WithdrawingWindowDuct.hpp @@ -11,10 +11,8 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - #include "../../../../../../uitsl/debug/safe_compare.hpp" -#include "../../../../../../uitsl/debug/WarnOnce.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/distributed/RdmaAccumulatorPacket.hpp" #include "../../../../../../uitsl/distributed/RdmaWindowManager.hpp" #include "../../../../../../uitsl/meta/f::static_test.hpp" @@ -26,8 +24,6 @@ #include "../../backend/RdmaBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace f { @@ -95,12 +91,12 @@ class WithdrawingWindowDuct { } [[noreturn]] bool TryPut(const T&) { - emp_always_assert(false, "TryPut called on WithdrawingWindowDuct"); + uitsl_always_assert(false, "TryPut called on WithdrawingWindowDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on WithdrawingWindowDuct"); + uitsl_always_assert(false, "Flush called on WithdrawingWindowDuct"); __builtin_unreachable(); } @@ -136,7 +132,7 @@ class WithdrawingWindowDuct { back_end->GetWindowManager().Unlock( address.GetInletProc() ); - emp_assert( cache.epoch >= 0 ); + assert( cache.epoch >= 0 ); return static_cast( cache.epoch ); } @@ -162,6 +158,4 @@ class WithdrawingWindowDuct { } // namespace f } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_ACCUMULATING_TYPE_FUNDAMENTAL_F__WITHDRAWINGWINDOWDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/accumulating+type=span/s::IrecvDuct.hpp b/include/uit/ducts/proc/impl/outlet/accumulating+type=span/s::IrecvDuct.hpp index 4e579e4e4b..715dc74749 100644 --- a/include/uit/ducts/proc/impl/outlet/accumulating+type=span/s::IrecvDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/accumulating+type=span/s::IrecvDuct.hpp @@ -9,9 +9,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - -#include "../../../../../../uitsl/debug/WarnOnce.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/distributed/MsgAccumulatorBundle.hpp" #include "../../../../../../uitsl/meta/s::static_test.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" @@ -22,8 +20,6 @@ #include "../../backend/RuntimeSizeBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace s { @@ -119,12 +115,12 @@ class IrecvDuct { } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "TryPut called on IrecvDuct"); + uitsl_always_assert(false, "TryPut called on IrecvDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on IrecvDuct"); + uitsl_always_assert(false, "Flush called on IrecvDuct"); __builtin_unreachable(); } @@ -177,6 +173,4 @@ class IrecvDuct { } // namespace s } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_ACCUMULATING_TYPE_SPAN_S__IRECVDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/accumulating+type=spanfundamental/sf::WithdrawingWindowDuct.hpp b/include/uit/ducts/proc/impl/outlet/accumulating+type=spanfundamental/sf::WithdrawingWindowDuct.hpp index 541d2281a5..e179632312 100644 --- a/include/uit/ducts/proc/impl/outlet/accumulating+type=spanfundamental/sf::WithdrawingWindowDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/accumulating+type=spanfundamental/sf::WithdrawingWindowDuct.hpp @@ -10,10 +10,8 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - #include "../../../../../../uitsl/debug/safe_compare.hpp" -#include "../../../../../../uitsl/debug/WarnOnce.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/distributed/RdmaAccumulatorBundle.hpp" #include "../../../../../../uitsl/distributed/RdmaWindowManager.hpp" #include "../../../../../../uitsl/meta/f::static_test.hpp" @@ -27,8 +25,6 @@ #include "../../backend/RuntimeSizeBackEnd.hpp" #include "../../backend/RuntimeSizeRdmaBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace sf { @@ -106,12 +102,12 @@ class WithdrawingWindowDuct { } [[noreturn]] bool TryPut(const T&) { - emp_always_assert(false, "TryPut called on WithdrawingWindowDuct"); + uitsl_always_assert(false, "TryPut called on WithdrawingWindowDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on WithdrawingWindowDuct"); + uitsl_always_assert(false, "Flush called on WithdrawingWindowDuct"); __builtin_unreachable(); } @@ -172,6 +168,4 @@ class WithdrawingWindowDuct { } // namespace f } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_ACCUMULATING_TYPE_SPANFUNDAMENTAL_SF__WITHDRAWINGWINDOWDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/accumulating+type=trivial/t::IrecvDuct.hpp b/include/uit/ducts/proc/impl/outlet/accumulating+type=trivial/t::IrecvDuct.hpp index a507231680..c6d50f89d4 100644 --- a/include/uit/ducts/proc/impl/outlet/accumulating+type=trivial/t::IrecvDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/accumulating+type=trivial/t::IrecvDuct.hpp @@ -9,8 +9,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/distributed/MsgAccumulatorPacket.hpp" #include "../../../../../../uitsl/meta/t::static_test.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" @@ -21,8 +20,6 @@ #include "../../backend/MockBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace t { @@ -107,12 +104,12 @@ class IrecvDuct { } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "TryPut called on IrecvDuct"); + uitsl_always_assert(false, "TryPut called on IrecvDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on IrecvDuct"); + uitsl_always_assert(false, "Flush called on IrecvDuct"); __builtin_unreachable(); } @@ -166,6 +163,4 @@ class IrecvDuct { } // namespace t } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_ACCUMULATING_TYPE_TRIVIAL_T__IRECVDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/get=skipping+type=span/s::BlockIrecvDuct.hpp b/include/uit/ducts/proc/impl/outlet/get=skipping+type=span/s::BlockIrecvDuct.hpp index b63ec6b08c..104651412f 100644 --- a/include/uit/ducts/proc/impl/outlet/get=skipping+type=span/s::BlockIrecvDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/get=skipping+type=span/s::BlockIrecvDuct.hpp @@ -10,8 +10,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/debug/WarnOnce.hpp" #include "../../../../../../uitsl/meta/s::static_test.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" @@ -23,8 +22,6 @@ #include "../../backend/RuntimeSizeBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace s { @@ -173,12 +170,12 @@ class BlockIrecvDuct { } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "TryPut called on BlockIrecvDuct"); + uitsl_always_assert(false, "TryPut called on BlockIrecvDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on BlockIrecvDuct"); + uitsl_always_assert(false, "Flush called on BlockIrecvDuct"); __builtin_unreachable(); } @@ -243,6 +240,4 @@ class BlockIrecvDuct { } // namespace s } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_GET_SKIPPING_TYPE_SPAN_S__BLOCKIRECVDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/get=skipping+type=trivial/t::BlockIrecvDuct.hpp b/include/uit/ducts/proc/impl/outlet/get=skipping+type=trivial/t::BlockIrecvDuct.hpp index c6048747c0..a19fb96941 100644 --- a/include/uit/ducts/proc/impl/outlet/get=skipping+type=trivial/t::BlockIrecvDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/get=skipping+type=trivial/t::BlockIrecvDuct.hpp @@ -9,8 +9,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/meta/t::static_test.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../uitsl/mpi/Request.hpp" @@ -21,8 +20,6 @@ #include "../../backend/MockBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace t { @@ -158,12 +155,12 @@ class BlockIrecvDuct { } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "TryPut called on BlockIrecvDuct"); + uitsl_always_assert(false, "TryPut called on BlockIrecvDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on BlockIrecvDuct"); + uitsl_always_assert(false, "Flush called on BlockIrecvDuct"); __builtin_unreachable(); } @@ -222,6 +219,4 @@ class BlockIrecvDuct { } // namespace t } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_GET_SKIPPING_TYPE_TRIVIAL_T__BLOCKIRECVDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/get=skipping+type=trivial/t::WindowDuct.hpp b/include/uit/ducts/proc/impl/outlet/get=skipping+type=trivial/t::WindowDuct.hpp index 20c4a57168..ce79aefac5 100644 --- a/include/uit/ducts/proc/impl/outlet/get=skipping+type=trivial/t::WindowDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/get=skipping+type=trivial/t::WindowDuct.hpp @@ -11,10 +11,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" -#include "../../../../../../uit_emp/base/assert.hpp" - -#include "../../../../../../uitsl/debug/WarnOnce.hpp" +#include "../../../../../../uitsl/debug/uitsl_assert.hpp" #include "../../../../../../uitsl/distributed/RdmaPacket.hpp" #include "../../../../../../uitsl/distributed/RdmaWindowManager.hpp" #include "../../../../../../uitsl/meta/t::static_test.hpp" @@ -26,8 +23,6 @@ #include "../../backend/RdmaBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace t { @@ -96,12 +91,12 @@ class WindowDuct { } [[noreturn]] bool TryPut(const T&) { - emp_always_assert(false, "TryPut called on WindowDuct"); + uitsl_always_assert(false, "TryPut called on WindowDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on WindowDuct"); + uitsl_always_assert(false, "Flush called on WindowDuct"); __builtin_unreachable(); } @@ -120,7 +115,7 @@ class WindowDuct { ); back_end->GetWindowManager().Unlock( address.GetInletProc() ); - emp_assert( cache.GetEpoch() >= cur_epoch , cache.GetEpoch(), cur_epoch ); + uitsl_assert(cache.GetEpoch() >= cur_epoch, cache.GetEpoch() << cur_epoch); const size_t elapsed_epochs = cache.GetEpoch() - cur_epoch; @@ -150,6 +145,4 @@ class WindowDuct { } // namespace t } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_GET_SKIPPING_TYPE_TRIVIAL_T__WINDOWDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/get=stepping+type=cereal/c::IprobeDuct.hpp b/include/uit/ducts/proc/impl/outlet/get=stepping+type=cereal/c::IprobeDuct.hpp index 5213851b19..6b4f813dd8 100644 --- a/include/uit/ducts/proc/impl/outlet/get=stepping+type=cereal/c::IprobeDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/get=stepping+type=cereal/c::IprobeDuct.hpp @@ -12,9 +12,9 @@ #include #include "../../../../../../../third-party/cereal/include/cereal/archives/binary.hpp" -#include "../../../../../../uit_emp/base/always_assert.hpp" #include "../../../../../../uit_emp/io/MemoryIStream.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/initialization/Uninitialized.hpp" #include "../../../../../../uitsl/meta/c::static_test.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" @@ -26,8 +26,6 @@ #include "../../backend/MockBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace c { @@ -138,12 +136,12 @@ class IprobeDuct { } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "Put called on IprobeDuct"); + uitsl_always_assert(false, "Put called on IprobeDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on IprobeDuct"); + uitsl_always_assert(false, "Flush called on IprobeDuct"); __builtin_unreachable(); } @@ -199,6 +197,4 @@ class IprobeDuct { } // namespace c } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_GET_STEPPING_TYPE_CEREAL_C__IPROBEDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/get=stepping+type=span/s::IprobeDuct.hpp b/include/uit/ducts/proc/impl/outlet/get=stepping+type=span/s::IprobeDuct.hpp index be3a329ddc..ec721e248b 100644 --- a/include/uit/ducts/proc/impl/outlet/get=stepping+type=span/s::IprobeDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/get=stepping+type=span/s::IprobeDuct.hpp @@ -12,8 +12,8 @@ #include #include "../../../../../../../third-party/cereal/include/cereal/archives/binary.hpp" -#include "../../../../../../uit_emp/base/always_assert.hpp" +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/initialization/Uninitialized.hpp" #include "../../../../../../uitsl/meta/s::static_test.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" @@ -25,8 +25,6 @@ #include "../../backend/RuntimeSizeBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace s { @@ -131,7 +129,7 @@ class IprobeDuct { } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "Put called on IprobeDuct"); + uitsl_always_assert(false, "Put called on IprobeDuct"); __builtin_unreachable(); } @@ -140,7 +138,7 @@ class IprobeDuct { * */ [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on IprobeDuct"); + uitsl_always_assert(false, "Flush called on IprobeDuct"); __builtin_unreachable(); } @@ -190,6 +188,4 @@ class IprobeDuct { } // namespace s } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_GET_STEPPING_TYPE_SPAN_S__IPROBEDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/get=stepping+type=trivial/t::RingIrecvDuct.hpp b/include/uit/ducts/proc/impl/outlet/get=stepping+type=trivial/t::RingIrecvDuct.hpp index bc6aceaf99..11d88015e9 100644 --- a/include/uit/ducts/proc/impl/outlet/get=stepping+type=trivial/t::RingIrecvDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/get=stepping+type=trivial/t::RingIrecvDuct.hpp @@ -10,8 +10,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/datastructs/RingBuffer.hpp" #include "../../../../../../uitsl/datastructs/SiftingArray.hpp" #include "../../../../../../uitsl/debug/err_audit.hpp" @@ -23,8 +22,6 @@ #include "../../backend/MockBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { namespace t { @@ -157,7 +154,7 @@ class RingIrecvDuct { } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "TryPut called on RingIrecvDuct"); + uitsl_always_assert(false, "TryPut called on RingIrecvDuct"); __builtin_unreachable(); } @@ -166,7 +163,7 @@ class RingIrecvDuct { * */ [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on RingIrecvDuct"); + uitsl_always_assert(false, "Flush called on RingIrecvDuct"); __builtin_unreachable(); } @@ -230,6 +227,4 @@ class RingIrecvDuct { } // namespace t } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_GET_STEPPING_TYPE_TRIVIAL_T__RINGIRECVDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/templated/AccumulatingPooledOutletDuct.hpp b/include/uit/ducts/proc/impl/outlet/templated/AccumulatingPooledOutletDuct.hpp index 4b30f167f3..2783bca268 100644 --- a/include/uit/ducts/proc/impl/outlet/templated/AccumulatingPooledOutletDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/templated/AccumulatingPooledOutletDuct.hpp @@ -10,8 +10,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../uitsl/utility/print_utils.hpp" @@ -19,8 +18,6 @@ #include "../../backend/AccumulatingPooledBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { /** @@ -63,12 +60,12 @@ class AccumulatingPooledOutletDuct { { back_end->RegisterOutletSlot(address); } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "TryPut called on AccumulatingPooledOutletDuct"); + uitsl_always_assert(false, "TryPut called on AccumulatingPooledOutletDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on AccumulatingPooledOutletDuct"); + uitsl_always_assert(false, "Flush called on AccumulatingPooledOutletDuct"); __builtin_unreachable(); } @@ -122,6 +119,4 @@ class AccumulatingPooledOutletDuct { } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_TEMPLATED_ACCUMULATINGPOOLEDOUTLETDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/templated/AggregatedOutletDuct.hpp b/include/uit/ducts/proc/impl/outlet/templated/AggregatedOutletDuct.hpp index 78be3ea79b..9dfa0d98e4 100644 --- a/include/uit/ducts/proc/impl/outlet/templated/AggregatedOutletDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/templated/AggregatedOutletDuct.hpp @@ -10,8 +10,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../uitsl/utility/print_utils.hpp" @@ -19,8 +18,6 @@ #include "../../backend/AggregatedBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { /** @@ -61,12 +58,12 @@ class AggregatedOutletDuct { { back_end->RegisterOutletSlot(address); } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "TryPut called on AggregatedOutletDuct"); + uitsl_always_assert(false, "TryPut called on AggregatedOutletDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on AggregatedOutletDuct"); + uitsl_always_assert(false, "Flush called on AggregatedOutletDuct"); __builtin_unreachable(); } @@ -122,6 +119,4 @@ class AggregatedOutletDuct { } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_TEMPLATED_AGGREGATEDOUTLETDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/templated/BufferedOutletDuct.hpp b/include/uit/ducts/proc/impl/outlet/templated/BufferedOutletDuct.hpp index a1abdb0318..3ea3a49510 100644 --- a/include/uit/ducts/proc/impl/outlet/templated/BufferedOutletDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/templated/BufferedOutletDuct.hpp @@ -9,8 +9,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../uitsl/nonce/ScopeGuard.hpp" #include "../../../../../../uitsl/utility/print_utils.hpp" @@ -19,8 +18,6 @@ #include "../../../impl/inlet/templated/impl/BufferSpec.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { /** @@ -100,12 +97,12 @@ class BufferedOutletDuct { { ; } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "TryPut called on BufferedOutletDuct"); + uitsl_always_assert(false, "TryPut called on BufferedOutletDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on BufferedOutletDuct"); + uitsl_always_assert(false, "Flush called on BufferedOutletDuct"); __builtin_unreachable(); } @@ -152,6 +149,4 @@ class BufferedOutletDuct { } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_TEMPLATED_BUFFEREDOUTLETDUCT_HPP_INCLUDE diff --git a/include/uit/ducts/proc/impl/outlet/templated/PooledOutletDuct.hpp b/include/uit/ducts/proc/impl/outlet/templated/PooledOutletDuct.hpp index 59058cc8e2..ff34019997 100644 --- a/include/uit/ducts/proc/impl/outlet/templated/PooledOutletDuct.hpp +++ b/include/uit/ducts/proc/impl/outlet/templated/PooledOutletDuct.hpp @@ -11,8 +11,7 @@ #include -#include "../../../../../../uit_emp/base/always_assert.hpp" - +#include "../../../../../../uitsl/debug/uitsl_always_assert.hpp" #include "../../../../../../uitsl/mpi/mpi_init_utils.hpp" #include "../../../../../../uitsl/utility/print_utils.hpp" @@ -20,8 +19,6 @@ #include "../../backend/PooledBackEnd.hpp" -#include "../../../../../../uit_emp/vendorization/push_assert_macros.hh" - namespace uit { /** @@ -64,12 +61,12 @@ class PooledOutletDuct { { back_end->RegisterOutletSlot(address); } [[noreturn]] bool TryPut(const T&) const { - emp_always_assert(false, "TryPut called on PooledOutletDuct"); + uitsl_always_assert(false, "TryPut called on PooledOutletDuct"); __builtin_unreachable(); } [[noreturn]] bool TryFlush() const { - emp_always_assert(false, "Flush called on PooledOutletDuct"); + uitsl_always_assert(false, "Flush called on PooledOutletDuct"); __builtin_unreachable(); } @@ -123,6 +120,4 @@ class PooledOutletDuct { } // namespace uit -#include "../../../../../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UIT_DUCTS_PROC_IMPL_OUTLET_TEMPLATED_POOLEDOUTLETDUCT_HPP_INCLUDE diff --git a/include/uit/spouts/Inlet.hpp b/include/uit/spouts/Inlet.hpp index f8799bc6d4..8d6da6b21d 100644 --- a/include/uit/spouts/Inlet.hpp +++ b/include/uit/spouts/Inlet.hpp @@ -3,6 +3,7 @@ #define UIT_SPOUTS_INLET_HPP_INCLUDE #include +#include #include #include #include @@ -209,7 +210,7 @@ class Inlet { * @return TODO. */ size_t GetNumTryPutsThatSucceeded() const { - emp_assert( attempted_try_put_count >= dropped_put_count ); + assert( attempted_try_put_count >= dropped_put_count ); return attempted_try_put_count - dropped_put_count; } @@ -228,7 +229,7 @@ class Inlet { * @return TODO. */ size_t GetNumBlockingPutsThatSucceededImmediately() const { - emp_assert( blocking_put_count >= puts_that_blocked_count ); + assert( blocking_put_count >= puts_that_blocked_count ); return blocking_put_count - puts_that_blocked_count; } diff --git a/include/uit/spouts/Outlet.hpp b/include/uit/spouts/Outlet.hpp index 433bd57708..f0895fbebc 100644 --- a/include/uit/spouts/Outlet.hpp +++ b/include/uit/spouts/Outlet.hpp @@ -2,6 +2,7 @@ #ifndef UIT_SPOUTS_OUTLET_HPP_INCLUDE #define UIT_SPOUTS_OUTLET_HPP_INCLUDE +#include #include #include #include @@ -260,7 +261,7 @@ class Outlet { * @return TODO. */ size_t GetNumReadsThatWereStale() const { - emp_assert( read_count >= fresh_read_count ); + assert( read_count >= fresh_read_count ); return read_count - fresh_read_count; } @@ -314,7 +315,7 @@ class Outlet { * @return TODO. */ size_t GetNumRevisionsFromBlockingPulls() const { - emp_assert(revision_count >= GetNumRevisionsFromTryPulls()); + assert(revision_count >= GetNumRevisionsFromTryPulls()); return revision_count - GetNumRevisionsFromTryPulls(); } @@ -342,7 +343,7 @@ class Outlet { * @return TODO. */ size_t GetNumBlockingPullsThatWereLadenImmediately() const { - emp_assert( GetNumBlockingPulls() >= GetNumBlockingPullsThatBlocked() ); + assert( GetNumBlockingPulls() >= GetNumBlockingPullsThatBlocked() ); return GetNumBlockingPulls() - GetNumBlockingPullsThatBlocked(); } @@ -382,7 +383,7 @@ class Outlet { * @return TODO. */ size_t GetNumTryPullsThatWereUnladen() const { - emp_assert(nonblocking_pull_attempt_count >= laden_nonblocking_pull_count); + assert(nonblocking_pull_attempt_count >= laden_nonblocking_pull_count); return nonblocking_pull_attempt_count - laden_nonblocking_pull_count; } @@ -392,7 +393,7 @@ class Outlet { * @return TODO. */ double GetFractionTryPullsThatWereLaden() const { - emp_assert(GetNumTryPullsThatWereLaden() >= GetNumTryPullsAttempted()); + assert(GetNumTryPullsThatWereLaden() >= GetNumTryPullsAttempted()); return ( GetNumTryPullsThatWereLaden() / static_cast( GetNumTryPullsAttempted() ) @@ -414,7 +415,7 @@ class Outlet { * @return TODO. */ double GetFractionBlockingPullsThatBlocked() const { - emp_assert( + assert( GetNumBlockingPullsThatBlocked() >= GetNumBlockingPulls() ); @@ -439,7 +440,7 @@ class Outlet { * @return TODO. */ double GetFractionPullsThatWereLadenImmediately() const { - emp_assert(GetNumPullsThatWereLadenImmediately() >= GetNumPullsAttempted()); + assert(GetNumPullsThatWereLadenImmediately() >= GetNumPullsAttempted()); return ( GetNumPullsThatWereLadenImmediately() / static_cast( GetNumPullsAttempted() ) @@ -452,7 +453,7 @@ class Outlet { * @return TODO. */ double GetFractionPullsThatWereLadenEventually() const { - emp_assert(GetNumPullsThatWereLadenEventually() >= GetNumPullsAttempted()); + assert(GetNumPullsThatWereLadenEventually() >= GetNumPullsAttempted()); return ( GetNumPullsThatWereLadenEventually() / static_cast( GetNumPullsAttempted() ) diff --git a/include/uit_emp/_codegen/make_pop_macros.py b/include/uit_emp/_codegen/make_pop_macros.py index a8a46d264f..2553ade044 100755 --- a/include/uit_emp/_codegen/make_pop_macros.py +++ b/include/uit_emp/_codegen/make_pop_macros.py @@ -5,7 +5,6 @@ from pylib import iter_macros content = "#ifdef UIT_VENDORIZE_EMP\n" -content_assert = "#ifdef UIT_VENDORIZE_EMP\n" for macro in iter_macros(): new_content = textwrap.dedent(f"""\ @@ -34,8 +33,6 @@ #endif // #ifdef {macro} """) content += new_content - if "assert" in macro: - content_assert += new_content content += "\n" content += "#endif // #ifdef UIT_VENDORIZE_EMP" @@ -43,10 +40,3 @@ with open(f"vendorization/pop_macros.hh", "w") as f: f.write(content) - -content_assert += "\n" -content_assert += "#endif // #ifdef UIT_VENDORIZE_EMP" -content_assert += "\n" - -with open(f"vendorization/pop_assert_macros.hh", "w") as f: - f.write(content_assert) diff --git a/include/uit_emp/_codegen/make_push_macros.py b/include/uit_emp/_codegen/make_push_macros.py index 5d63c49f69..e63456b579 100755 --- a/include/uit_emp/_codegen/make_push_macros.py +++ b/include/uit_emp/_codegen/make_push_macros.py @@ -5,7 +5,6 @@ from pylib import iter_macros content = "\n#ifdef UIT_VENDORIZE_EMP" -content_assert = "\n#ifdef UIT_VENDORIZE_EMP" for macro in iter_macros(): new_content = textwrap.dedent(f"""\ @@ -49,19 +48,9 @@ """) content += new_content - if 'assert' in macro: - content_assert += new_content - content += "\n" content += "#endif // #ifdef UIT_VENDORIZE_EMP" content += "\n" with open(f"vendorization/push_macros.hh", "w") as f: f.write(content) - -content_assert += "\n" -content_assert += "#endif // #ifdef UIT_VENDORIZE_EMP" -content_assert += "\n" - -with open(f"vendorization/push_assert_macros.hh", "w") as f: - f.write(content_assert) diff --git a/include/uit_emp/vendorization/pop_assert_macros.hh b/include/uit_emp/vendorization/pop_assert_macros.hh deleted file mode 100644 index 9d25026fed..0000000000 --- a/include/uit_emp/vendorization/pop_assert_macros.hh +++ /dev/null @@ -1,123 +0,0 @@ -#ifdef UIT_VENDORIZE_EMP - -#ifdef emp_always_assert_impl - - #ifndef UIT_INTERNAL_HAS_emp_always_assert_impl - #define UIT_INTERNAL_HAS_emp_always_assert_impl - - #ifdef UIT_EXTERNAL_1ST_emp_always_assert_impl - #pragma pop_macro("emp_always_assert_impl") - #endif - - #ifndef UIT_EXTERNAL_HAS_emp_always_assert_impl - #ifndef UIT_INTERNAL_1ST_emp_always_assert_impl - #define UIT_INTERNAL_1ST_emp_always_assert_impl - #endif - #endif - - #endif // #ifndef UIT_INTERNAL_HAS_emp_always_assert_impl - - #ifndef UIT_EXTERNAL_HAS_emp_always_assert_impl - #pragma push_macro("emp_always_assert_impl") - #undef emp_always_assert_impl - #endif - -#endif // #ifdef emp_always_assert_impl - -#ifdef emp_assert - - #ifndef UIT_INTERNAL_HAS_emp_assert - #define UIT_INTERNAL_HAS_emp_assert - - #ifdef UIT_EXTERNAL_1ST_emp_assert - #pragma pop_macro("emp_assert") - #endif - - #ifndef UIT_EXTERNAL_HAS_emp_assert - #ifndef UIT_INTERNAL_1ST_emp_assert - #define UIT_INTERNAL_1ST_emp_assert - #endif - #endif - - #endif // #ifndef UIT_INTERNAL_HAS_emp_assert - - #ifndef UIT_EXTERNAL_HAS_emp_assert - #pragma push_macro("emp_assert") - #undef emp_assert - #endif - -#endif // #ifdef emp_assert - -#ifdef emp_always_assert_msvc_impl - - #ifndef UIT_INTERNAL_HAS_emp_always_assert_msvc_impl - #define UIT_INTERNAL_HAS_emp_always_assert_msvc_impl - - #ifdef UIT_EXTERNAL_1ST_emp_always_assert_msvc_impl - #pragma pop_macro("emp_always_assert_msvc_impl") - #endif - - #ifndef UIT_EXTERNAL_HAS_emp_always_assert_msvc_impl - #ifndef UIT_INTERNAL_1ST_emp_always_assert_msvc_impl - #define UIT_INTERNAL_1ST_emp_always_assert_msvc_impl - #endif - #endif - - #endif // #ifndef UIT_INTERNAL_HAS_emp_always_assert_msvc_impl - - #ifndef UIT_EXTERNAL_HAS_emp_always_assert_msvc_impl - #pragma push_macro("emp_always_assert_msvc_impl") - #undef emp_always_assert_msvc_impl - #endif - -#endif // #ifdef emp_always_assert_msvc_impl - -#ifdef emp_assert_TO_PAIR - - #ifndef UIT_INTERNAL_HAS_emp_assert_TO_PAIR - #define UIT_INTERNAL_HAS_emp_assert_TO_PAIR - - #ifdef UIT_EXTERNAL_1ST_emp_assert_TO_PAIR - #pragma pop_macro("emp_assert_TO_PAIR") - #endif - - #ifndef UIT_EXTERNAL_HAS_emp_assert_TO_PAIR - #ifndef UIT_INTERNAL_1ST_emp_assert_TO_PAIR - #define UIT_INTERNAL_1ST_emp_assert_TO_PAIR - #endif - #endif - - #endif // #ifndef UIT_INTERNAL_HAS_emp_assert_TO_PAIR - - #ifndef UIT_EXTERNAL_HAS_emp_assert_TO_PAIR - #pragma push_macro("emp_assert_TO_PAIR") - #undef emp_assert_TO_PAIR - #endif - -#endif // #ifdef emp_assert_TO_PAIR - -#ifdef emp_always_assert - - #ifndef UIT_INTERNAL_HAS_emp_always_assert - #define UIT_INTERNAL_HAS_emp_always_assert - - #ifdef UIT_EXTERNAL_1ST_emp_always_assert - #pragma pop_macro("emp_always_assert") - #endif - - #ifndef UIT_EXTERNAL_HAS_emp_always_assert - #ifndef UIT_INTERNAL_1ST_emp_always_assert - #define UIT_INTERNAL_1ST_emp_always_assert - #endif - #endif - - #endif // #ifndef UIT_INTERNAL_HAS_emp_always_assert - - #ifndef UIT_EXTERNAL_HAS_emp_always_assert - #pragma push_macro("emp_always_assert") - #undef emp_always_assert - #endif - -#endif // #ifdef emp_always_assert - -#endif // #ifdef UIT_VENDORIZE_EMP diff --git a/include/uit_emp/vendorization/push_assert_macros.hh b/include/uit_emp/vendorization/push_assert_macros.hh deleted file mode 100644 index e66097eb5e..0000000000 --- a/include/uit_emp/vendorization/push_assert_macros.hh +++ /dev/null @@ -1,193 +0,0 @@ - -#ifdef UIT_VENDORIZE_EMP -#ifdef emp_assert - - #ifndef UIT_EXTERNAL_HAS_emp_assert - #define UIT_EXTERNAL_HAS_emp_assert - #ifndef UIT_INTERNAL_HAS_emp_assert - #define UIT_EXTERNAL_1ST_emp_assert - #endif - #endif - - #ifndef UIT_INTERNAL_HAS_emp_assert - #pragma push_macro("emp_assert") - #undef emp_assert - #endif - - #if defined(\ - UIT_INTERNAL_HAS_emp_assert) && defined(UIT_EXTERNAL_1ST_emp_assert\ - ) - #ifndef UIT_SUPPRESS_MACRO_INSEEP_WARNINGS - #ifndef UIT_emp_assert_INSEEP_WARNING - #define UIT_emp_assert_INSEEP_WARNING - #pragma message(\ - "emp_assert defined first outside vendorized header,"\ - " so outside definition will be used inside vendorized header"\ - " on subsequent includes of the vendorized header"\ - " --- if causes problems, try changing header include order"\ - ) - #endif - #endif - #endif - -#else // #ifdef emp_assert - - #ifdef UIT_INTERNAL_HAS_emp_assert - #pragma pop_macro("emp_assert") - #endif // #ifdef UIT_INTERNAL_HAS_emp_assert - -#endif // #ifdef emp_assert - -#ifdef emp_always_assert_impl - - #ifndef UIT_EXTERNAL_HAS_emp_always_assert_impl - #define UIT_EXTERNAL_HAS_emp_always_assert_impl - #ifndef UIT_INTERNAL_HAS_emp_always_assert_impl - #define UIT_EXTERNAL_1ST_emp_always_assert_impl - #endif - #endif - - #ifndef UIT_INTERNAL_HAS_emp_always_assert_impl - #pragma push_macro("emp_always_assert_impl") - #undef emp_always_assert_impl - #endif - - #if defined(\ - UIT_INTERNAL_HAS_emp_always_assert_impl) && defined(UIT_EXTERNAL_1ST_emp_always_assert_impl\ - ) - #ifndef UIT_SUPPRESS_MACRO_INSEEP_WARNINGS - #ifndef UIT_emp_always_assert_impl_INSEEP_WARNING - #define UIT_emp_always_assert_impl_INSEEP_WARNING - #pragma message(\ - "emp_always_assert_impl defined first outside vendorized header,"\ - " so outside definition will be used inside vendorized header"\ - " on subsequent includes of the vendorized header"\ - " --- if causes problems, try changing header include order"\ - ) - #endif - #endif - #endif - -#else // #ifdef emp_always_assert_impl - - #ifdef UIT_INTERNAL_HAS_emp_always_assert_impl - #pragma pop_macro("emp_always_assert_impl") - #endif // #ifdef UIT_INTERNAL_HAS_emp_always_assert_impl - -#endif // #ifdef emp_always_assert_impl - -#ifdef emp_always_assert - - #ifndef UIT_EXTERNAL_HAS_emp_always_assert - #define UIT_EXTERNAL_HAS_emp_always_assert - #ifndef UIT_INTERNAL_HAS_emp_always_assert - #define UIT_EXTERNAL_1ST_emp_always_assert - #endif - #endif - - #ifndef UIT_INTERNAL_HAS_emp_always_assert - #pragma push_macro("emp_always_assert") - #undef emp_always_assert - #endif - - #if defined(\ - UIT_INTERNAL_HAS_emp_always_assert) && defined(UIT_EXTERNAL_1ST_emp_always_assert\ - ) - #ifndef UIT_SUPPRESS_MACRO_INSEEP_WARNINGS - #ifndef UIT_emp_always_assert_INSEEP_WARNING - #define UIT_emp_always_assert_INSEEP_WARNING - #pragma message(\ - "emp_always_assert defined first outside vendorized header,"\ - " so outside definition will be used inside vendorized header"\ - " on subsequent includes of the vendorized header"\ - " --- if causes problems, try changing header include order"\ - ) - #endif - #endif - #endif - -#else // #ifdef emp_always_assert - - #ifdef UIT_INTERNAL_HAS_emp_always_assert - #pragma pop_macro("emp_always_assert") - #endif // #ifdef UIT_INTERNAL_HAS_emp_always_assert - -#endif // #ifdef emp_always_assert - -#ifdef emp_assert_TO_PAIR - - #ifndef UIT_EXTERNAL_HAS_emp_assert_TO_PAIR - #define UIT_EXTERNAL_HAS_emp_assert_TO_PAIR - #ifndef UIT_INTERNAL_HAS_emp_assert_TO_PAIR - #define UIT_EXTERNAL_1ST_emp_assert_TO_PAIR - #endif - #endif - - #ifndef UIT_INTERNAL_HAS_emp_assert_TO_PAIR - #pragma push_macro("emp_assert_TO_PAIR") - #undef emp_assert_TO_PAIR - #endif - - #if defined(\ - UIT_INTERNAL_HAS_emp_assert_TO_PAIR) && defined(UIT_EXTERNAL_1ST_emp_assert_TO_PAIR\ - ) - #ifndef UIT_SUPPRESS_MACRO_INSEEP_WARNINGS - #ifndef UIT_emp_assert_TO_PAIR_INSEEP_WARNING - #define UIT_emp_assert_TO_PAIR_INSEEP_WARNING - #pragma message(\ - "emp_assert_TO_PAIR defined first outside vendorized header,"\ - " so outside definition will be used inside vendorized header"\ - " on subsequent includes of the vendorized header"\ - " --- if causes problems, try changing header include order"\ - ) - #endif - #endif - #endif - -#else // #ifdef emp_assert_TO_PAIR - - #ifdef UIT_INTERNAL_HAS_emp_assert_TO_PAIR - #pragma pop_macro("emp_assert_TO_PAIR") - #endif // #ifdef UIT_INTERNAL_HAS_emp_assert_TO_PAIR - -#endif // #ifdef emp_assert_TO_PAIR - -#ifdef emp_always_assert_msvc_impl - - #ifndef UIT_EXTERNAL_HAS_emp_always_assert_msvc_impl - #define UIT_EXTERNAL_HAS_emp_always_assert_msvc_impl - #ifndef UIT_INTERNAL_HAS_emp_always_assert_msvc_impl - #define UIT_EXTERNAL_1ST_emp_always_assert_msvc_impl - #endif - #endif - - #ifndef UIT_INTERNAL_HAS_emp_always_assert_msvc_impl - #pragma push_macro("emp_always_assert_msvc_impl") - #undef emp_always_assert_msvc_impl - #endif - - #if defined(\ - UIT_INTERNAL_HAS_emp_always_assert_msvc_impl) && defined(UIT_EXTERNAL_1ST_emp_always_assert_msvc_impl\ - ) - #ifndef UIT_SUPPRESS_MACRO_INSEEP_WARNINGS - #ifndef UIT_emp_always_assert_msvc_impl_INSEEP_WARNING - #define UIT_emp_always_assert_msvc_impl_INSEEP_WARNING - #pragma message(\ - "emp_always_assert_msvc_impl defined first outside vendorized header,"\ - " so outside definition will be used inside vendorized header"\ - " on subsequent includes of the vendorized header"\ - " --- if causes problems, try changing header include order"\ - ) - #endif - #endif - #endif - -#else // #ifdef emp_always_assert_msvc_impl - - #ifdef UIT_INTERNAL_HAS_emp_always_assert_msvc_impl - #pragma pop_macro("emp_always_assert_msvc_impl") - #endif // #ifdef UIT_INTERNAL_HAS_emp_always_assert_msvc_impl - -#endif // #ifdef emp_always_assert_msvc_impl - -#endif // #ifdef UIT_VENDORIZE_EMP diff --git a/include/uitsl/algorithm/clamp_cast.hpp b/include/uitsl/algorithm/clamp_cast.hpp index 76eb3fa71f..c9a560a82f 100644 --- a/include/uitsl/algorithm/clamp_cast.hpp +++ b/include/uitsl/algorithm/clamp_cast.hpp @@ -6,7 +6,7 @@ #include #include -#include "../../uit_emp/base/always_assert.hpp" +#include "../../uitsl/debug/uitsl_always_assert.hpp" #include "nan_to_zero.hpp" @@ -35,9 +35,7 @@ To clamp_cast( const From from ) { #ifdef __EMSCRIPTEN__ // necessary to keep nan sanitization from getting optimized away // and (I assume?) implicitly taken care of via the static_cast - #include "../../uit_emp/vendorization/push_assert_macros.hh" - emp_always_assert( !std::isnan( clamped ) ); - #include "../../uit_emp/vendorization/pop_assert_macros.hh" + uitsl_always_assert( !std::isnan( clamped ) ); #endif return static_cast( clamped ); diff --git a/include/uitsl/datastructs/MirroredRingBuffer.hpp b/include/uitsl/datastructs/MirroredRingBuffer.hpp index 8bb093486b..74ad14f9d9 100644 --- a/include/uitsl/datastructs/MirroredRingBuffer.hpp +++ b/include/uitsl/datastructs/MirroredRingBuffer.hpp @@ -2,6 +2,7 @@ #ifndef UITSL_DATASTRUCTS_MIRROREDRINGBUFFER_HPP_INCLUDE #define UITSL_DATASTRUCTS_MIRROREDRINGBUFFER_HPP_INCLUDE +#include #include #include @@ -35,7 +36,7 @@ class MirroredRingBuffer { MirroredRingBuffer() { - emp_assert( byte_size % getpagesize() == 0 ); + assert( byte_size % getpagesize() == 0 ); uitsl_err_audit(ftruncate( file_descriptor, // int fd @@ -52,7 +53,7 @@ class MirroredRingBuffer { 0 // off_t offset ) ); - emp_assert( buffer != MAP_FAILED ); emp_assert( buffer != nullptr ); + assert( buffer != MAP_FAILED ); assert( buffer != nullptr ); // map front half of our buffer to underlying buffer { const auto res = mmap( @@ -62,7 +63,7 @@ class MirroredRingBuffer { MAP_SHARED | MAP_FIXED, // int flags file_descriptor, // int fd 0 // off_t offset - ); emp_assert( res != MAP_FAILED ); } + ); assert( res != MAP_FAILED ); } // map back half of our buffer to underlying buffer { const auto res = mmap( @@ -72,7 +73,7 @@ class MirroredRingBuffer { MAP_SHARED | MAP_FIXED, // int flags file_descriptor, // int fd 0 // off_t offset - ); emp_assert( res != MAP_FAILED ); } + ); assert( res != MAP_FAILED ); } // point tail beginning of buffer tail = buffer; @@ -87,12 +88,12 @@ class MirroredRingBuffer { } std::byte* step_pointer(std::byte* curr, size_t num_steps=1) const { - emp_assert( num_steps <= N ); + assert( num_steps <= N ); curr += num_steps * sizeof(T); // wraparound if off the end curr -= (std::distance(buffer, curr) / byte_size) * byte_size; - emp_assert( std::distance(buffer, curr) >= 0 ); - emp_assert( static_cast(std::distance(buffer, curr)) < byte_size ); + assert( std::distance(buffer, curr) >= 0 ); + assert( static_cast(std::distance(buffer, curr)) < byte_size ); return curr; } @@ -121,12 +122,12 @@ class MirroredRingBuffer { const T* GetPastHeadPtr() const { return GetTailPtr() + GetSize(); } T* GetHeadPtr() { - emp_assert( GetSize() ); + assert( GetSize() ); return GetPastHeadPtr() - 1; } const T* GetHeadPtr() const { - emp_assert( GetSize() ); + assert( GetSize() ); return GetPastHeadPtr() - 1; } @@ -135,19 +136,19 @@ class MirroredRingBuffer { const T* GetTailPtr() const { return reinterpret_cast(tail); } T Get(const size_t i) const { - emp_assert( i < GetSize() ); + assert( i < GetSize() ); T res; std::memcpy( &res, GetTailPtr() + i, sizeof(T) ); return res; } T GetHead() const { - emp_assert( GetSize() ); + assert( GetSize() ); return Get( GetSize() - 1 ); } T GetTail() const { - emp_assert( GetSize() ); + assert( GetSize() ); return Get(0); } diff --git a/include/uitsl/datastructs/RingBuffer.hpp b/include/uitsl/datastructs/RingBuffer.hpp index 86a8c8266c..d6b089e655 100644 --- a/include/uitsl/datastructs/RingBuffer.hpp +++ b/include/uitsl/datastructs/RingBuffer.hpp @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -30,7 +31,7 @@ class RingBuffer { bool IsFull() const { return GetSize() == N; } - void DoPushHead() { emp_assert( !IsFull() ); ++num_items; } + void DoPushHead() { assert( !IsFull() ); ++num_items; } bool PushHead() { if ( IsFull() ) return false; @@ -60,7 +61,7 @@ class RingBuffer { } void DoPopHead(const size_t num_requested=1) { - emp_assert( num_requested <= GetSize() ); + assert( num_requested <= GetSize() ); num_items -= num_requested; } @@ -71,7 +72,7 @@ class RingBuffer { } void DoPopTail(const size_t num_requested=1) { - emp_assert( num_requested <= GetSize() ); + assert( num_requested <= GetSize() ); tail += num_requested; num_items -= num_requested; } diff --git a/include/uitsl/debug/OccupancyCap.hpp b/include/uitsl/debug/OccupancyCap.hpp index 069d20f701..183f1a3f52 100644 --- a/include/uitsl/debug/OccupancyCap.hpp +++ b/include/uitsl/debug/OccupancyCap.hpp @@ -7,6 +7,8 @@ #include #include +#include "../../uitsl/debug/uitsl_assert.hpp" + #include "../parallel/thread_utils.hpp" #include "../utility/print_utils.hpp" @@ -33,20 +35,20 @@ class OccupancyCap { const thread_id_t id = get_thread_id(); - emp_assert( + uitsl_assert( occupants.count(id) == 0, - [](){ error_message_mutex.lock(); return "locked"; }(), - occupants.count(id) + [](){ error_message_mutex.lock(); return "locked"; }() + << occupants.count(id) ); occupants.insert(id); - emp_assert( + uitsl_assert( occupants.size() <= maximum_occupancy, - [](){ error_message_mutex.lock(); return "locked"; }(), - occupants.size(), - maximum_occupancy, - to_string(occupants) + [](){ error_message_mutex.lock(); return "locked"; }() + << occupants.size() + << maximum_occupancy + << uitsl::to_string(occupants) ); } @@ -60,7 +62,7 @@ class OccupancyCap { const thread_id_t id = get_thread_id(); - emp_assert( + uitsl_assert( occupants.count(id), [](){ error_message_mutex.lock(); return "locked"; }() ); diff --git a/include/uitsl/debug/OccupancyCaps.hpp b/include/uitsl/debug/OccupancyCaps.hpp index 0278d78ce3..15faf47df3 100644 --- a/include/uitsl/debug/OccupancyCaps.hpp +++ b/include/uitsl/debug/OccupancyCaps.hpp @@ -8,6 +8,8 @@ #include #include +#include "../../uitsl/debug/uitsl_assert.hpp" + #include "OccupancyCap.hpp" namespace uitsl { @@ -41,11 +43,11 @@ class OccupancyCaps { return res.first->second; } else { auto & res = lookup.at(line); - emp_assert( + uitsl_assert( res.GetMaximumOccupancy() == maximum_occupancy, - [](){ error_message_mutex.lock(); return "locked"; }(), - maximum_occupancy, - res.GetMaximumOccupancy() + [](){ error_message_mutex.lock(); return "locked"; }() + << maximum_occupancy + << res.GetMaximumOccupancy() ); return res; } diff --git a/include/uitsl/debug/err_audit.hpp b/include/uitsl/debug/err_audit.hpp index 23c1d61dd1..3e902db5a0 100644 --- a/include/uitsl/debug/err_audit.hpp +++ b/include/uitsl/debug/err_audit.hpp @@ -2,22 +2,20 @@ #ifndef UITSL_DEBUG_ERR_AUDIT_HPP_INCLUDE #define UITSL_DEBUG_ERR_AUDIT_HPP_INCLUDE -#include "../../uit_emp/base/assert.hpp" -#include "../../uit_emp/vendorization/push_assert_macros.hh" +#include "../../uitsl/debug/uitsl_assert.hpp" namespace uitsl { inline void err_audit(const int err) { - emp_assert(err == 0, err); + uitsl_assert(err == 0, err); } inline void err_audit( const int err, const int line, const std::string& file -) { emp_assert(err == 0, err, line, file); } +) { uitsl_assert(err == 0, err << line << file); } } // namespace uitsl #define uitsl_err_audit(err) uitsl::err_audit(err, __LINE__, __FILE__) -#include "../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UITSL_DEBUG_ERR_AUDIT_HPP_INCLUDE diff --git a/include/uitsl/debug/err_verify.hpp b/include/uitsl/debug/err_verify.hpp index ea3095e4bc..002ec95c82 100644 --- a/include/uitsl/debug/err_verify.hpp +++ b/include/uitsl/debug/err_verify.hpp @@ -2,14 +2,12 @@ #ifndef UITSL_DEBUG_ERR_VERIFY_HPP_INCLUDE #define UITSL_DEBUG_ERR_VERIFY_HPP_INCLUDE -#include "../../uit_emp/base/always_assert.hpp" +#include "../../uitsl/debug/uitsl_always_assert.hpp" namespace uitsl { inline void err_verify(const int err) { - #include "../../uit_emp/vendorization/push_assert_macros.hh" - emp_always_assert(err == 0, err); - #include "../../uit_emp/vendorization/pop_assert_macros.hh" + uitsl_always_assert(err == 0, err); } } // namespace uitsl diff --git a/include/uitsl/debug/metis_utils.hpp b/include/uitsl/debug/metis_utils.hpp index 081cb8f292..eb8cc8ee98 100644 --- a/include/uitsl/debug/metis_utils.hpp +++ b/include/uitsl/debug/metis_utils.hpp @@ -8,9 +8,7 @@ #include #endif -#include "../../uit_emp/base/assert.hpp" - -#include "../../uit_emp/vendorization/push_macros.hh" +#include "../../uitsl/debug/uitsl_assert.hpp" namespace uitsl::metis { inline void verify(const int status) { @@ -35,12 +33,10 @@ inline void verify(const int status) { name = "unknown"; break; } - emp_assert(status == METIS_OK, status, name); + uitsl_assert(status == METIS_OK, status << name); #endif } } // namespace uitsl::metis -#include "../../uit_emp/vendorization/pop_macros.hh" - #endif // #ifndef UITSL_DEBUG_METIS_UTILS_HPP_INCLUDE diff --git a/include/uitsl/debug/uitsl_always_assert.hpp b/include/uitsl/debug/uitsl_always_assert.hpp index aec63f30d6..e0725cee92 100644 --- a/include/uitsl/debug/uitsl_always_assert.hpp +++ b/include/uitsl/debug/uitsl_always_assert.hpp @@ -5,6 +5,8 @@ #include #include +#include "../meta/is_streamable.hpp" +#include "../meta/fwd_or_cast.hpp" #include "../utility/UITSL_STRINGIFY.hpp" #include "../utility/SetSeparator.hpp" @@ -17,7 +19,9 @@ do { \ std::cout << '\n'; \ std::cout << "ASSERTION FAILED: "; \ std::cout << '\n'; \ - std::cout << UITSL_STRINGIFY(expr) << " was " << (expr) << '\n'; \ + std::cout << UITSL_STRINGIFY(expr) << " was "; \ + std::cout << uitsl::fwd_or_cast(expr); \ + std::cout << '\n'; \ std::cout << '\n'; \ std::cout << "FILE: " << __FILE__ << '\n'; \ std::cout << "FUNCTION: " << __PRETTY_FUNCTION__ << '\n'; \ diff --git a/include/uitsl/fetch/fetch_native.hpp b/include/uitsl/fetch/fetch_native.hpp index 67a99e139e..eb9482cae2 100644 --- a/include/uitsl/fetch/fetch_native.hpp +++ b/include/uitsl/fetch/fetch_native.hpp @@ -11,17 +11,14 @@ #include -#include "../../uit_emp/base/always_assert.hpp" - #include "../debug/err_verify.hpp" +#include "../debug/uitsl_always_assert.hpp" #include "../nonce/ScopeGuard.hpp" #include "../polyfill/filesystem.hpp" #include "make_temp_filepath.hpp" #include "resolve_fetched_filename.hpp" -#include "../../uit_emp/vendorization/push_assert_macros.hh" - namespace uitsl { /* @@ -56,7 +53,7 @@ inline std::filesystem::path fetch_native( const std::string& url ) { [&curl_handle](){ curl_easy_cleanup( curl_handle ); } ); - emp_always_assert( curl_handle ); + uitsl_always_assert( curl_handle ); uitsl::err_verify( curl_easy_setopt( curl_handle, CURLOPT_URL, url.c_str()) @@ -84,7 +81,7 @@ inline std::filesystem::path fetch_native( const std::string& url ) { if ( http_code == 200 ) break; } - emp_always_assert( retry < 5, retry, err, http_code, url ); + uitsl_always_assert( retry < 5, retry << err << http_code << url ); using namespace std::chrono_literals; std::this_thread::sleep_for( 10s ); @@ -99,6 +96,4 @@ inline std::filesystem::path fetch_native( const std::string& url ) { } // namespace uitsl -#include "../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UITSL_FETCH_FETCH_NATIVE_HPP_INCLUDE diff --git a/include/uitsl/math/math_utils.hpp b/include/uitsl/math/math_utils.hpp index d58de455cd..5087f6b5a0 100644 --- a/include/uitsl/math/math_utils.hpp +++ b/include/uitsl/math/math_utils.hpp @@ -9,12 +9,11 @@ #include #include -#include "../../uit_emp/base/assert.hpp" #include "../../uit_emp/math/math.hpp" -#include "../debug/safe_cast.hpp" +#include "../../uitsl/debug/uitsl_assert.hpp" -#include "../../uit_emp/vendorization/push_assert_macros.hh" +#include "../debug/safe_cast.hpp" namespace uitsl { @@ -71,8 +70,8 @@ size_t sidebyside_hash(const size_t top, const size_t bottom) { [[maybe_unused]] constexpr size_t top_size = avail_size - bottom_size; // bounds checking - emp_assert(std::bitset(top).to_ullong() == top, top); - emp_assert(std::bitset(bottom).to_ullong() == bottom, bottom); + uitsl_assert(std::bitset(top).to_ullong() == top, top); + uitsl_assert(std::bitset(bottom).to_ullong() == bottom, bottom); const auto bottom_bits = std::bitset( bottom ); const auto top_bits = std::bitset( top ) << bottom_size; @@ -85,6 +84,4 @@ size_t sidebyside_hash(const size_t top, const size_t bottom) { } // namespace uitsl -#include "../../uit_emp/vendorization/pop_assert_macros.hh" - #endif // #ifndef UITSL_MATH_MATH_UTILS_HPP_INCLUDE diff --git a/include/uitsl/math/shift_mod.hpp b/include/uitsl/math/shift_mod.hpp index 130910711d..4a13342eae 100644 --- a/include/uitsl/math/shift_mod.hpp +++ b/include/uitsl/math/shift_mod.hpp @@ -2,6 +2,7 @@ #ifndef UITSL_MATH_SHIFT_MOD_HPP_INCLUDE #define UITSL_MATH_SHIFT_MOD_HPP_INCLUDE +#include #include #include "math_utils.hpp" @@ -10,7 +11,7 @@ namespace uitsl { /// Calculate n % d. size_t shift_mod(size_t n, size_t d) { - emp_assert( uitsl::is_power_of_two( d ) ); + assert( uitsl::is_power_of_two( d ) ); return ( n & (d - 1) ); } diff --git a/include/uitsl/meta/fwd_or_cast.hpp b/include/uitsl/meta/fwd_or_cast.hpp new file mode 100644 index 0000000000..a1e5527aca --- /dev/null +++ b/include/uitsl/meta/fwd_or_cast.hpp @@ -0,0 +1,17 @@ +#pragma once +#ifndef UITSL_META_FWD_OR_CAST_HPP_INCLUDE +#define UITSL_META_FWD_OR_CAST_HPP_INCLUDE + +#include + +namespace uitsl { + +template typename TEST, typename CAST_TO, typename ARG> +decltype(auto) fwd_or_cast(ARG&& arg) { + if constexpr (TEST::value) return std::forward(arg); + else return static_cast(arg); +} + +} // namespace uitsl + +#endif // #ifndef UITSL_META_FWD_OR_CAST_HPP_INCLUDE diff --git a/include/uitsl/meta/is_streamable.hpp b/include/uitsl/meta/is_streamable.hpp new file mode 100644 index 0000000000..e725a98b72 --- /dev/null +++ b/include/uitsl/meta/is_streamable.hpp @@ -0,0 +1,20 @@ +#pragma once +#ifndef UITSL_META_IS_STREAMABLE_HPP_INCLUDE +#define UITSL_META_IS_STREAMABLE_HPP_INCLUDE + +#include +#include + +namespace uitsl { + +// adapted from https://stackoverflow.com/a/22760197 +template +struct is_streamable : std::false_type { }; + +template +struct is_streamable> + : std::true_type { }; + +} // namespace uitsl + +#endif // #ifndef UITSL_META_IS_STREAMABLE_HPP_INCLUDE diff --git a/include/uitsl/mpi/group_utils.hpp b/include/uitsl/mpi/group_utils.hpp index fd3a8e8c90..a09c2667bf 100644 --- a/include/uitsl/mpi/group_utils.hpp +++ b/include/uitsl/mpi/group_utils.hpp @@ -2,6 +2,7 @@ #ifndef UITSL_MPI_GROUP_UTILS_HPP_INCLUDE #define UITSL_MPI_GROUP_UTILS_HPP_INCLUDE +#include #include #include #include @@ -9,17 +10,16 @@ #include -#include "../../uit_emp/base/assert.hpp" #include "../../uit_emp/math/math.hpp" #include "../debug/safe_compare.hpp" +#include "../debug/uitsl_assert.hpp" #include "../math/math_utils.hpp" #include "../utility/print_utils.hpp" #include "audited_routines.hpp" #include "proc_id_t.hpp" -#include "../../uit_emp/vendorization/push_assert_macros.hh" namespace uitsl { // predeclaration @@ -98,7 +98,7 @@ inline size_t group_size(const MPI_Group & group) { group, // MPI_Group group &res // int *size ); - emp_assert(res >= 0); + assert(res >= 0); return res; } @@ -125,11 +125,11 @@ inline MPI_Group make_group( const auto last{ std::unique(std::begin(ranks), std::end(ranks)) }; ranks.erase(last, std::end(ranks)); - emp_assert(std::set( + uitsl_assert(std::set( std::begin(ranks), std::end(ranks) ).size() == ranks.size(), uitsl::to_string(ranks)); - emp_assert(std::all_of( + uitsl_assert(std::all_of( std::begin(ranks), std::end(ranks), [&](const auto & rank){ @@ -197,6 +197,5 @@ inline std::string group_to_string(const MPI_Group& group) { } } // namespace uitsl -#include "../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UITSL_MPI_GROUP_UTILS_HPP_INCLUDE diff --git a/include/uitsl/mpi/mpi_audit.hpp b/include/uitsl/mpi/mpi_audit.hpp index 52724c1b10..c66a968e48 100644 --- a/include/uitsl/mpi/mpi_audit.hpp +++ b/include/uitsl/mpi/mpi_audit.hpp @@ -4,20 +4,18 @@ #include -#include "../../uit_emp/base/assert.hpp" +#include "../../uitsl/debug/uitsl_assert.hpp" #include "name_mpi_error.hpp" -#include "../../uit_emp/vendorization/push_assert_macros.hh" namespace uitsl { inline void mpi_audit(const int err) { - emp_assert(err == MPI_SUCCESS, err, uitsl::name_mpi_error(err)); + uitsl_assert(err == MPI_SUCCESS, err << uitsl::name_mpi_error(err)); } } // namespace uitsl -#include "../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UITSL_MPI_MPI_AUDIT_HPP_INCLUDE diff --git a/include/uitsl/nonce/spector.hpp b/include/uitsl/nonce/spector.hpp index d0f3fb62b3..b5454b2ba7 100644 --- a/include/uitsl/nonce/spector.hpp +++ b/include/uitsl/nonce/spector.hpp @@ -2,6 +2,7 @@ #ifndef UITSL_NONCE_SPECTOR_HPP_INCLUDE #define UITSL_NONCE_SPECTOR_HPP_INCLUDE +#include #include #include @@ -49,7 +50,7 @@ class spector { * @return TODO. */ operator vector_t&() { - emp_assert( std::holds_alternative(impl) ); + assert( std::holds_alternative(impl) ); return std::get(impl); } @@ -59,7 +60,7 @@ class spector { * @return TODO. */ operator const vector_t&() const { - emp_assert( std::holds_alternative(impl) ); + assert( std::holds_alternative(impl) ); return std::get(impl); } @@ -69,7 +70,7 @@ class spector { * @return TODO. */ operator span_t&() { - emp_assert( std::holds_alternative(impl) ); + assert( std::holds_alternative(impl) ); return std::get(impl); } @@ -79,7 +80,7 @@ class spector { * @return TODO. */ operator const span_t&() const { - emp_assert( std::holds_alternative(impl) ); + assert( std::holds_alternative(impl) ); return std::get(impl); } @@ -138,7 +139,7 @@ class spector { * @return TODO. */ void resize(const size_t count) { - emp_assert( std::holds_alternative(impl) ); + assert( std::holds_alternative(impl) ); std::get>(impl).resize(count); } diff --git a/include/uitsl/parallel/RecursiveMutex.hpp b/include/uitsl/parallel/RecursiveMutex.hpp index 8df2adefad..fa6574ab09 100644 --- a/include/uitsl/parallel/RecursiveMutex.hpp +++ b/include/uitsl/parallel/RecursiveMutex.hpp @@ -2,6 +2,7 @@ #ifndef UITSL_PARALLEL_RECURSIVEMUTEX_HPP_INCLUDE #define UITSL_PARALLEL_RECURSIVEMUTEX_HPP_INCLUDE +#include #include #include "thread_utils.hpp" @@ -18,12 +19,12 @@ class RecursiveMutex { uitsl::thread_id_t mutex_owner{ uitsl::max_thread }; void RegisterThreadOwnership() { - emp_assert(mutex_owner == uitsl::max_thread); + assert(mutex_owner == uitsl::max_thread); mutex_owner = uitsl::get_thread_id(); } void DeregisterThreadOwnership() { - emp_assert(mutex_owner != uitsl::max_thread); + assert(mutex_owner != uitsl::max_thread); mutex_owner = uitsl::max_thread; } diff --git a/include/uitsl/parallel/_ThreadIbarrierManager.hpp b/include/uitsl/parallel/_ThreadIbarrierManager.hpp index 48eb9b4166..caffba6a4f 100644 --- a/include/uitsl/parallel/_ThreadIbarrierManager.hpp +++ b/include/uitsl/parallel/_ThreadIbarrierManager.hpp @@ -2,6 +2,7 @@ #ifndef UITSL_PARALLEL__THREADIBARRIERMANAGER_HPP_INCLUDE #define UITSL_PARALLEL__THREADIBARRIERMANAGER_HPP_INCLUDE +#include #include #include #include @@ -51,25 +52,25 @@ class ThreadIbarrierManager // race condition where multiple latches are appended is okay if (latches.empty()) latches.emplace_back(expected); - emp_assert(latches.size()); + assert(latches.size()); auto& position = thread_positions.HasEntry() ? thread_positions.Get() : thread_positions.GetWithDefault( std::begin(latches) ); - emp_assert(thread_positions.GetSize() <= expected); + assert(thread_positions.GetSize() <= expected); - emp_assert(position != std::end(latches)); - emp_assert(!position->TryWait()); + assert(position != std::end(latches)); + assert(!position->TryWait()); // race condition where multiple latches are appended is okay if (std::next(position) == std::end(latches)) { latches.emplace_back(expected); - emp_assert(std::next(position) != std::end(latches)); + assert(std::next(position) != std::end(latches)); } std::advance(position, 1); - emp_assert(position != std::end(latches)); - emp_assert(!position->TryWait()); + assert(position != std::end(latches)); + assert(!position->TryWait()); TryFlush(); diff --git a/include/uitsl/utility/get_exec_instance_uuid.hpp b/include/uitsl/utility/get_exec_instance_uuid.hpp index 660a9be86e..58126ccf2d 100644 --- a/include/uitsl/utility/get_exec_instance_uuid.hpp +++ b/include/uitsl/utility/get_exec_instance_uuid.hpp @@ -15,13 +15,13 @@ #include "../../uit_emp/tools/keyname_utils.hpp" #include "../../uit_emp/tools/string_utils.hpp" +#include "../debug/uitsl_always_assert.hpp" #include "../mpi/comm_utils.hpp" #include "../mpi/mpi_init_utils.hpp" #include "../polyfill/filesystem.hpp" #include "generate_random_uuid.hpp" -#include "../../uit_emp/vendorization/push_assert_macros.hh" namespace uitsl { uuids::uuid get_exec_instance_uuid() { @@ -36,13 +36,14 @@ uuids::uuid get_exec_instance_uuid() { // 2. if user provided UITSL_EXEC_INSTANCE_UUID, verify it and then use it else if ( const char* seed = std::getenv("UITSL_EXEC_INSTANCE_UUID") ) { auto parsed = uuids::uuid::from_string(seed); - emp_always_assert( + uitsl_always_assert( parsed.has_value(), - "UITSL_EXEC_INSTANCE_UUID must be a valid uuid", seed + "UITSL_EXEC_INSTANCE_UUID must be a valid uuid" << seed ); - emp_always_assert( + uitsl_always_assert( !parsed->is_nil(), - "UITSL_EXEC_INSTANCE_UUID must be a non-nil uuid", seed, *parsed + "UITSL_EXEC_INSTANCE_UUID must be a non-nil uuid" + << seed << *parsed ); res = *parsed; // 3. if PMIX_NAMESPACE is available, use that to make uuid @@ -67,12 +68,12 @@ uuids::uuid get_exec_instance_uuid() { {"rank",uit_emp::to_string( uitsl::get_proc_id() )}, {"uid", uuids::to_string( res )}, }); - emp_always_assert( + uitsl_always_assert( !std::filesystem::exists( reservation_path ), - reservation_path, - uitsl::is_multiprocess(), - std::getenv("UITSL_EXEC_INSTANCE_UUID"), - std::getenv("PMIX_NAMESPACE") + reservation_path + << uitsl::is_multiprocess() + << std::getenv("UITSL_EXEC_INSTANCE_UUID") + << std::getenv("PMIX_NAMESPACE") ); // touch reservation_path @@ -88,6 +89,5 @@ uuids::uuid get_exec_instance_uuid() { } } // namespace uitsl -#include "../../uit_emp/vendorization/pop_assert_macros.hh" #endif // #ifndef UITSL_UTILITY_GET_EXEC_INSTANCE_UUID_HPP_INCLUDE diff --git a/include/uitsl/utility/keyname_directory_min.hpp b/include/uitsl/utility/keyname_directory_min.hpp index ff10244a6c..7147b133d2 100644 --- a/include/uitsl/utility/keyname_directory_min.hpp +++ b/include/uitsl/utility/keyname_directory_min.hpp @@ -3,6 +3,7 @@ #define UITSL_UTILITY_KEYNAME_DIRECTORY_MIN_HPP_INCLUDE #include +#include #include #include @@ -24,7 +25,7 @@ auto keyname_directory_min( key, filters, target, parser ); - emp_assert( transformed.size() ); + assert( transformed.size() ); return *std::min_element(std::begin( transformed ), std::end( transformed ));