docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Copy

    Copy(NativeTensorArray, NativeTensorArray, int, int)

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

    Declaration
    public static void Copy(NativeTensorArray sourceArray, NativeTensorArray destinationArray, int length = -1, int srcIndex = 0)
    Parameters
    Type Name Description
    NativeTensorArray sourceArray

    The array to copy from.

    NativeTensorArray destinationArray

    The array to copy to.

    int length

    The number of elements to copy.

    int srcIndex

    The index of the first element to copy from.

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

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

    Declaration
    public static void Copy<T>(T[] sourceArray, NativeTensorArray destinationArray, int length = -1, int srcIndex = 0) where T : unmanaged
    Parameters
    Type Name Description
    T[] sourceArray

    The array to copy from.

    NativeTensorArray destinationArray

    The array to copy to.

    int length

    The number of elements to copy.

    int srcIndex

    The index of the first element to copy from.

    Type Parameters
    Name Description
    T

    The data type of the elements.

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

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

    Declaration
    public static void Copy<T>(NativeArray<T> sourceArray, NativeTensorArray destinationArray, int length = -1, int srcIndex = 0) where T : unmanaged
    Parameters
    Type Name Description
    NativeArray<T> sourceArray

    The array to copy from.

    NativeTensorArray destinationArray

    The array to copy to.

    int length

    The number of elements to copy.

    int srcIndex

    The index of the first element to copy from.

    Type Parameters
    Name Description
    T

    The data type of the elements.

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

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

    Declaration
    public static void Copy<T>(NativeTensorArray sourceArray, T[] destinationArray, int length = -1, int srcIndex = 0) where T : unmanaged
    Parameters
    Type Name Description
    NativeTensorArray sourceArray

    The array to copy from.

    T[] destinationArray

    The array to copy to.

    int length

    The number of elements to copy.

    int srcIndex

    The index of the first element to copy from.

    Type Parameters
    Name Description
    T

    The data type of the elements.

    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.

    Declaration
    public static void Copy(NativeTensorArray sourceArray, int sourceIndex, NativeTensorArray destinationArray, int destinationIndex, int length)
    Parameters
    Type Name Description
    NativeTensorArray sourceArray

    The array to copy from.

    int sourceIndex

    The index of the first element to copy from.

    NativeTensorArray destinationArray

    The array to copy to.

    int destinationIndex

    The index of the first element to copy to.

    int length

    The number of elements.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the given indexes and length are out of bounds of the source or destination array.

    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.

    Declaration
    public static void Copy<T>(NativeTensorArray sourceArray, int sourceIndex, T[] destinationArray, int destinationIndex, int length) where T : unmanaged
    Parameters
    Type Name Description
    NativeTensorArray sourceArray

    The array to copy from.

    int sourceIndex

    The index of the first element to copy from.

    T[] destinationArray

    The array to copy to.

    int destinationIndex

    The index of the first element to copy to.

    int length

    The number of elements.

    Type Parameters
    Name Description
    T

    The data type of the elements.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the given indexes and length are out of bounds of the source or destination array.

    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.

    Declaration
    public static void Copy<T>(NativeTensorArray sourceArray, int sourceIndex, NativeArray<T> destinationArray, int destinationIndex, int length) where T : unmanaged
    Parameters
    Type Name Description
    NativeTensorArray sourceArray

    The array to copy from.

    int sourceIndex

    The index of the first element to copy from.

    NativeArray<T> destinationArray

    The array to copy to.

    int destinationIndex

    The index of the first element to copy to.

    int length

    The number of elements.

    Type Parameters
    Name Description
    T

    The data type of the elements.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the given indexes and length are out of bounds of the source or destination array.

    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.

    Declaration
    public static void Copy<T>(T[] sourceArray, int sourceIndex, NativeTensorArray destinationArray, int destinationIndex, int length) where T : unmanaged
    Parameters
    Type Name Description
    T[] sourceArray

    The array to copy from.

    int sourceIndex

    The index of the first element to copy from.

    NativeTensorArray destinationArray

    The array to copy to.

    int destinationIndex

    The index of the first element to copy to.

    int length

    The number of elements.

    Type Parameters
    Name Description
    T

    The data type of the elements.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the given indexes and length are out of bounds of the source or destination array.

    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.

    Declaration
    public static void Copy<T>(NativeArray<T> sourceArray, int sourceIndex, NativeTensorArray destinationArray, int destinationIndex, int length) where T : unmanaged
    Parameters
    Type Name Description
    NativeArray<T> sourceArray

    The array to copy from.

    int sourceIndex

    The index of the first element to copy from.

    NativeTensorArray destinationArray

    The array to copy to.

    int destinationIndex

    The index of the first element to copy to.

    int length

    The number of elements.

    Type Parameters
    Name Description
    T

    The data type of the elements.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the given indexes and length are out of bounds of the source or destination array.

    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.

    Declaration
    public static void Copy<T>(NativeArray<T>.ReadOnly sourceArray, int sourceIndex, NativeTensorArray destinationArray, int destinationIndex, int length) where T : unmanaged
    Parameters
    Type Name Description
    NativeArray<T>.ReadOnly sourceArray

    The array to copy from.

    int sourceIndex

    The index of the first element to copy from.

    NativeTensorArray destinationArray

    The array to copy to.

    int destinationIndex

    The index of the first element to copy to.

    int length

    The number of elements.

    Type Parameters
    Name Description
    T

    The data type of the elements.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the given indexes and length are out of bounds of the source or destination array.

    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)