From: 윤현식/On-Device Lab(SR)/Principal Engineer/삼성전자 Date: Sun, 27 Oct 2019 21:28:16 +0000 (+0900) Subject: [exo] renaming template type and node name (#8483) X-Git-Tag: submit/tizen/20191205.083104~573 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc2b2055db07a62037224caa98d027d03ec6e8ac;p=platform%2Fcore%2Fml%2Fnnfw.git [exo] renaming template type and node name (#8483) Instead of trying to imply real type of template type, general T is used and static_assert was added to explicitly show allowed type. Signed-off-by: Hyun Sik Yoon --- diff --git a/compiler/exo/src/Pass/FuseBiasAddPass.test.cpp b/compiler/exo/src/Pass/FuseBiasAddPass.test.cpp index c63b673..6ba728d 100644 --- a/compiler/exo/src/Pass/FuseBiasAddPass.test.cpp +++ b/compiler/exo/src/Pass/FuseBiasAddPass.test.cpp @@ -63,9 +63,12 @@ void init(locoex::TFLConv2D *conv2d, locoex::TFLConst *filter, locoex::TFLConst } } -template void init(AddSubT *add_sub, locoex::FusedActFunc f) +template void init(T *node, locoex::FusedActFunc f) { - add_sub->fusedActivationFunction(f); + static_assert(std::is_same::value || std::is_same::value, + "wrong template type"); + + node->fusedActivationFunction(f); } /// @brief Initializes one param of TFLAdd or TFLSub