docs.unity.cn
    Show / Hide Table of Contents

    Class BurstTensorData

    Burst specific internal Tensor data storage

    Inheritance
    Object
    SharedArrayTensorData
    UnsafeArrayTensorData
    BurstTensorData
    Inherited Members
    SharedArrayTensorData.array
    SharedArrayTensorData.offset
    SharedArrayTensorData.count
    SharedArrayTensorData.maxCapacity
    Namespace: Unity.Barracuda
    Syntax
    public class BurstTensorData : UnsafeArrayTensorData, IDependableTensorData, ITensorData, IDisposable

    Constructors

    BurstTensorData(Int32)

    Creates new array

    Declaration
    public BurstTensorData(int count)
    Parameters
    Type Name Description
    Int32 count

    count

    BurstTensorData(ArrayTensorData)

    Uses shared array

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

    shared array

    BurstTensorData(SharedArrayTensorData)

    Uses shared array

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

    shared array

    BurstTensorData(TensorShape)

    Creates new array

    Declaration
    public BurstTensorData(TensorShape shape)
    Parameters
    Type Name Description
    TensorShape shape

    shape

    BurstTensorData(UnsafeArrayTensorData)

    Uses unsafe array

    Declaration
    public BurstTensorData(UnsafeArrayTensorData unsafeArray)
    Parameters
    Type Name Description
    UnsafeArrayTensorData unsafeArray

    unsafe array

    Properties

    fence

    Read fence

    Declaration
    public JobHandle fence { get; set; }
    Property Value
    Type Description
    JobHandle

    reuse

    Write fence

    Declaration
    public JobHandle reuse { get; set; }
    Property Value
    Type Description
    JobHandle

    Methods

    Dispose()

    Dispose contents

    Declaration
    public override void Dispose()
    Overrides
    UnsafeArrayTensorData.Dispose()

    Download(TensorShape)

    Return data from internal storage

    Declaration
    public override float[] Download(TensorShape shape)
    Parameters
    Type Name Description
    TensorShape shape

    shape

    Returns
    Type Description
    Single[]

    managed array

    Overrides
    UnsafeArrayTensorData.Download(TensorShape)
    Implements
    ITensorData.Download(TensorShape)

    Finalize()

    Finalizer

    Declaration
    protected void Finalize()

    Reserve(Int32)

    Reserve (allocate) storage for count elements

    Declaration
    public override void Reserve(int count)
    Parameters
    Type Name Description
    Int32 count

    count

    Overrides
    UnsafeArrayTensorData.Reserve(Int32)
    Implements
    ITensorData.Reserve(Int32)

    ScheduleAsyncDownload(Int32)

    Schedule async internal data download

    Declaration
    public override bool ScheduleAsyncDownload(int count)
    Parameters
    Type Name Description
    Int32 count

    count to download

    Returns
    Type Description
    Boolean

    true if download is completed

    Overrides
    SharedArrayTensorData.ScheduleAsyncDownload(Int32)
    Implements
    ITensorData.ScheduleAsyncDownload(Int32)

    SharedAccess(out Int32)

    Return shared array from internal storage

    Declaration
    public override float[] SharedAccess(out int offset)
    Parameters
    Type Name Description
    Int32 offset

    offset in returned data array

    Returns
    Type Description
    Single[]

    shared array from internal storage

    Overrides
    SharedArrayTensorData.SharedAccess(out Int32)
    Implements
    ITensorData.SharedAccess(out Int32)

    ToString()

    Object summary as string

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    object summary

    Overrides
    UnsafeArrayTensorData.ToString()

    Upload(Single[], TensorShape, Int32)

    Upload data to internal storage

    Declaration
    public override void Upload(float[] data, TensorShape shape, int managedBufferStartIndex = 0)
    Parameters
    Type Name Description
    Single[] data

    data

    TensorShape shape

    shape

    Int32 managedBufferStartIndex

    data start index

    Overrides
    UnsafeArrayTensorData.Upload(Single[], TensorShape, Int32)
    Implements
    ITensorData.Upload(Single[], TensorShape, Int32)
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Friday, May 14, 2021