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 <hyunsik.yoon@samsung.com>
}
}
-template <class AddSubT> void init(AddSubT *add_sub, locoex::FusedActFunc f)
+template <class T> void init(T *node, locoex::FusedActFunc f)
{
- add_sub->fusedActivationFunction(f);
+ static_assert(std::is_same<T, locoex::TFLAdd>::value || std::is_same<T, locoex::TFLSub>::value,
+ "wrong template type");
+
+ node->fusedActivationFunction(f);
}
/// @brief Initializes one param of TFLAdd or TFLSub