Class CoreUnsafeUtils | High Definition RP | 6.7.1-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class CoreUnsafeUtils

    Inheritance
    Object
    CoreUnsafeUtils
    Namespace: UnityEngine.Experimental.Rendering
    Syntax
    public static class CoreUnsafeUtils

    Methods

    CombineHashes(Int32, Hash128*, Hash128*)

    Declaration
    public static void CombineHashes(int count, Hash128*hashes, Hash128*outHash)
    Parameters
    Type Name Description
    Int32 count
    Hash128* hashes
    Hash128* outHash

    CombineHashes<TValue, TGetter>(Int32, Void*, Hash128*)

    Combine all of the hashes of a collection of hashes.

    Declaration
    public static void CombineHashes<TValue, TGetter>(int count, void *hashes, Hash128*outHash)
        where TValue : struct where TGetter : struct, CoreUnsafeUtils.IKeyGetter<TValue, Hash128>
    Parameters
    Type Name Description
    Int32 count

    Number of hash to combine.

    Void* hashes

    Hashes to combine.

    Hash128* outHash

    Hash to update.

    Type Parameters
    Name Description
    TValue
    TGetter

    CompareHashes(Int32, Hash128*, Int32, Hash128*, Int32*, Int32*, out Int32, out Int32)

    Declaration
    public static int CompareHashes(int oldHashCount, Hash128*oldHashes, int newHashCount, Hash128*newHashes, int *addIndices, int *removeIndices, out int addCount, out int remCount)
    Parameters
    Type Name Description
    Int32 oldHashCount
    Hash128* oldHashes
    Int32 newHashCount
    Hash128* newHashes
    Int32* addIndices
    Int32* removeIndices
    Int32 addCount
    Int32 remCount
    Returns
    Type Description
    Int32

    CompareHashes<TOldValue, TOldGetter, TNewValue, TNewGetter>(Int32, Void*, Int32, Void*, Int32*, Int32*, out Int32, out Int32)

    Compare hashes of two collections and provide a list of indices removeIndices to remove in oldHashes and a list of indices addIndices to add in newHashes.

    Assumes that newHashes and oldHashes are sorted.

    Declaration
    public static int CompareHashes<TOldValue, TOldGetter, TNewValue, TNewGetter>(int oldHashCount, void *oldHashes, int newHashCount, void *newHashes, int *addIndices, int *removeIndices, out int addCount, out int remCount)
        where TOldValue : struct where TOldGetter : struct, CoreUnsafeUtils.IKeyGetter<TOldValue, Hash128> where TNewValue : struct where TNewGetter : struct, CoreUnsafeUtils.IKeyGetter<TNewValue, Hash128>
    Parameters
    Type Name Description
    Int32 oldHashCount

    Number of hashes in oldHashes.

    Void* oldHashes

    Previous hashes to compare.

    Int32 newHashCount

    Number of hashes in newHashes.

    Void* newHashes

    New hashes to compare.

    Int32* addIndices

    Indices of element to add in newHashes will be written here.

    Int32* removeIndices

    Indices of element to remove in oldHashes will be written here.

    Int32 addCount

    Number of elements to add will be written here.

    Int32 remCount

    Number of elements to remove will be written here.

    Returns
    Type Description
    Int32

    The number of operation to perform (

    addCount + remCount
    )

    Type Parameters
    Name Description
    TOldValue
    TOldGetter
    TNewValue
    TNewGetter

    CopyTo<T>(T[], Void*, Int32)

    Declaration
    public static void CopyTo<T>(this T[] list, void *dest, int count)
        where T : struct
    Parameters
    Type Name Description
    T[] list
    Void* dest
    Int32 count
    Type Parameters
    Name Description
    T

    CopyTo<T>(List<T>, Void*, Int32)

    Declaration
    public static void CopyTo<T>(this List<T> list, void *dest, int count)
        where T : struct
    Parameters
    Type Name Description
    List<T> list
    Void* dest
    Int32 count
    Type Parameters
    Name Description
    T

    HaveDuplicates(Int32[])

    Declaration
    public static bool HaveDuplicates(int[] arr)
    Parameters
    Type Name Description
    Int32[] arr
    Returns
    Type Description
    Boolean

    IndexOf<T>(Void*, Int32, T)

    Declaration
    public static int IndexOf<T>(void *data, int count, T v)
        where T : struct, IEquatable<T>
    Parameters
    Type Name Description
    Void* data
    Int32 count
    T v
    Returns
    Type Description
    Int32
    Type Parameters
    Name Description
    T

    QuickSort(UInt32[], Int32, Int32)

    Declaration
    public static void QuickSort(uint[] arr, int left, int right)
    Parameters
    Type Name Description
    UInt32[] arr
    Int32 left
    Int32 right

    QuickSort<T>(Int32, Void*)

    Declaration
    public static void QuickSort<T>(int count, void *data)
        where T : struct, IComparable<T>
    Parameters
    Type Name Description
    Int32 count
    Void* data
    Type Parameters
    Name Description
    T

    QuickSort<TValue, TKey, TGetter>(Int32, Void*)

    Declaration
    public static void QuickSort<TValue, TKey, TGetter>(int count, void *data)
        where TValue : struct where TKey : struct, IComparable<TKey> where TGetter : struct, CoreUnsafeUtils.IKeyGetter<TValue, TKey>
    Parameters
    Type Name Description
    Int32 count
    Void* data
    Type Parameters
    Name Description
    TValue
    TKey
    TGetter

    QuickSort<TValue, TKey, TGetter>(Void*, Int32, Int32)

    Declaration
    public static void QuickSort<TValue, TKey, TGetter>(void *data, int left, int right)
        where TValue : struct where TKey : struct, IComparable<TKey> where TGetter : struct, CoreUnsafeUtils.IKeyGetter<TValue, TKey>
    Parameters
    Type Name Description
    Void* data
    Int32 left
    Int32 right
    Type Parameters
    Name Description
    TValue
    TKey
    TGetter
    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