| 22 | using namespace MNN::Express; |
| 23 | using namespace MNN; |
| 24 | static std::string _getDataType(const halide_type_t& type) { |
| 25 | switch (type.code) { |
| 26 | case halide_type_float: |
| 27 | if (type.bits == 32) { |
| 28 | return "float"; |
| 29 | } |
| 30 | if (type.bits == 16) { |
| 31 | return "half"; |
| 32 | } |
| 33 | break; |
| 34 | case halide_type_uint: |
| 35 | if (type.bits == 32) { |
| 36 | return "uint32"; |
| 37 | } |
| 38 | if (type.bits == 16) { |
| 39 | return "uint16"; |
| 40 | } |
| 41 | if (type.bits == 8) { |
| 42 | return "uint8"; |
| 43 | } |
| 44 | break; |
| 45 | case halide_type_int: |
| 46 | if (type.bits == 32) { |
| 47 | return "int32"; |
| 48 | } |
| 49 | if (type.bits == 16) { |
| 50 | return "int16"; |
| 51 | } |
| 52 | if (type.bits == 8) { |
| 53 | return "int8"; |
| 54 | } |
| 55 | break; |
| 56 | default: |
| 57 | break; |
| 58 | } |
| 59 | return "Unknown"; |
| 60 | } |
| 61 | static std::string _getFormatString(Dimensionformat format) { |
| 62 | switch (format) { |
| 63 | case MNN::Express::NCHW: |