docs.unity3d.com
    Show / Hide Table of Contents

    Interface ITensorData

    An interface that represents a device-dependent representation of the data in a tensor.

    Inherited Members
    IDisposable.Dispose()
    Namespace: Unity.Sentis
    Syntax
    public interface ITensorData : IDisposable

    Properties

    deviceType

    On what device backend are the data elements stored

    Declaration
    DeviceType deviceType { get; }
    Property Value
    Type Description
    DeviceType

    maxCapacity

    The maximum count of the stored data elements.

    Declaration
    int maxCapacity { get; }
    Property Value
    Type Description
    Int32

    Methods

    Download<T>(Int32, Int32)

    Returns data from internal storage.

    Declaration
    T[] Download<T>(int dstCount, int srcOffset = 0)
        where T : struct
    Parameters
    Type Name Description
    Int32 dstCount
    Int32 srcOffset
    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T

    Reserve(Int32)

    Reserves memory for count elements.

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

    ScheduleAsyncDownload()

    Schedules asynchronous download of the internal data.

    Declaration
    bool ScheduleAsyncDownload()
    Returns
    Type Description
    Boolean

    Upload<T>(T[], Int32, Int32)

    Uploads the tensor data to internal storage.

    Declaration
    void Upload<T>(T[] data, int srcCount, int srcOffset = 0)
        where T : struct
    Parameters
    Type Name Description
    T[] data
    Int32 srcCount
    Int32 srcOffset
    Type Parameters
    Name Description
    T
    In This Article
    • Properties
      • deviceType
      • maxCapacity
    • Methods
      • Download<T>(Int32, Int32)
      • Reserve(Int32)
      • ScheduleAsyncDownload()
      • Upload<T>(T[], Int32, Int32)
    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