diff --git a/src/map/if/acd/ac_decomposition.hpp b/src/map/if/acd/ac_decomposition.hpp index 8ba2fb20e..8aee0266d 100644 --- a/src/map/if/acd/ac_decomposition.hpp +++ b/src/map/if/acd/ac_decomposition.hpp @@ -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_ \ No newline at end of file diff --git a/src/map/if/acd/ac_wrapper.cpp b/src/map/if/acd/ac_wrapper.cpp index baeee2fd6..fd8015f95 100644 --- a/src/map/if/acd/ac_wrapper.cpp +++ b/src/map/if/acd/ac_wrapper.cpp @@ -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 diff --git a/src/map/if/acd/ac_wrapper.h b/src/map/if/acd/ac_wrapper.h index ce39949fb..a384b4404 100644 --- a/src/map/if/acd/ac_wrapper.h +++ b/src/map/if/acd/ac_wrapper.h @@ -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 \ No newline at end of file diff --git a/src/map/if/acd/kitty_algorithm.hpp b/src/map/if/acd/kitty_algorithm.hpp index 6460a802c..78eead08a 100644 --- a/src/map/if/acd/kitty_algorithm.hpp +++ b/src/map/if/acd/kitty_algorithm.hpp @@ -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_ \ No newline at end of file diff --git a/src/map/if/acd/kitty_constants.hpp b/src/map/if/acd/kitty_constants.hpp index 55cfcd650..35ff489e9 100644 --- a/src/map/if/acd/kitty_constants.hpp +++ b/src/map/if/acd/kitty_constants.hpp @@ -5,6 +5,8 @@ #include #include +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_ \ No newline at end of file diff --git a/src/map/if/acd/kitty_constructors.hpp b/src/map/if/acd/kitty_constructors.hpp index 43408b8cc..26ec6e483 100644 --- a/src/map/if/acd/kitty_constructors.hpp +++ b/src/map/if/acd/kitty_constructors.hpp @@ -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_ \ No newline at end of file diff --git a/src/map/if/acd/kitty_dynamic_tt.hpp b/src/map/if/acd/kitty_dynamic_tt.hpp index f3ef0c7d9..880943dfa 100644 --- a/src/map/if/acd/kitty_dynamic_tt.hpp +++ b/src/map/if/acd/kitty_dynamic_tt.hpp @@ -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_ \ No newline at end of file diff --git a/src/map/if/acd/kitty_operations.hpp b/src/map/if/acd/kitty_operations.hpp index fb504489a..bf8e38007 100644 --- a/src/map/if/acd/kitty_operations.hpp +++ b/src/map/if/acd/kitty_operations.hpp @@ -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_ \ No newline at end of file diff --git a/src/map/if/acd/kitty_operators.hpp b/src/map/if/acd/kitty_operators.hpp index 68a24cf2e..b5f4688c2 100644 --- a/src/map/if/acd/kitty_operators.hpp +++ b/src/map/if/acd/kitty_operators.hpp @@ -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& first, const static_truth_t } // namespace kitty +ABC_NAMESPACE_CXX_HEADER_END + #endif // _KITTY_OPERATORS_TT_H_ \ No newline at end of file diff --git a/src/map/if/acd/kitty_static_tt.hpp b/src/map/if/acd/kitty_static_tt.hpp index 61593f3ff..ab5a5d1c9 100644 --- a/src/map/if/acd/kitty_static_tt.hpp +++ b/src/map/if/acd/kitty_static_tt.hpp @@ -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_ \ No newline at end of file