Skip to content

Commit

Permalink
Adapt previous merge by @aletempiac to compile with ABC namespaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
sterin committed Jan 17, 2024
1 parent 9bdb8a7 commit d140535
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/map/if/acd/ac_decomposition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include "kitty_operators.hpp"
#include "kitty_static_tt.hpp"

ABC_NAMESPACE_CXX_HEADER_START

namespace acd
{

Expand Down Expand Up @@ -1303,4 +1305,6 @@ class ac_decomposition_impl

} // namespace acd

ABC_NAMESPACE_CXX_HEADER_END

#endif // _ACD_H_
4 changes: 4 additions & 0 deletions src/map/if/acd/ac_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
8 changes: 2 additions & 6 deletions src/map/if/acd/ac_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions src/map/if/acd/kitty_algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "kitty_dynamic_tt.hpp"
#include "kitty_static_tt.hpp"

ABC_NAMESPACE_CXX_HEADER_START

namespace kitty
{

Expand Down Expand Up @@ -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_
4 changes: 4 additions & 0 deletions src/map/if/acd/kitty_constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <cstdint>
#include <vector>

ABC_NAMESPACE_CXX_HEADER_START

namespace kitty
{

Expand Down Expand Up @@ -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_
4 changes: 4 additions & 0 deletions src/map/if/acd/kitty_constructors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "kitty_dynamic_tt.hpp"
#include "kitty_static_tt.hpp"

ABC_NAMESPACE_CXX_HEADER_START

namespace kitty
{

Expand Down Expand Up @@ -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_
4 changes: 4 additions & 0 deletions src/map/if/acd/kitty_dynamic_tt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#include "kitty_constants.hpp"

ABC_NAMESPACE_CXX_HEADER_START

namespace kitty
{

Expand Down Expand Up @@ -144,4 +146,6 @@ struct dynamic_truth_table

} //namespace kitty

ABC_NAMESPACE_CXX_HEADER_END

#endif // _KITTY_DYNAMIC_TT_H_
4 changes: 4 additions & 0 deletions src/map/if/acd/kitty_operations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "kitty_dynamic_tt.hpp"
#include "kitty_static_tt.hpp"

ABC_NAMESPACE_CXX_HEADER_START

namespace kitty
{

Expand Down Expand Up @@ -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_
4 changes: 4 additions & 0 deletions src/map/if/acd/kitty_operators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include "kitty_static_tt.hpp"
#include "kitty_operations.hpp"

ABC_NAMESPACE_CXX_HEADER_START

namespace kitty
{

Expand Down Expand Up @@ -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_
4 changes: 4 additions & 0 deletions src/map/if/acd/kitty_static_tt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#include "kitty_constants.hpp"

ABC_NAMESPACE_CXX_HEADER_START

namespace kitty
{

Expand Down Expand Up @@ -128,4 +130,6 @@ struct static_truth_table

} //namespace kitty

ABC_NAMESPACE_CXX_HEADER_END

#endif // _KITTY_STATIC_TT_H_

0 comments on commit d140535

Please sign in to comment.