forked from alibaba/MNN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUtils.hpp
33 lines (32 loc) · 939 Bytes
/
Utils.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// Utils.hpp
// MNN
//
// Created by MNN on 2019/07/26.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef Utils_hpp
#define Utils_hpp
#include <MNN/expr/Expr.hpp>
#include <MNN/Tensor.hpp>
#include <MNN/expr/Executor.hpp>
namespace MNN {
namespace Express {
struct Expr::Inside {
std::vector<const Variable::Info*> mInputInfos;
std::vector<Variable::Info> mOutputInfos;
Executor::Requirement mReq;
std::shared_ptr<Executor::ComputeCache> mCache;
};
class Utils {
public:
static void copyInfoToTensor(Tensor* dest, const Variable::Info* source);
static void copyTensorToInfo(Variable::Info* dest, const Tensor* source);
static int convertDataType(halide_type_t type);
static int convertFormat(Dimensionformat format);
static Express::Dimensionformat revertFormat(int format);
static halide_type_t revertDataType(int dataType);
};
} // namespace Express
} // namespace MNN
#endif