Adapt previous merge by @aletempiac to compile with ABC namespaces.

This commit is contained in:
Baruch Sterin 2024-01-17 15:04:31 -08:00
parent 9bdb8a7133
commit d140535d64
10 changed files with 38 additions and 6 deletions

View File

@ -40,6 +40,8 @@
#include "kitty_operators.hpp"
#include "kitty_static_tt.hpp"
ABC_NAMESPACE_CXX_HEADER_START
namespace acd
{
@ -1303,4 +1305,6 @@ private:
} // namespace acd
ABC_NAMESPACE_CXX_HEADER_END
#endif // _ACD_H_

View File

@ -19,6 +19,8 @@
#include "ac_wrapper.h"
#include "ac_decomposition.hpp"
ABC_NAMESPACE_IMPL_START
int acd_evaluate( word * pTruth, unsigned nVars, int lutSize, unsigned *pdelay, unsigned *cost, int try_no_late_arrival )
{
using namespace acd;
@ -66,3 +68,5 @@ int acd_decompose( word * pTruth, unsigned nVars, int lutSize, unsigned *pdelay,
acd.get_decomposition( decomposition );
return 0;
}
ABC_NAMESPACE_IMPL_END

View File

@ -23,15 +23,11 @@
#include "misc/util/abc_global.h"
#include "map/if/if.h"
#ifdef __cplusplus
extern "C" {
#endif
ABC_NAMESPACE_HEADER_START
int acd_evaluate( word * pTruth, unsigned nVars, int lutSize, unsigned *pdelay, unsigned *cost, int try_no_late_arrival );
int acd_decompose( word * pTruth, unsigned nVars, int lutSize, unsigned *pdelay, unsigned char *decomposition );
#ifdef __cplusplus
}
#endif
ABC_NAMESPACE_HEADER_END
#endif

View File

@ -9,6 +9,8 @@
#include "kitty_dynamic_tt.hpp"
#include "kitty_static_tt.hpp"
ABC_NAMESPACE_CXX_HEADER_START
namespace kitty
{
@ -116,4 +118,6 @@ void for_each_block_reversed( const TT& tt, Fn&& op )
} // namespace kitty
ABC_NAMESPACE_CXX_HEADER_END
#endif // _KITTY_ALGORITHM_H_

View File

@ -5,6 +5,8 @@
#include <cstdint>
#include <vector>
ABC_NAMESPACE_CXX_HEADER_START
namespace kitty
{
@ -88,4 +90,6 @@ static constexpr int32_t hex_to_int[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
} // namespace kitty
ABC_NAMESPACE_CXX_HEADER_END
#endif //_KITTY_CONSTANTS_H_

View File

@ -12,6 +12,8 @@
#include "kitty_dynamic_tt.hpp"
#include "kitty_static_tt.hpp"
ABC_NAMESPACE_CXX_HEADER_START
namespace kitty
{
@ -89,4 +91,6 @@ void create_nth_var( TT& tt, uint8_t var_index, bool complement = false )
} // namespace kitty
ABC_NAMESPACE_CXX_HEADER_END
#endif // _KITTY_CONSTRUCT_TT_H_

View File

@ -8,6 +8,8 @@
#include "kitty_constants.hpp"
ABC_NAMESPACE_CXX_HEADER_START
namespace kitty
{
@ -144,4 +146,6 @@ public: /* fields */
} //namespace kitty
ABC_NAMESPACE_CXX_HEADER_END
#endif // _KITTY_DYNAMIC_TT_H_

View File

@ -14,6 +14,8 @@
#include "kitty_dynamic_tt.hpp"
#include "kitty_static_tt.hpp"
ABC_NAMESPACE_CXX_HEADER_START
namespace kitty
{
@ -330,4 +332,6 @@ void print_hex( const TT& tt, std::ostream& os = std::cout )
} //namespace kitty
ABC_NAMESPACE_CXX_HEADER_END
#endif // _KITTY_OPERATIONS_TT_H_

View File

@ -13,6 +13,8 @@
#include "kitty_static_tt.hpp"
#include "kitty_operations.hpp"
ABC_NAMESPACE_CXX_HEADER_START
namespace kitty
{
@ -119,4 +121,6 @@ inline void operator|=( static_truth_table<NumVars>& first, const static_truth_t
} // namespace kitty
ABC_NAMESPACE_CXX_HEADER_END
#endif // _KITTY_OPERATORS_TT_H_

View File

@ -7,6 +7,8 @@
#include "kitty_constants.hpp"
ABC_NAMESPACE_CXX_HEADER_START
namespace kitty
{
@ -128,4 +130,6 @@ public: /* fields */
} //namespace kitty
ABC_NAMESPACE_CXX_HEADER_END
#endif // _KITTY_STATIC_TT_H_