Interface ITensorAllocator | Barracuda | 1.0.4
docs.unity.cn
    Show / Hide Table of Contents

    Interface ITensorAllocator

    Interfaces for tensor allocator

    Inherited Members
    IDisposable.Dispose()
    Namespace: Unity.Barracuda
    Syntax
    public interface ITensorAllocator : IDisposable

    Methods

    Alloc(TensorShape)

    Declaration
    Tensor Alloc(TensorShape shape)
    Parameters
    Type Name Description
    TensorShape shape
    Returns
    Type Description
    Tensor

    Alloc(TensorShape, ITensorData)

    Declaration
    Tensor Alloc(TensorShape shape, ITensorData buffer)
    Parameters
    Type Name Description
    TensorShape shape
    ITensorData buffer
    Returns
    Type Description
    Tensor

    MoveToDevice(Tensor, ITensorData, ITensorData, Boolean)

    Declaration
    void MoveToDevice(Tensor x, ITensorData newBuffer, ITensorData oldBuffer, bool disposeDetachedBufferHint)
    Parameters
    Type Name Description
    Tensor x
    ITensorData newBuffer
    ITensorData oldBuffer
    Boolean disposeDetachedBufferHint

    Release(Tensor, Boolean)

    Declaration
    void Release(Tensor x, bool calledFromTensorDispose)
    Parameters
    Type Name Description
    Tensor x
    Boolean calledFromTensorDispose

    Reset(Boolean)

    Declaration
    void Reset(bool keepCachedMemory)
    Parameters
    Type Name Description
    Boolean keepCachedMemory

    WaiveOwnership(Tensor)

    Declaration
    void WaiveOwnership(Tensor x)
    Parameters
    Type Name Description
    Tensor x
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 20 October 2020