| 191 | } |
| 192 | |
| 193 | int LITE_get_tensor_layout(const LiteTensor tensor, LiteLayout* layout) { |
| 194 | LITE_CAPI_BEGIN(); |
| 195 | LITE_ASSERT(tensor, "The tensor pass to LITE c_api is null"); |
| 196 | LITE_ASSERT(layout, "The layout ptr pass to LITE c_api is null"); |
| 197 | *layout = convert_to_clayout(static_cast<lite::Tensor*>(tensor)->get_layout()); |
| 198 | LITE_CAPI_END(); |
| 199 | } |
| 200 | |
| 201 | int LITE_get_tensor_device_type(const LiteTensor tensor, LiteDeviceType* device_type) { |
| 202 | LITE_CAPI_BEGIN(); |