| 26 | TinyNNStatus init_model_memory(CombineModel* model); |
| 27 | |
| 28 | static inline int dtype_length(TinyNNDType dtype, TinyNNStatus* error) { |
| 29 | switch (dtype) { |
| 30 | case TinyNN_FLOAT: |
| 31 | case TinyNN_INT: |
| 32 | case TinyNN_QINT32: |
| 33 | return 4; |
| 34 | case TinyNN_FLOAT16: |
| 35 | case TinyNN_INT16: |
| 36 | return 2; |
| 37 | case TinyNN_INT8: |
| 38 | case TinyNN_UINT8: |
| 39 | case TinyNN_QINT8: |
| 40 | return 1; |
| 41 | default: { |
| 42 | LOG_ERROR("no support data type. enum value is %d\n", (int)dtype); |
| 43 | if (error) |
| 44 | *error = TinyNN_ERROR_NO_IMPLEMENT; |
| 45 | } |
| 46 | } |
| 47 | tinynn_trap(); |
| 48 | } |
| 49 | |
| 50 | static inline size_t tensor_length_in_byte(const Tensor* tensor) { |
| 51 | Layout layout = tensor->layout; |
no outgoing calls
no test coverage detected