};
public:
- // @brief Set scalar weight
+ /// @brief Set scalar weight
template <typename T> void setOperand(const ann::OperandID &id, const T &value)
{
static_assert(std::is_arithmetic<T>::value, "T should be arithmetic");
_module->operand()->at(id)->weight(weight);
}
- // @brief Set non-scalar weight
+ /// @brief Set non-scalar weight
template <typename It> void setOperand(const ann::OperandID &id, It beg, It end)
{
auto weight = _module->weight()->create();
}
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 <typename It> void identifyInputs(It beg, It end)
{
_inputs.clear();
}
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 <typename It> void identifyOutputs(It beg, It end)
{
_outputs.clear();
std::vector<coco::Bag *> _outputs;
private:
- // @brief Operand ID assigned for each coco::Bag
+ /// @brief Operand ID assigned for each coco::Bag
std::map<coco::Bag *, ann::OperandID> _operands;
};
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;
};
{
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;
}
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:
}
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();
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<coco::Bag *> dead_bags(const coco::Module *m)
{
std::set<coco::Bag *> res;
}
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 <typename T> enco::GlobalOffset constant(const std::vector<T> &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:
}
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:
}
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: