| 82 | |
| 83 | #if ENABLE_INST_SUBTENSOR |
| 84 | static TinyNNStatus parse_subtensor(IndexDesc** descs, flatbuffers_generic_t fbs_desc) { |
| 85 | int nr_desc = ns(IndexDesc_vec_len(fbs_desc)); |
| 86 | IndexDesc* ptr = tinynn_malloc(sizeof(IndexDesc) * nr_desc); |
| 87 | *descs = ptr; |
| 88 | for (int i = 0; i < nr_desc; i++) { |
| 89 | ns(IndexDesc_table_t) fbs_index_desc = ns(IndexDesc_vec_at(fbs_desc, i)); |
| 90 | ptr[i].axis = ns(IndexDesc_axis(fbs_index_desc)); |
| 91 | ptr[i].start = ns(IndexDesc_start(fbs_index_desc)); |
| 92 | ptr[i].end = ns(IndexDesc_end(fbs_index_desc)); |
| 93 | ptr[i].step = ns(IndexDesc_step(fbs_index_desc)); |
| 94 | ptr[i].index = ns(IndexDesc_index(fbs_index_desc)); |
| 95 | } |
| 96 | return TinyNN_SUCCESS; |
| 97 | } |
| 98 | |
| 99 | static TinyNNStatus load_subtensor( |
| 100 | flatbuffers_generic_t fbs_inst, Instruction* inst, VM* vm) { |
no test coverage detected