Class ComputeTensorData | Barracuda | 1.1.2-preview
docs.unity.cn
    Show / Hide Table of Contents

    Class ComputeTensorData

    Inheritance
    Object
    ComputeTensorData
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Barracuda
    Syntax
    public class ComputeTensorData : ITensorData, IDisposable

    Constructors

    ComputeTensorData(TensorShape, String, ComputeInfo.ChannelsOrder, Boolean)

    Declaration
    public ComputeTensorData(TensorShape shape, string buffername, ComputeInfo.ChannelsOrder onDeviceChannelsOrder, bool clearOnInit = true)
    Parameters
    Type Name Description
    TensorShape shape
    String buffername
    ComputeInfo.ChannelsOrder onDeviceChannelsOrder
    Boolean clearOnInit

    ComputeTensorData(ComputeBuffer, TensorShape, Int32, String, ComputeInfo.ChannelsOrder)

    Declaration
    public ComputeTensorData(ComputeBuffer buffer, TensorShape shape, int offset, string buffername, ComputeInfo.ChannelsOrder onDeviceChannelsOrder)
    Parameters
    Type Name Description
    ComputeBuffer buffer
    TensorShape shape
    Int32 offset
    String buffername
    ComputeInfo.ChannelsOrder onDeviceChannelsOrder

    Fields

    name

    Declaration
    public string name
    Field Value
    Type Description
    String

    Properties

    buffer

    Declaration
    public ComputeBuffer buffer { get; }
    Property Value
    Type Description
    ComputeBuffer

    channelsOrder

    Declaration
    public ComputeInfo.ChannelsOrder channelsOrder { get; }
    Property Value
    Type Description
    ComputeInfo.ChannelsOrder

    maxCapacity

    Declaration
    public virtual int maxCapacity { get; }
    Property Value
    Type Description
    Int32
    Implements
    ITensorData.maxCapacity

    offset

    Declaration
    public int offset { get; }
    Property Value
    Type Description
    Int32

    Methods

    Dispose()

    Declaration
    public virtual void Dispose()
    Implements
    IDisposable.Dispose()

    Download(TensorShape)

    Declaration
    public virtual float[] Download(TensorShape shape)
    Parameters
    Type Name Description
    TensorShape shape
    Returns
    Type Description
    Single[]
    Implements
    ITensorData.Download(TensorShape)

    Finalize()

    Declaration
    protected void Finalize()

    Reserve(Int32)

    Declaration
    public virtual void Reserve(int count)
    Parameters
    Type Name Description
    Int32 count
    Implements
    ITensorData.Reserve(Int32)

    ScheduleAsyncDownload(Int32)

    Declaration
    public virtual bool ScheduleAsyncDownload(int count)
    Parameters
    Type Name Description
    Int32 count
    Returns
    Type Description
    Boolean
    Implements
    ITensorData.ScheduleAsyncDownload(Int32)

    SharedAccess(out Int32)

    Declaration
    public virtual float[] SharedAccess(out int offset)
    Parameters
    Type Name Description
    Int32 offset
    Returns
    Type Description
    Single[]
    Implements
    ITensorData.SharedAccess(out Int32)

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()

    Upload(Single[], TensorShape, Int32)

    Declaration
    public virtual void Upload(float[] data, TensorShape shape, int managedBufferStartIndex = 0)
    Parameters
    Type Name Description
    Single[] data
    TensorShape shape
    Int32 managedBufferStartIndex
    Implements
    ITensorData.Upload(Single[], TensorShape, Int32)

    Extension Methods

    DeprecatedTensorDataExtensions.GetMaxCount(ITensorData)
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 15 October 2020