convert the C Layout to lite::Layout
| 43 | |
| 44 | //! convert the C Layout to lite::Layout |
| 45 | lite::Layout convert_to_layout(const LiteLayout& clayout) { |
| 46 | lite::Layout layout; |
| 47 | layout.ndim = clayout.ndim; |
| 48 | LITE_ASSERT(layout.ndim < LAYOUT_MAX_DIM, "clayout ndim is to large"); |
| 49 | for (size_t i = 0; i < layout.ndim; i++) { |
| 50 | layout.shapes[i] = clayout.shapes[i]; |
| 51 | } |
| 52 | layout.data_type = clayout.data_type; |
| 53 | return layout; |
| 54 | } |
| 55 | |
| 56 | int LITE_make_tensor(const LiteTensorDesc tensor_describe, LiteTensor* tensor) { |
| 57 | LITE_CAPI_BEGIN(); |
no outgoing calls
no test coverage detected