docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BurstTensorData

    Represents Burst-specific internal data storage for a Tensor.

    Inheritance
    object
    BurstTensorData
    Implements
    ITensorData
    IDisposable
    IDependableMemoryResource
    IConvertibleToComputeTensorData
    IConvertibleToArrayTensorData
    IReadableTensorData
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Sentis
    Assembly: solution.dll
    Syntax
    public class BurstTensorData : ITensorData, IDisposable, IDependableMemoryResource, IConvertibleToComputeTensorData, IConvertibleToArrayTensorData, IReadableTensorData

    Constructors

    Name Description
    BurstTensorData(ArrayTensorData)

    Initializes and returns an instance of BurstTensorData from an ArrayTensorData.

    BurstTensorData(SharedArrayTensorData)

    Initializes and returns an instance of BurstTensorData from a SharedArrayTensorData.

    BurstTensorData(TensorShape, Array)

    Initializes and returns an instance of BurstTensorData from a TensorShape and an Array.

    BurstTensorData(TensorShape, bool)

    Initializes and returns an instance of BurstTensorData, and allocates storage for a tensor with the shape of shape.

    BurstTensorData(TensorShape, NativeTensorArray, int)

    Initializes and returns an instance of BurstTensorData from a NativeTensorArray and an offset.

    Properties

    Name Description
    array

    The NativeTensorArray managed array containing the Tensor data.

    count

    The length of the tensor using this data.

    deviceType

    On what device backend are the data elements stored.

    fence

    A read fence job handle. You can use fence as a dependsOn argument when you schedule a job that reads data. The job will start when the tensor data is ready for read access.

    maxCapacity

    The maximum count of the stored data elements.

    offset

    The integer offset for the backing data.

    rawPtr

    The raw memory pointer for the resource.

    reuse

    A write fence job handle. You can use reuse as a dependsOn argument when you schedule a job that reads data. The job will start when the tensor data is ready for write access.

    shape

    The shape of the tensor using this data as a TensorShape.

    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 ArrayTensorData.

    ConvertToComputeTensorData(TensorShape)

    Implement this method to convert to ComputeTensorData.

    Dispose()

    Disposes of the BurstTensorData and any associated memory.

    Download<T>(int, int)

    Returns data from internal storage.

    ~BurstTensorData()

    Finalizes the BurstTensorData.

    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.

    Pin(Tensor, bool)

    Moves a tensor into memory on the CPU backend device.

    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 storage for count elements.

    Set<T>(int, T)

    Sets value data element at index.

    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 BurstTensorData.

    Upload<T>(NativeArray<T>, int, int)

    Uploads data to internal storage.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)