#include "frontend/wrapper/model.h"
#include "frontend/wrapper/memory.h"
#include "model/operation/Node.Include.h"
-#include "util/TypeConvert.h"
+#include "util/NNAPIConvert.h"
#include "util/logging.h"
int ANeuralNetworksModel_create(ANeuralNetworksModel **model)
#include "execution.h"
-#include "util/TypeConvert.h"
+#include "util/NNAPIConvert.h"
const neurun::model::operand::Index ANeuralNetworksExecution::getInputOperandIndex(int32_t index)
{
const neurun::model::operand::Index index)
{
const auto operand_type = _executor->plan().model().operands().at(index).typeInfo();
- const auto typeInfo = ::neurun::util::typeInfoFromOperandType(type);
+ const auto typeInfo = ::neurun::util::getTypeInfo(type);
if (operand_type != typeInfo)
{
#include "graph/Graph.h"
#include "util/logging.h"
-#include "util/TypeConvert.h"
+#include "util/NNAPIConvert.h"
//
// ANeuralNetworksModel
try
{
::neurun::model::operand::Shape shape(type->dimensionCount);
- auto typeInfo = neurun::util::typeInfoFromOperandType(type);
+ auto typeInfo = neurun::util::getTypeInfo(type);
for (uint32_t axis = 0; axis < type->dimensionCount; ++axis)
{
* limitations under the License.
*/
-#include "TypeConvert.h"
+#include "NNAPIConvert.h"
namespace neurun
{
namespace util
{
-model::operand::DataType typeFromOperandCode(OperandCode type)
+model::operand::DataType getDataType(OperandCode type)
{
// Now neurun::model::operand::DataType shares the same enum value with OperandCode
// in NeuralNetworks.h.
return static_cast<model::operand::DataType>(static_cast<uint32_t>(type));
}
-const model::operand::TypeInfo typeInfoFromOperandType(const ANeuralNetworksOperandType *type)
+const model::operand::TypeInfo getTypeInfo(const ANeuralNetworksOperandType *type)
{
- return model::operand::TypeInfo(typeFromOperandCode((OperandCode)(type->type)), type->scale,
+ return model::operand::TypeInfo(getDataType((OperandCode)(type->type)), type->scale,
type->zeroPoint);
}
-const model::operand::Shape shapeFromOperandType(const ANeuralNetworksOperandType *type)
+const model::operand::Shape getShape(const ANeuralNetworksOperandType *type)
{
model::operand::Shape shape(type->dimensionCount);
*/
/**
- * @file TypeConvert.h
+ * @file NNAPIConvert.h
* @brief This file contains convereter(s)\n
- * from frontend's data type to neurun's internal data type
+ * from NNAPI frontend's struct to neurun's internal struct
*/
-#ifndef __NEURUN_UTIL_TYPE_CONVERT_H__
-#define __NEURUN_UTIL_TYPE_CONVERT_H__
+#ifndef __NEURUN_UTIL_NNAPI_CONVERT_H__
+#define __NEURUN_UTIL_NNAPI_CONVERT_H__
#include <NeuralNetworks.h>
with OperandCode in NeuralNetworks.h.\n
If we don't share same value, we must fix this mapping function.
*/
-model::operand::DataType typeFromOperandCode(OperandCode type);
+model::operand::DataType getDataType(OperandCode type);
/**
* @brief Convert operand type info from NNAPI to interanl operand type info
- * @param[in] type NNAPI;s operand type
+ * @param[in] type NNAPI's operand type
* @return neurun's internal operand type info
*/
-const model::operand::TypeInfo typeInfoFromOperandType(const ANeuralNetworksOperandType *type);
+const model::operand::TypeInfo getTypeInfo(const ANeuralNetworksOperandType *type);
/**
* @brief Convert operand shape info from NNAPI to internal operand shape
* @param[in] type NNAPI's operand type
* @return neurun's internal operand shape
*/
-const model::operand::Shape shapeFromOperandType(const ANeuralNetworksOperandType *type);
+const model::operand::Shape getShape(const ANeuralNetworksOperandType *type);
} // namespace neurun
} // namespace util
-#endif // __NEURUN_UTIL_TYPE_CONVERT_H__
+#endif // __NEURUN_UTIL_NNAPI_CONVERT_H__