docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor NativeTensorArray

    NativeTensorArray(SafeHandle, int)

    Initializes and returns an instance of NativeTensorArray with a preexisting handle.

    Declaration
    protected NativeTensorArray(SafeHandle safeHandle, int dataLength)
    Parameters
    Type Name Description
    SafeHandle safeHandle

    The safe handle to the data.

    int dataLength

    The integer number of elements.

    NativeTensorArray(int, bool, Allocator)

    Initializes and returns an instance of NativeTensorArray with a given length.

    Declaration
    public NativeTensorArray(int length, bool clearOnInit = false, Allocator allocator = Allocator.Persistent)
    Parameters
    Type Name Description
    int length

    The integer number of elements to allocate.

    bool clearOnInit

    Whether to zero the data after allocating.

    Allocator allocator

    The allocation type to use as an Allocator.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)