From 6ae743eb7712afe92ccfca5218a70bbf9aba19e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=B2=9C=EA=B5=90/On-Device=20Lab=28SR=29/Enginee?= =?utf8?q?r/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Tue, 29 Jan 2019 13:00:09 +0900 Subject: [PATCH] [enco] Reformat comments into doxygen style (#2943) Doxygen cannot parse comments with '// @brief'. Now such comments are reformatted to style that doxygen can parse as documentation. Signed-off-by: Cheongyo Bahk --- contrib/enco/core/src/ANN/Binder.h | 30 ++++++++++++---------- contrib/enco/core/src/CppCode.cpp | 4 +-- contrib/enco/core/src/CppGen/Subnet.h | 6 ++--- .../enco/core/src/Transforms/AvgPoolLowering.cpp | 2 +- .../core/src/Transforms/DeadBagElimination.cpp | 4 +-- .../core/src/Transforms/GlobalDataGeneration.cpp | 6 ++--- contrib/enco/frontend/caffe/src/ConcatSpec.h | 6 +++-- contrib/enco/frontend/caffe/src/ShapeQuery.h | 2 +- 8 files changed, 33 insertions(+), 27 deletions(-) diff --git a/contrib/enco/core/src/ANN/Binder.h b/contrib/enco/core/src/ANN/Binder.h index 5cd868b..71b9567 100644 --- a/contrib/enco/core/src/ANN/Binder.h +++ b/contrib/enco/core/src/ANN/Binder.h @@ -107,7 +107,7 @@ public: }; public: - // @brief Set scalar weight + /// @brief Set scalar weight template void setOperand(const ann::OperandID &id, const T &value) { static_assert(std::is_arithmetic::value, "T should be arithmetic"); @@ -116,7 +116,7 @@ public: _module->operand()->at(id)->weight(weight); } - // @brief Set non-scalar weight + /// @brief Set non-scalar weight template void setOperand(const ann::OperandID &id, It beg, It end) { auto weight = _module->weight()->create(); @@ -132,11 +132,13 @@ public: } public: - // @brief Identify a sequence of coco::Bag * as subnet's inputs - // - // NOTE 1. This method takes input iterator over coco::Bag * values - // NOTE 2. All the identifyInputs class except the last one will be ignored if there are - // multiple identifyInputs calls + /** + * @brief Identify a sequence of coco::Bag * as subnet's inputs + * + * NOTE 1. This method takes input iterator over coco::Bag * values + * NOTE 2. All the identifyInputs class except the last one will be ignored if there are + * multiple identifyInputs calls + */ template void identifyInputs(It beg, It end) { _inputs.clear(); @@ -156,11 +158,13 @@ public: } public: - // @brief Identify a sequence of coco::Bag * as subnet's outputs - // - // NOTE 1. This method takes input iterator over coco::Bag * values - // NOTE 2. All the identifyOutputs class except the last one will be ignored if there are - // multiple identifyOutputs calls + /** + * @brief Identify a sequence of coco::Bag * as subnet's outputs + * + * NOTE 1. This method takes input iterator over coco::Bag * values + * NOTE 2. All the identifyOutputs class except the last one will be ignored if there are + * multiple identifyOutputs calls + */ template void identifyOutputs(It beg, It end) { _outputs.clear(); @@ -208,7 +212,7 @@ private: std::vector _outputs; private: - // @brief Operand ID assigned for each coco::Bag + /// @brief Operand ID assigned for each coco::Bag std::map _operands; }; diff --git a/contrib/enco/core/src/CppCode.cpp b/contrib/enco/core/src/CppCode.cpp index 7fd1485..aa5ef31 100644 --- a/contrib/enco/core/src/CppCode.cpp +++ b/contrib/enco/core/src/CppCode.cpp @@ -40,10 +40,10 @@ namespace struct SubnetInfo { std::string struct_name; - // @brief The field name (in this subnet struct) of ANeuralNetworksCompilation value + /// @brief The field name (in this subnet struct) of ANeuralNetworksCompilation value std::string compilation_field; - // @brief The field name (in Network struct) for this subnet + /// @brief The field name (in Network struct) for this subnet std::string field_name; }; diff --git a/contrib/enco/core/src/CppGen/Subnet.h b/contrib/enco/core/src/CppGen/Subnet.h index 0c9b1cb..4a57388 100644 --- a/contrib/enco/core/src/CppGen/Subnet.h +++ b/contrib/enco/core/src/CppGen/Subnet.h @@ -34,9 +34,9 @@ struct SubnetStruct { virtual ~SubnetStruct() = default; - // @brief Return the field name of ANeuralNetworksModel value + /// @brief Return the field name of ANeuralNetworksModel value virtual std::string model(void) const = 0; - // @brief Return the field name of ANeuralNetworksCompilatoin value + /// @brief Return the field name of ANeuralNetworksCompilatoin value virtual std::string compilation(void) const = 0; virtual const pp::MultiLineText &def(void) const = 0; @@ -75,7 +75,7 @@ public: } public: - // @brief Specify how to access ANeuralNetworksCompilation value (C expression) + /// @brief Specify how to access ANeuralNetworksCompilation value (C expression) void bind(const ANNBinder *binder, const std::string &exp) { _compilation_ctx[binder] = exp; } public: diff --git a/contrib/enco/core/src/Transforms/AvgPoolLowering.cpp b/contrib/enco/core/src/Transforms/AvgPoolLowering.cpp index 68cf452..17502fb 100644 --- a/contrib/enco/core/src/Transforms/AvgPoolLowering.cpp +++ b/contrib/enco/core/src/Transforms/AvgPoolLowering.cpp @@ -84,7 +84,7 @@ public: } public: - // @brief Return the expected OFM shape for a given IFM shape + /// @brief Return the expected OFM shape for a given IFM shape feature::Shape forward(const feature::Shape &ifm_shape) const { const uint32_t OFM_C = ifm_shape.depth(); diff --git a/contrib/enco/core/src/Transforms/DeadBagElimination.cpp b/contrib/enco/core/src/Transforms/DeadBagElimination.cpp index 8c0dd7a..b3c598a 100644 --- a/contrib/enco/core/src/Transforms/DeadBagElimination.cpp +++ b/contrib/enco/core/src/Transforms/DeadBagElimination.cpp @@ -21,10 +21,10 @@ namespace { -// @brief Return true if a given bag is marked as either input or output +/// @brief Return true if a given bag is marked as either input or output bool is_public(const coco::Bag *b) { return b->isInput() || b->isOutput(); } -// @brief Return the set of "dead" bags in a given module +/// @brief Return the set of "dead" bags in a given module std::set dead_bags(const coco::Module *m) { std::set res; diff --git a/contrib/enco/core/src/Transforms/GlobalDataGeneration.cpp b/contrib/enco/core/src/Transforms/GlobalDataGeneration.cpp index 5c254b6..20ac2a0 100644 --- a/contrib/enco/core/src/Transforms/GlobalDataGeneration.cpp +++ b/contrib/enco/core/src/Transforms/GlobalDataGeneration.cpp @@ -39,13 +39,13 @@ public: } public: - // @brief Create a global constant string (const char *) literal, and return variable name + /// @brief Create a global constant string (const char *) literal, and return variable name enco::GlobalOffset constant(const std::string &value); - // @brief Create a global constant array variable of type T + /// @brief Create a global constant array variable of type T template enco::GlobalOffset constant(const std::vector &values); - // @brief Create a global constant array variable of byte (uint8_t) type + /// @brief Create a global constant array variable of byte (uint8_t) type enco::GlobalOffset constant(const uint8_t *base, uint32_t size); private: diff --git a/contrib/enco/frontend/caffe/src/ConcatSpec.h b/contrib/enco/frontend/caffe/src/ConcatSpec.h index 0370bf8..cc636c7 100644 --- a/contrib/enco/frontend/caffe/src/ConcatSpec.h +++ b/contrib/enco/frontend/caffe/src/ConcatSpec.h @@ -32,8 +32,10 @@ public: } public: - // @brief Return the output shape when inputs of given shape are - // concatenated along _axis + /** + * @brief Return the output shape when inputs of given shape are + * concatenated along _axis + */ nncc::core::ADT::tensor::Shape forward(const ShapeList &) const; private: diff --git a/contrib/enco/frontend/caffe/src/ShapeQuery.h b/contrib/enco/frontend/caffe/src/ShapeQuery.h index dda1659..260b6ad 100644 --- a/contrib/enco/frontend/caffe/src/ShapeQuery.h +++ b/contrib/enco/frontend/caffe/src/ShapeQuery.h @@ -63,7 +63,7 @@ public: } public: - // @brief Return the dimension number (axis) specified by a given axis specifier + /// @brief Return the dimension number (axis) specified by a given axis specifier uint32_t axis(const AxisSpecifier &) const; private: -- 2.7.4