summaryrefslogtreecommitdiff
path: root/compiler/coco
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/coco')
-rw-r--r--compiler/coco/core/CMakeLists.txt2
-rw-r--r--compiler/coco/core/include/coco/IR/FeatureShape.h4
-rw-r--r--compiler/coco/core/include/coco/IR/Locatable.h2
-rw-r--r--compiler/coco/core/include/coco/IR/Ops.h2
-rw-r--r--compiler/coco/core/include/coco/IR/Padding2D.h2
-rw-r--r--compiler/coco/core/src/ADT/PtrList.test.cpp2
-rw-r--r--compiler/coco/core/src/ADT/PtrManager.test.cpp2
-rw-r--r--compiler/coco/core/src/IR/BagManager.cpp4
-rw-r--r--compiler/coco/core/src/IR/BlockManager.cpp5
-rw-r--r--compiler/coco/core/src/IR/Conv2D.test.cpp4
-rw-r--r--compiler/coco/core/src/IR/Def.test.cpp4
-rw-r--r--compiler/coco/core/src/IR/InputManager.cpp4
-rw-r--r--compiler/coco/core/src/IR/Module.cpp6
-rw-r--r--compiler/coco/core/src/IR/ObjectManager.cpp5
-rw-r--r--compiler/coco/core/src/IR/OpManager.cpp5
-rw-r--r--compiler/coco/core/src/IR/Ops.test.cpp4
-rw-r--r--compiler/coco/core/src/IR/OutputManager.cpp4
-rw-r--r--compiler/coco/core/src/IR/Part.test.cpp4
-rw-r--r--compiler/coco/core/src/IR/Use.test.cpp4
-rw-r--r--compiler/coco/generic/CMakeLists.txt4
-rw-r--r--compiler/coco/generic/src/IR/Data.cpp10
21 files changed, 34 insertions, 49 deletions
diff --git a/compiler/coco/core/CMakeLists.txt b/compiler/coco/core/CMakeLists.txt
index 8c6844733..a81d366c9 100644
--- a/compiler/coco/core/CMakeLists.txt
+++ b/compiler/coco/core/CMakeLists.txt
@@ -7,7 +7,6 @@ target_include_directories(coco_core PUBLIC include)
# NOTE Some coco_core PUBLIC headers include angkor headers
target_link_libraries(coco_core PUBLIC angkor)
target_link_libraries(coco_core PRIVATE pepper_assert)
-target_link_libraries(coco_core PRIVATE stdex)
# Let's apply nncc common compile options
# NOTE This will enable strict compilation (warnings as error).
# Please refer to top-level CMakeLists.txt for details
@@ -22,4 +21,3 @@ nnas_find_package(GTest REQUIRED)
GTest_AddTest(coco_core_test ${TESTS})
target_link_libraries(coco_core_test coco_core)
-target_link_libraries(coco_core_test stdex)
diff --git a/compiler/coco/core/include/coco/IR/FeatureShape.h b/compiler/coco/core/include/coco/IR/FeatureShape.h
index 015fc709d..3c8e9accd 100644
--- a/compiler/coco/core/include/coco/IR/FeatureShape.h
+++ b/compiler/coco/core/include/coco/IR/FeatureShape.h
@@ -31,13 +31,13 @@ class FeatureShape : public nncc::core::ADT::feature::Shape
{
public:
FeatureShape(uint32_t depth, uint32_t height, uint32_t width)
- : Shape{depth, height, width}, _batch{1}
+ : Shape{depth, height, width}, _batch{1}
{
// DO NOTHING
}
FeatureShape(uint32_t batch, uint32_t depth, uint32_t height, uint32_t width)
- : Shape{depth, height, width}, _batch{batch}
+ : Shape{depth, height, width}, _batch{batch}
{
// DO NOTHING
}
diff --git a/compiler/coco/core/include/coco/IR/Locatable.h b/compiler/coco/core/include/coco/IR/Locatable.h
index b80a4a360..549802776 100644
--- a/compiler/coco/core/include/coco/IR/Locatable.h
+++ b/compiler/coco/core/include/coco/IR/Locatable.h
@@ -24,7 +24,7 @@ namespace coco
/**
* @brief Return the associated instruction if exists.
- */
+ */
struct Locatable
{
virtual ~Locatable() = default;
diff --git a/compiler/coco/core/include/coco/IR/Ops.h b/compiler/coco/core/include/coco/IR/Ops.h
index 01ac92b7f..39dce5272 100644
--- a/compiler/coco/core/include/coco/IR/Ops.h
+++ b/compiler/coco/core/include/coco/IR/Ops.h
@@ -407,6 +407,6 @@ public:
const Sqrt *asSqrt(void) const override { return this; }
};
-} // namesapce coco
+} // namespace coco
#endif // __COCO_IR_OPS_H__
diff --git a/compiler/coco/core/include/coco/IR/Padding2D.h b/compiler/coco/core/include/coco/IR/Padding2D.h
index b764656cc..68a3481f1 100644
--- a/compiler/coco/core/include/coco/IR/Padding2D.h
+++ b/compiler/coco/core/include/coco/IR/Padding2D.h
@@ -32,7 +32,7 @@ public:
public:
Padding2D(uint32_t top, uint32_t bottom, uint32_t left, uint32_t right)
- : _top{top}, _bottom{bottom}, _left{left}, _right{right}
+ : _top{top}, _bottom{bottom}, _left{left}, _right{right}
{
// DO NOTHING
}
diff --git a/compiler/coco/core/src/ADT/PtrList.test.cpp b/compiler/coco/core/src/ADT/PtrList.test.cpp
index dcbad8b90..904dd6e1d 100644
--- a/compiler/coco/core/src/ADT/PtrList.test.cpp
+++ b/compiler/coco/core/src/ADT/PtrList.test.cpp
@@ -25,7 +25,7 @@ namespace
struct Object
{
};
-}
+} // namespace
TEST(ADT_PTR_LIST, ctor)
{
diff --git a/compiler/coco/core/src/ADT/PtrManager.test.cpp b/compiler/coco/core/src/ADT/PtrManager.test.cpp
index bb9056f29..5a9f09d4e 100644
--- a/compiler/coco/core/src/ADT/PtrManager.test.cpp
+++ b/compiler/coco/core/src/ADT/PtrManager.test.cpp
@@ -61,7 +61,7 @@ struct ObjectManager final : public coco::PtrManager<Object>
void free(Object *o) { release(o); }
};
-}
+} // namespace
TEST(ADT_PTR_MANAGER, usecase)
{
diff --git a/compiler/coco/core/src/IR/BagManager.cpp b/compiler/coco/core/src/IR/BagManager.cpp
index 10fe69d57..8cfb0c09c 100644
--- a/compiler/coco/core/src/IR/BagManager.cpp
+++ b/compiler/coco/core/src/IR/BagManager.cpp
@@ -16,14 +16,14 @@
#include "coco/IR/BagManager.h"
-#include <stdex/Memory.h>
+#include <memory>
namespace coco
{
Bag *BagManager::create(uint32_t size)
{
- auto bag = stdex::make_unique<Bag>(size);
+ auto bag = std::make_unique<Bag>(size);
modulize(bag.get());
return take(std::move(bag));
}
diff --git a/compiler/coco/core/src/IR/BlockManager.cpp b/compiler/coco/core/src/IR/BlockManager.cpp
index 5e3b88173..d1bcacb32 100644
--- a/compiler/coco/core/src/IR/BlockManager.cpp
+++ b/compiler/coco/core/src/IR/BlockManager.cpp
@@ -16,8 +16,7 @@
#include "coco/IR/BlockManager.h"
-#include <stdex/Memory.h>
-
+#include <memory>
#include <cassert>
namespace coco
@@ -25,7 +24,7 @@ namespace coco
Block *BlockManager::create(void)
{
- auto blk = stdex::make_unique<Block>();
+ auto blk = std::make_unique<Block>();
modulize(blk.get());
return take(std::move(blk));
}
diff --git a/compiler/coco/core/src/IR/Conv2D.test.cpp b/compiler/coco/core/src/IR/Conv2D.test.cpp
index df0a2470b..5bf06ca9f 100644
--- a/compiler/coco/core/src/IR/Conv2D.test.cpp
+++ b/compiler/coco/core/src/IR/Conv2D.test.cpp
@@ -20,11 +20,9 @@
#include <vector>
#include <memory>
-#include <stdex/Memory.h>
-
#include <gtest/gtest.h>
-using stdex::make_unique;
+using std::make_unique;
namespace
{
diff --git a/compiler/coco/core/src/IR/Def.test.cpp b/compiler/coco/core/src/IR/Def.test.cpp
index 98455c09e..443fdcb95 100644
--- a/compiler/coco/core/src/IR/Def.test.cpp
+++ b/compiler/coco/core/src/IR/Def.test.cpp
@@ -19,13 +19,13 @@
#include "coco/IR/FeatureObject.h"
-#include <stdex/Memory.h>
+#include <memory>
#include "Producer.mock.h"
#include <gtest/gtest.h>
-using stdex::make_unique;
+using std::make_unique;
namespace
{
diff --git a/compiler/coco/core/src/IR/InputManager.cpp b/compiler/coco/core/src/IR/InputManager.cpp
index 6d5b9470b..0530deeda 100644
--- a/compiler/coco/core/src/IR/InputManager.cpp
+++ b/compiler/coco/core/src/IR/InputManager.cpp
@@ -16,14 +16,14 @@
#include "coco/IR/InputManager.h"
-#include <stdex/Memory.h>
+#include <memory>
namespace coco
{
Input *InputManager::create(const nncc::core::ADT::tensor::Shape &shape)
{
- auto input = stdex::make_unique<Input>(shape);
+ auto input = std::make_unique<Input>(shape);
modulize(input.get());
return take(std::move(input));
}
diff --git a/compiler/coco/core/src/IR/Module.cpp b/compiler/coco/core/src/IR/Module.cpp
index 0b65ceedc..0db78941c 100644
--- a/compiler/coco/core/src/IR/Module.cpp
+++ b/compiler/coco/core/src/IR/Module.cpp
@@ -16,9 +16,9 @@
#include "coco/IR/Module.h"
-#include <stdex/Memory.h>
+#include <memory>
-using stdex::make_unique;
+using std::make_unique;
namespace
{
@@ -144,7 +144,7 @@ std::unique_ptr<Module> Module::create(void)
m->_input = make_unique<coco::InputList>();
m->_output = make_unique<coco::OutputList>();
- return std::move(m);
+ return m;
}
} // namespace coco
diff --git a/compiler/coco/core/src/IR/ObjectManager.cpp b/compiler/coco/core/src/IR/ObjectManager.cpp
index 1b7215a04..38c3a9bcc 100644
--- a/compiler/coco/core/src/IR/ObjectManager.cpp
+++ b/compiler/coco/core/src/IR/ObjectManager.cpp
@@ -19,11 +19,10 @@
#include "coco/IR/FeatureObject.h"
#include "coco/IR/KernelObject.h"
-#include <stdex/Memory.h>
-
+#include <memory>
#include <cassert>
-using stdex::make_unique;
+using std::make_unique;
namespace coco
{
diff --git a/compiler/coco/core/src/IR/OpManager.cpp b/compiler/coco/core/src/IR/OpManager.cpp
index c87b704fe..911f999c7 100644
--- a/compiler/coco/core/src/IR/OpManager.cpp
+++ b/compiler/coco/core/src/IR/OpManager.cpp
@@ -16,13 +16,12 @@
#include "coco/IR/OpManager.h"
-#include <stdex/Memory.h>
-
+#include <memory>
#include <cassert>
#include <queue>
#include <set>
-using stdex::make_unique;
+using std::make_unique;
namespace coco
{
diff --git a/compiler/coco/core/src/IR/Ops.test.cpp b/compiler/coco/core/src/IR/Ops.test.cpp
index ae979b2bf..cfbd3ca70 100644
--- a/compiler/coco/core/src/IR/Ops.test.cpp
+++ b/compiler/coco/core/src/IR/Ops.test.cpp
@@ -21,11 +21,9 @@
#include <vector>
#include <memory>
-#include <stdex/Memory.h>
-
#include <gtest/gtest.h>
-using stdex::make_unique;
+using std::make_unique;
/**
* Section: Add Op
diff --git a/compiler/coco/core/src/IR/OutputManager.cpp b/compiler/coco/core/src/IR/OutputManager.cpp
index 86b9580ac..5dd51c378 100644
--- a/compiler/coco/core/src/IR/OutputManager.cpp
+++ b/compiler/coco/core/src/IR/OutputManager.cpp
@@ -16,14 +16,14 @@
#include "coco/IR/OutputManager.h"
-#include <stdex/Memory.h>
+#include <memory>
namespace coco
{
Output *OutputManager::create(const nncc::core::ADT::tensor::Shape &shape)
{
- auto output = stdex::make_unique<Output>(shape);
+ auto output = std::make_unique<Output>(shape);
modulize(output.get());
return take(std::move(output));
}
diff --git a/compiler/coco/core/src/IR/Part.test.cpp b/compiler/coco/core/src/IR/Part.test.cpp
index 87e0e1516..4348d4db2 100644
--- a/compiler/coco/core/src/IR/Part.test.cpp
+++ b/compiler/coco/core/src/IR/Part.test.cpp
@@ -17,11 +17,11 @@
#include "coco/IR/Part.h"
#include "coco/IR/Op.h"
-#include <stdex/Memory.h>
+#include <memory>
#include <gtest/gtest.h>
-using stdex::make_unique;
+using std::make_unique;
namespace
{
diff --git a/compiler/coco/core/src/IR/Use.test.cpp b/compiler/coco/core/src/IR/Use.test.cpp
index 3191e9852..b7026385f 100644
--- a/compiler/coco/core/src/IR/Use.test.cpp
+++ b/compiler/coco/core/src/IR/Use.test.cpp
@@ -21,11 +21,11 @@
#include "Consumer.mock.h"
-#include <stdex/Memory.h>
+#include <memory>
#include <gtest/gtest.h>
-using stdex::make_unique;
+using std::make_unique;
namespace
{
diff --git a/compiler/coco/generic/CMakeLists.txt b/compiler/coco/generic/CMakeLists.txt
index 02fbf67f5..c65c84c06 100644
--- a/compiler/coco/generic/CMakeLists.txt
+++ b/compiler/coco/generic/CMakeLists.txt
@@ -5,7 +5,6 @@ list(REMOVE_ITEM SOURCES ${TESTS})
add_library(coco_generic SHARED ${SOURCES})
target_include_directories(coco_generic PUBLIC include)
target_link_libraries(coco_generic PUBLIC coco_core)
-target_link_libraries(coco_generic PRIVATE stdex)
target_link_libraries(coco_generic PRIVATE nncc_common)
if(NOT ENABLE_TEST)
@@ -17,6 +16,3 @@ nnas_find_package(GTest REQUIRED)
GTest_AddTest(coco_generic_test ${TESTS})
target_link_libraries(coco_generic_test coco_generic)
-# stdex is a PRIVATE dependency of coco_generic, and thus is not linked to coco_generic_test
-# even though coco_generic_test is linked to coco_generic
-target_link_libraries(coco_generic_test stdex)
diff --git a/compiler/coco/generic/src/IR/Data.cpp b/compiler/coco/generic/src/IR/Data.cpp
index b71947253..361dcc243 100644
--- a/compiler/coco/generic/src/IR/Data.cpp
+++ b/compiler/coco/generic/src/IR/Data.cpp
@@ -19,13 +19,12 @@
#include <nncc/core/ADT/kernel/NCHWLayout.h>
#include <nncc/core/ADT/kernel/Overlay.h>
-#include <stdex/Memory.h>
-
+#include <memory>
#include <map>
using namespace nncc::core::ADT;
-using stdex::make_unique;
+using std::make_unique;
namespace
{
@@ -71,7 +70,7 @@ public:
private:
std::map<const coco::Bag *, std::unique_ptr<std::vector<uint8_t>>> _data;
};
-}
+} // namespace
namespace
{
@@ -210,8 +209,7 @@ std::unique_ptr<Data> Data::create(void)
data->_blob = std::move(blob);
data->_fp32 = std::move(fp32);
- // GCC 4.9 tries to copy data (while GCC 6.X doesn't)
- return std::move(data);
+ return data;
}
} // namespace coco