This commit extends coco IR including Div operation
Signed-off-by: Cheongyo Bahk <ch.bahk@samsung.com>
OP(Add)
OP(Sub)
OP(Mul)
+OP(Div)
OP(ConcatF)
};
/**
+ * @brief Element-wise division
+ *
+ * Div(L, R) is valid only when L and R have identical kind/shape/dtype
+ */
+class Div final : public BinaryOp
+{
+public:
+ explicit Div() = default;
+
+public:
+ Div(const Div &) = delete;
+ Div(Div &&) = delete;
+
+public:
+ Div *asDiv(void) override { return this; }
+ const Div *asDiv(void) const override { return this; }
+};
+
+/**
* @brief Concatenate two feature maps
*
* ConcatF(L, R) requires
ASSERT_NE(obj, nullptr);
}
+TEST_F(OpManagerTest, Div)
+{
+ auto obj = mgr.create<coco::Div>();
+
+ ASSERT_NE(obj, nullptr);
+}
+
TEST_F(OpManagerTest, PadF)
{
auto op = mgr.create<coco::PadF>();
}
/**
+ * Section: Div Op
+ */
+TEST(DivTest, constructor)
+{
+ auto op = make_unique<coco::Div>();
+
+ ASSERT_EQ(op->left(), nullptr);
+ ASSERT_EQ(op->right(), nullptr);
+}
+
+/**
* Section: Op Helpers
*/
namespace