docs.unity3d.com
    Show / Hide Table of Contents

    Class WorkerExtensions

    Provides extension methods for the IWorker interface.

    Inheritance
    Object
    WorkerExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Sentis
    Syntax
    public static class WorkerExtensions

    Methods

    ExecuteWorker(CommandBuffer, IWorker, Dictionary<String, Tensor>)

    Non-blocking API that schedules network execution on CommandBuffer in one go.

    Declaration
    public static void ExecuteWorker(this CommandBuffer cb, IWorker worker, Dictionary<string, Tensor> inputs)
    Parameters
    Type Name Description
    CommandBuffer cb

    CommandBuffer

    IWorker worker

    IWorker

    Dictionary<String, Tensor> inputs

    input Tensors

    ExecuteWorker(CommandBuffer, IWorker, Tensor)

    Non-blocking API that schedules network execution on CommandBuffer in one go.

    Declaration
    public static void ExecuteWorker(this CommandBuffer cb, IWorker worker, Tensor input)
    Parameters
    Type Name Description
    CommandBuffer cb

    CommandBuffer

    IWorker worker

    IWorker

    Tensor input

    Input Tensor

    FinishExecutionAndDownloadOutput(IWorker, String)

    Returns a CPU copy of the first output tensor. This is a blocking method, so the rest of your code waits until the model fully executes.

    Declaration
    public static Tensor FinishExecutionAndDownloadOutput(this IWorker worker, string name = null)
    Parameters
    Type Name Description
    IWorker worker
    String name
    Returns
    Type Description
    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