Class SharedArrayTensorData
Represents internal Tensor data backed by a managed array and shared between multiple tensors.
Implements
Inherited Members
Namespace: Unity.Sentis
Assembly: solution.dll
Syntax
public class SharedArrayTensorData : ITensorData, IDisposable, IConvertibleToBurstTensorData, IConvertibleToComputeTensorData, IConvertibleToArrayTensorData, IReadableTensorData
Constructors
| Name | Description |
|---|---|
| SharedArrayTensorData(TensorShape, Array) | Initializes and returns an instance of |
| SharedArrayTensorData(TensorShape, NativeTensorArray, int) | Initializes and returns an instance of |
Properties
| Name | Description |
|---|---|
| array | The data storage array |
| count | The number of data elements. |
| deviceType | On what device backend are the data elements stored. |
| maxCapacity | The maximum count of the stored data elements. |
| offset | Offset in the storage array. |
| shape | The shape of the tensor using this data as a |
Methods
| Name | Description |
|---|---|
| Clone() | Returns a deep copy of the internal storage. |
| CompleteAllPendingOperations() | Blocking call to make sure that internal data is correctly written to and available for CPU read back. |
| ConvertToArrayTensorData(TensorShape) | Implement this method to convert to |
| ConvertToBurstTensorData(TensorShape) | Implement this method to convert to |
| ConvertToComputeTensorData(TensorShape) | Implement this method to convert to |
| Dispose() | Disposes of the |
| Download<T>(int, int) | Returns a contiguous block of data from internal storage. |
| ~SharedArrayTensorData() | Finalizes the |
| GetReadOnlyNativeArrayHandle<T>(int, int) | Returns a ReadOnlyNativeArray handle on the linear memory data. |
| Get<T>(int) | Returns a data element. |
| IsReadbackRequestDone() | Checks if asynchronous readback request is done. |
| ReadbackRequest(Action<bool>) | Schedules asynchronous readback of the internal data. |
| ReadbackRequestAsync() | Schedules awaitable asynchronous readback of the internal data. See AsyncReadbackRequest for more info |
| Reserve(int) | Reserves memory for |
| Set<T>(int, T) | Sets |
| ToArray<T>(int, int) | Returns an array that is a copy of the linear memory data. |
| ToReadOnlySpan<T>(int, int) | Returns a ReadOnlySpan on the linear memory data. |
| ToString() | Returns a string that represents the |
| Upload<T>(NativeArray<T>, int, int) | Uploads a contiguous block of tensor data to internal storage. |