docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NativeTensorArray

    Represents an area of native memory that's exposed to managed code.

    Inheritance
    object
    NativeTensorArray
    NativeTensorArrayFromManagedArray
    Implements
    IDisposable
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Sentis
    Assembly: solution.dll
    Syntax
    public class NativeTensorArray : IDisposable

    Constructors

    Name Description
    NativeTensorArray(int, bool, Allocator)

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

    NativeTensorArray(SafeHandle, int)

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

    Properties

    Name Description
    Disposed

    Whether the backing data is disposed.

    Length

    The number of allocated elements.

    LongLength

    The number of allocated elements as a 64-bit integer.

    RawPtr

    The raw pointer of the backing data.

    SizeOfType

    The size in bytes of an element of the stored type.

    Methods

    Name Description
    AddressAt<T>(long)

    Returns the raw pointer of the backing data at a given index.

    AsReadOnlySpan<T>(int, int)

    Returns the data as a ReadOnlySpan.

    BlockCopy(byte[], int, NativeTensorArray, int, int)

    Copies the data from a source byte array to a destination NativeTensorArray up to a given length starting from given offsets.

    BlockCopy(NativeTensorArray, int, byte[], int, int)

    Copies the data from a source NativeTensorArray to a destination byte array up to a given length starting from given offsets.

    Copy(NativeTensorArray, int, NativeTensorArray, int, int)

    Copies the data from a source NativeTensorArray to a destination NativeTensorArray up to a given length starting from given indexes.

    Copy(NativeTensorArray, NativeTensorArray, int, int)

    Copies the data from a source NativeTensorArray to a destination NativeTensorArray up to a given length.

    CopyTo(NativeTensorArray, int)

    Copies all of the data to a NativeTensorArray starting from a given offset.

    Copy<T>(NativeArray<T>, int, NativeTensorArray, int, int)

    Copies the data from a source NativeArray to a destination array up to a given length starting from given indexes.

    Copy<T>(NativeArray<T>, NativeTensorArray, int, int)

    Copies the data from a source array to a destination NativeTensorArray up to a given length.

    Copy<T>(ReadOnly, int, NativeTensorArray, int, int)

    Copies the data from a source NativeArray to a destination array up to a given length starting from given indexes.

    Copy<T>(NativeTensorArray, int, NativeArray<T>, int, int)

    Copies the data from a source NativeTensorArray to a destination array up to a given length starting from given indexes.

    Copy<T>(NativeTensorArray, int, T[], int, int)

    Copies the data from a source NativeTensorArray to a destination array up to a given length starting from given indexes.

    Copy<T>(NativeTensorArray, T[], int, int)

    Copies the data from a source array to a destination array up to a given length.

    Copy<T>(T[], int, NativeTensorArray, int, int)

    Copies the data from a source array to a destination NativeTensorArray up to a given length starting from given indexes.

    Copy<T>(T[], NativeTensorArray, int, int)

    Copies the data from a source array to a destination NativeTensorArray up to a given length.

    DataItemSize()

    Gets the size in bytes of an individual element.

    Dispose()

    Disposes of the array and any associated memory.

    GetNativeArrayHandle<T>()

    Returns the data converted to a NativeArray.

    GetReadOnlyNativeArrayHandle<T>(int, int)

    Returns the data as a NativeArray constrained to read only operations.

    Get<T>(int)

    Returns the value of the backing data at a given index.

    Set<T>(int, T)

    Sets the value of the backing data at a given index.

    ToArray<T>(int, int)

    Returns the data as an array.

    ZeroMemory()

    Clears the allocated memory to zero.

    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)