diff --git a/src/aig/gia/giaIso3.c b/src/aig/gia/giaIso3.c index 8bea4bbfae..b526676d36 100644 --- a/src/aig/gia/giaIso3.c +++ b/src/aig/gia/giaIso3.c @@ -177,7 +177,7 @@ Vec_Wec_t * Gia_Iso4Gia( Gia_Man_t * p ) Vec_WecForEachLevel( vLevs, vLevel, l ) { Gia_Obj_t * pObj; int i; - int RandC[2] = { Abc_Random(0), Abc_Random(0) }; + unsigned RandC[2] = { Abc_Random(0), Abc_Random(0) }; if ( l == 0 ) { Gia_ManForEachObjVec( vLevel, p, pObj, i ) diff --git a/src/base/acb/acbTest.c b/src/base/acb/acbTest.c index 6290b88ea3..c22d4b55b3 100644 --- a/src/base/acb/acbTest.c +++ b/src/base/acb/acbTest.c @@ -421,8 +421,8 @@ Gia_Man_t * Acb_NtkGiaDeriveMiter( Gia_Man_t * pOne, Gia_Man_t * pTwo, int Type { for ( i = 0; i < Gia_ManCoNum(pOne); i += 2 ) { - int pLitsF[2] = { Gia_ManCo(pOne, i)->Value, Gia_ManCo(pOne, i+1)->Value }; - int pLitsS[2] = { Gia_ManCo(pTwo, i)->Value, Gia_ManCo(pTwo, i+1)->Value }; + unsigned pLitsF[2] = { Gia_ManCo(pOne, i)->Value, Gia_ManCo(pOne, i+1)->Value }; + unsigned pLitsS[2] = { Gia_ManCo(pTwo, i)->Value, Gia_ManCo(pTwo, i+1)->Value }; Gia_ManAppendCo( pNew, pLitsF[0] ); Gia_ManAppendCo( pNew, pLitsS[0] ); } @@ -431,8 +431,8 @@ Gia_Man_t * Acb_NtkGiaDeriveMiter( Gia_Man_t * pOne, Gia_Man_t * pTwo, int Type { for ( i = 0; i < Gia_ManCoNum(pOne); i += 2 ) { - int pLitsF[2] = { Gia_ManCo(pOne, i)->Value, Gia_ManCo(pOne, i+1)->Value }; - int pLitsS[2] = { Gia_ManCo(pTwo, i)->Value, Gia_ManCo(pTwo, i+1)->Value }; + unsigned pLitsF[2] = { Gia_ManCo(pOne, i)->Value, Gia_ManCo(pOne, i+1)->Value }; + unsigned pLitsS[2] = { Gia_ManCo(pTwo, i)->Value, Gia_ManCo(pTwo, i+1)->Value }; Gia_ManAppendCo( pNew, pLitsF[1] ); Gia_ManAppendCo( pNew, pLitsS[1] ); } @@ -441,8 +441,8 @@ Gia_Man_t * Acb_NtkGiaDeriveMiter( Gia_Man_t * pOne, Gia_Man_t * pTwo, int Type { for ( i = 0; i < Gia_ManCoNum(pOne); i += 2 ) { - int pLitsF[2] = { Gia_ManCo(pOne, i)->Value, Gia_ManCo(pOne, i+1)->Value }; - int pLitsS[2] = { Gia_ManCo(pTwo, i)->Value, Gia_ManCo(pTwo, i+1)->Value }; + int pLitsF[2] = { (int)Gia_ManCo(pOne, i)->Value, (int)Gia_ManCo(pOne, i+1)->Value }; + int pLitsS[2] = { (int)Gia_ManCo(pTwo, i)->Value, (int)Gia_ManCo(pTwo, i+1)->Value }; Gia_ManAppendCo( pNew, Gia_ManDualCompare( pNew, pLitsF, pLitsS ) ); } } diff --git a/src/map/if/acd/ac_decomposition.hpp b/src/map/if/acd/ac_decomposition.hpp index 8ba2fb20e2..8aee0266d6 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 @@ class ac_decomposition_impl } // 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 baeee2fd6a..fd8015f95e 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 ce39949fb2..a384b4404b 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 6460a802cf..78eead08a2 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 55cfcd650f..35ff489e90 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 43408b8cc3..26ec6e4835 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 f3ef0c7d9a..880943dfa6 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 @@ struct dynamic_truth_table } //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 fb504489a4..bf8e38007e 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 68a24cf2ec..b5f4688c2c 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 61593f3ff1..ab5a5d1c93 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 @@ struct static_truth_table } //namespace kitty +ABC_NAMESPACE_CXX_HEADER_END + #endif // _KITTY_STATIC_TT_H_ \ No newline at end of file