Class TensorCachingByShapeAllocator | Barracuda | 0.7.1-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class TensorCachingByShapeAllocator

    Inheritance
    Object
    TensorCachingByShapeAllocator
    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 TensorCachingByShapeAllocator : ITensorAllocator, IDisposable

    Constructors

    TensorCachingByShapeAllocator()

    Declaration
    public TensorCachingByShapeAllocator()

    Properties

    busyBytes

    Declaration
    public long busyBytes { get; }
    Property Value
    Type Description
    Int64

    freeBytes

    Declaration
    public long freeBytes { get; }
    Property Value
    Type Description
    Int64

    totalBytes

    Declaration
    public long totalBytes { get; }
    Property Value
    Type Description
    Int64

    Methods

    AddRef(ITensorData)

    Declaration
    protected void AddRef(ITensorData buffer)
    Parameters
    Type Name Description
    ITensorData buffer

    AdoptFreeBuffer(TensorShape, ITensorData)

    Declaration
    protected void AdoptFreeBuffer(TensorShape shape, ITensorData buffer)
    Parameters
    Type Name Description
    TensorShape shape
    ITensorData buffer

    Alloc(TensorShape)

    Declaration
    public virtual Tensor Alloc(TensorShape shape)
    Parameters
    Type Name Description
    TensorShape shape
    Returns
    Type Description
    Tensor
    Implements
    ITensorAllocator.Alloc(TensorShape)

    Alloc(TensorShape, ITensorData)

    Declaration
    public virtual Tensor Alloc(TensorShape shape, ITensorData buffer)
    Parameters
    Type Name Description
    TensorShape shape
    ITensorData buffer
    Returns
    Type Description
    Tensor
    Implements
    ITensorAllocator.Alloc(TensorShape, ITensorData)

    Cast(Tensor, ITensorData, ITensorData)

    Declaration
    public virtual void Cast(Tensor tensor, ITensorData newBuffer, ITensorData oldBuffer)
    Parameters
    Type Name Description
    Tensor tensor
    ITensorData newBuffer
    ITensorData oldBuffer
    Implements
    ITensorAllocator.Cast(Tensor, ITensorData, ITensorData)

    DecRef(ITensorData, Action<ITensorData>)

    Declaration
    protected void DecRef(ITensorData buffer, Action<ITensorData> onLastRef = null)
    Parameters
    Type Name Description
    ITensorData buffer
    Action<ITensorData> onLastRef

    Dispose()

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

    Finalize()

    Declaration
    protected void Finalize()

    Release(Tensor, Boolean)

    Declaration
    public virtual void Release(Tensor tensor, bool calledFromTensorDispose)
    Parameters
    Type Name Description
    Tensor tensor
    Boolean calledFromTensorDispose
    Implements
    ITensorAllocator.Release(Tensor, Boolean)

    Repin(Tensor, ITensorData, ITensorData, Boolean)

    Declaration
    public virtual void Repin(Tensor tensor, ITensorData newBuffer, ITensorData oldBuffer, bool disposeUnpinnedHint)
    Parameters
    Type Name Description
    Tensor tensor
    ITensorData newBuffer
    ITensorData oldBuffer
    Boolean disposeUnpinnedHint
    Implements
    ITensorAllocator.Repin(Tensor, ITensorData, ITensorData, Boolean)

    Reset(Boolean)

    Declaration
    public virtual void Reset(bool keepCachedMemory)
    Parameters
    Type Name Description
    Boolean keepCachedMemory
    Implements
    ITensorAllocator.Reset(Boolean)

    ToString()

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

    WaiveOwnership(Tensor)

    Declaration
    public virtual void WaiveOwnership(Tensor tensor)
    Parameters
    Type Name Description
    Tensor tensor
    Implements
    ITensorAllocator.WaiveOwnership(Tensor)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023