docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor BurstTensorData

    BurstTensorData(TensorShape, bool)

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

    Declaration
    public BurstTensorData(TensorShape shape, bool clearOnInit = false)
    Parameters
    Type Name Description
    TensorShape shape

    The shape of the tensor data to allocate.

    bool clearOnInit

    Whether to zero the data on allocation. The default value is false.

    BurstTensorData(ArrayTensorData)

    Initializes and returns an instance of BurstTensorData from an ArrayTensorData.

    Declaration
    public BurstTensorData(ArrayTensorData sharedArray)
    Parameters
    Type Name Description
    ArrayTensorData sharedArray

    The ArrayTensorData to convert.

    BurstTensorData(SharedArrayTensorData)

    Initializes and returns an instance of BurstTensorData from a SharedArrayTensorData.

    Declaration
    public BurstTensorData(SharedArrayTensorData sharedArray)
    Parameters
    Type Name Description
    SharedArrayTensorData sharedArray

    The SharedArrayTensorData to convert.

    BurstTensorData(TensorShape, Array)

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

    Declaration
    public BurstTensorData(TensorShape shape, Array data)
    Parameters
    Type Name Description
    TensorShape shape

    The shape of the tensor data.

    Array data

    The values of the tensor data as an Array.

    BurstTensorData(TensorShape, NativeTensorArray, int)

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

    Declaration
    public BurstTensorData(TensorShape shape, NativeTensorArray data, int offset = 0)
    Parameters
    Type Name Description
    TensorShape shape

    The shape of the tensor data.

    NativeTensorArray data

    The values of the tensor data as a NativeTensorArray.

    int offset

    The integer offset for the backing data.

    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)