From: 박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 Date: Tue, 4 Sep 2018 07:01:51 +0000 (+0900) Subject: [coco] Record stride configuration in MaxPool2D (#1320) X-Git-Tag: nncc_backup~1955 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=416afadf365c1d40770545d5a9236120ee4824c3;p=platform%2Fcore%2Fml%2Fnnfw.git [coco] Record stride configuration in MaxPool2D (#1320) This commit introduces a field and methods related with stride into MaxPool2D class. Signed-off-by: Jonghyun Park --- diff --git a/contrib/coco/core/include/coco/IR/MaxPool2D.h b/contrib/coco/core/include/coco/IR/MaxPool2D.h index 974c259..09a916f 100644 --- a/contrib/coco/core/include/coco/IR/MaxPool2D.h +++ b/contrib/coco/core/include/coco/IR/MaxPool2D.h @@ -3,6 +3,7 @@ #include "coco/IR/Op.h" #include "coco/IR/Window2D.h" +#include "coco/IR/Stride2D.h" namespace coco { @@ -30,6 +31,10 @@ public: Window2D *window(void) { return &_window; } const Window2D *window(void) const { return &_window; } +public: + Stride2D *stride(void) { return &_stride; } + const Stride2D *stride(void) const { return &_stride; } + private: void get(const PtrLink **out) const override { *out = _op_link; } @@ -38,6 +43,7 @@ private: private: Window2D _window; + Stride2D _stride; }; } // namespace coco diff --git a/contrib/coco/core/src/IR/MaxPool2D.test.cpp b/contrib/coco/core/src/IR/MaxPool2D.test.cpp index 187e3f8..2715ebc 100644 --- a/contrib/coco/core/src/IR/MaxPool2D.test.cpp +++ b/contrib/coco/core/src/IR/MaxPool2D.test.cpp @@ -51,6 +51,10 @@ TEST_F(MaxPool2DTest, initialization) // window() SHOULD return a valid pointer ASSERT_NE(mutable_ptr->window(), nullptr); ASSERT_EQ(mutable_ptr->window(), immutable_ptr->window()); + + // stride() SHOULD return a valid pointer + ASSERT_NE(mutable_ptr->stride(), nullptr); + ASSERT_EQ(mutable_ptr->stride(), immutable_ptr->stride()); } TEST_F(MaxPool2DTest, asMaxPool2D)