@@ -54,8 +54,8 @@ class AbcTest : public ::testing::Test
54
54
protected:
55
55
void SetUp () override
56
56
{
57
- db_ = utl::deleted_unique_ptr <odb::dbDatabase>(odb::dbDatabase::create (),
58
- &odb::dbDatabase::destroy);
57
+ db_ = utl::UniquePtrWithDeleter <odb::dbDatabase>(odb::dbDatabase::create (),
58
+ &odb::dbDatabase::destroy);
59
59
std::call_once (init_sta_flag, []() {
60
60
sta::initSta ();
61
61
abc::Abc_Start ();
@@ -137,7 +137,7 @@ class AbcTest : public ::testing::Test
137
137
return primary_output_name_to_index;
138
138
}
139
139
140
- utl::deleted_unique_ptr <odb::dbDatabase> db_;
140
+ utl::UniquePtrWithDeleter <odb::dbDatabase> db_;
141
141
sta::Unit* power_unit_;
142
142
std::unique_ptr<sta::dbSta> sta_;
143
143
sta::LibertyLibrary* library_;
@@ -251,7 +251,7 @@ TEST_F(AbcTest, TestLibraryInstallation)
251
251
gate = abc::Mio_GateReadNext (gate);
252
252
}
253
253
254
- utl::deleted_unique_ptr <abc::Abc_Ntk_t> network (
254
+ utl::UniquePtrWithDeleter <abc::Abc_Ntk_t> network (
255
255
abc::Abc_NtkAlloc (abc::Abc_NtkType_t::ABC_NTK_NETLIST,
256
256
abc::Abc_NtkFunc_t::ABC_FUNC_MAP,
257
257
/* fUseMemMan=*/ 1 ),
@@ -284,11 +284,11 @@ TEST_F(AbcTest, TestLibraryInstallation)
284
284
285
285
abc::Abc_ObjAddFanin (output, output_net);
286
286
287
- utl::deleted_unique_ptr <abc::Abc_Ntk_t> logic_network (
287
+ utl::UniquePtrWithDeleter <abc::Abc_Ntk_t> logic_network (
288
288
abc::Abc_NtkToLogic (network.get ()), &abc::Abc_NtkDelete);
289
289
290
290
std::array<int , 2 > input_vector = {1 , 1 };
291
- utl::deleted_unique_ptr <int > output_vector (
291
+ utl::UniquePtrWithDeleter <int > output_vector (
292
292
abc::Abc_NtkVerifySimulatePattern (logic_network.get (),
293
293
input_vector.data ()),
294
294
&free);
@@ -397,20 +397,20 @@ TEST_F(AbcTest, BuildAbcMappedNetworkFromLogicCut)
397
397
logic_extractor.AppendEndpoint (flop_input_vertex);
398
398
LogicCut cut = logic_extractor.BuildLogicCut (abc_library);
399
399
400
- utl::deleted_unique_ptr <abc::Abc_Ntk_t> abc_network
400
+ utl::UniquePtrWithDeleter <abc::Abc_Ntk_t> abc_network
401
401
= cut.BuildMappedAbcNetwork (abc_library, network, &logger_);
402
402
403
403
abc::Abc_NtkSetName (abc_network.get (), strdup (" temp_network_name" ));
404
404
405
- utl::deleted_unique_ptr <abc::Abc_Ntk_t> logic_network (
405
+ utl::UniquePtrWithDeleter <abc::Abc_Ntk_t> logic_network (
406
406
abc::Abc_NtkToLogic (abc_network.get ()), &abc::Abc_NtkDelete);
407
407
408
408
// Build map of primary output names to primary output indicies in ABC
409
409
std::map<std::string, int > primary_output_name_to_index
410
410
= AbcLogicNetworkNameToPrimaryOutputIds (logic_network.get ());
411
411
412
412
std::array<int , 2 > input_vector = {1 , 1 };
413
- utl::deleted_unique_ptr <int > output_vector (
413
+ utl::UniquePtrWithDeleter <int > output_vector (
414
414
abc::Abc_NtkVerifySimulatePattern (logic_network.get (),
415
415
input_vector.data ()),
416
416
&free);
@@ -467,7 +467,7 @@ TEST_F(AbcTest, InsertingMappedLogicCutDoesNotThrow)
467
467
logic_extractor.AppendEndpoint (flop_input_vertex);
468
468
LogicCut cut = logic_extractor.BuildLogicCut (abc_library);
469
469
470
- utl::deleted_unique_ptr <abc::Abc_Ntk_t> mapped_abc_network
470
+ utl::UniquePtrWithDeleter <abc::Abc_Ntk_t> mapped_abc_network
471
471
= cut.BuildMappedAbcNetwork (abc_library, network, &logger_);
472
472
473
473
rmp::UniqueName unique_name;
@@ -497,7 +497,7 @@ TEST_F(AbcTest,
497
497
logic_extractor.AppendEndpoint (flop_input_vertex);
498
498
LogicCut cut = logic_extractor.BuildLogicCut (abc_library);
499
499
500
- utl::deleted_unique_ptr <abc::Abc_Ntk_t> mapped_abc_network
500
+ utl::UniquePtrWithDeleter <abc::Abc_Ntk_t> mapped_abc_network
501
501
= cut.BuildMappedAbcNetwork (abc_library, network, &logger_);
502
502
503
503
rmp::UniqueName unique_name;
@@ -511,13 +511,13 @@ TEST_F(AbcTest,
511
511
LogicCut cut_post_insert
512
512
= logic_extractor_post_insert.BuildLogicCut (abc_library);
513
513
514
- utl::deleted_unique_ptr <abc::Abc_Ntk_t> mapped_abc_network_post_insert
514
+ utl::UniquePtrWithDeleter <abc::Abc_Ntk_t> mapped_abc_network_post_insert
515
515
= cut.BuildMappedAbcNetwork (abc_library, network, &logger_);
516
516
517
517
abc::Abc_NtkSetName (mapped_abc_network_post_insert.get (),
518
518
strdup (" temp_network_name" ));
519
519
520
- utl::deleted_unique_ptr <abc::Abc_Ntk_t> logic_network (
520
+ utl::UniquePtrWithDeleter <abc::Abc_Ntk_t> logic_network (
521
521
abc::Abc_NtkToLogic (mapped_abc_network_post_insert.get ()),
522
522
&abc::Abc_NtkDelete);
523
523
@@ -526,7 +526,7 @@ TEST_F(AbcTest,
526
526
= AbcLogicNetworkNameToPrimaryOutputIds (logic_network.get ());
527
527
528
528
std::array<int , 2 > input_vector = {1 , 1 };
529
- utl::deleted_unique_ptr <int > output_vector (
529
+ utl::UniquePtrWithDeleter <int > output_vector (
530
530
abc::Abc_NtkVerifySimulatePattern (logic_network.get (),
531
531
input_vector.data ()),
532
532
&free);
0 commit comments