docs.unity3d.com
    Show / Hide Table of Contents

    Class WaitForCompletion

    Provides methods for suspending the execution of coroutines until the worker completes execution on a device, and Sentis downloads the contents of the specified tensor to the main CPU memory.

    You usually shouldn't use WaitForCompletion, unless you access tensor contents on the CPU.

    You can only use WaitForCompletion with a yield statement in coroutines.

    Inheritance
    Object
    CustomYieldInstruction
    WaitForCompletion
    Inherited Members
    UnityEngine.CustomYieldInstruction.MoveNext()
    UnityEngine.CustomYieldInstruction.Reset()
    UnityEngine.CustomYieldInstruction.Current
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Sentis
    Syntax
    public class WaitForCompletion : CustomYieldInstruction, IEnumerator

    Constructors

    WaitForCompletion(Tensor)

    Suspends the execution of coroutines until the worker completes execution on a device, and Sentis downloads the contents of the specified tensor to the main CPU memory.

    Declaration
    public WaitForCompletion(Tensor tensor)
    Parameters
    Type Name Description
    Tensor tensor

    Tensor that will be downloaded once worker execution is finished

    Properties

    keepWaiting

    Checks if the results of model execution are ready. Returns true when the results are ready.

    Declaration
    public override bool keepWaiting { get; }
    Property Value
    Type Description
    Boolean
    Overrides
    CustomYieldInstruction.keepWaiting
    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