update the member from C, this will auto used after slice, share
(self)
| 341 | return length.value |
| 342 | |
| 343 | def update(self): |
| 344 | """ |
| 345 | update the member from C, this will auto used after slice, share |
| 346 | """ |
| 347 | pinned = c_int() |
| 348 | self._api.LITE_is_pinned_host(self._tensor, byref(pinned)) |
| 349 | self._is_pinned_host = pinned |
| 350 | device_type = c_int() |
| 351 | self._api.LITE_get_tensor_device_type(self._tensor, byref(device_type)) |
| 352 | self._device_type = device_type |
| 353 | self._api.LITE_get_tensor_layout(self._tensor, byref(self._layout)) |
| 354 | |
| 355 | c_types = _lite_dtypes_to_ctype[self._layout.data_type] |
| 356 | self.np_array_type = np.ctypeslib._ctype_ndarray( |
| 357 | c_types, list(self._layout.shapes)[0 : self._layout.ndim] |
| 358 | ) |
| 359 | |
| 360 | def copy_from(self, src_tensor): |
| 361 | """ |
no test coverage detected