Class CollectionHelper | Collections | 0.4.0-preview.6
docs.unity3d.com
    Show / Hide Table of Contents

    Class CollectionHelper

    Inheritance
    Object
    CollectionHelper
    Namespace: Unity.Collections
    Syntax
    public static class CollectionHelper

    Fields

    CacheLineSize

    Declaration
    public const int CacheLineSize = default(int)
    Field Value
    Type Description
    Int32

    Methods

    Align(Int32, Int32)

    Declaration
    public static int Align(int size, int alignmentPowerOfTwo)
    Parameters
    Type Name Description
    Int32 size
    Int32 alignmentPowerOfTwo
    Returns
    Type Description
    Int32

    CheckIntPositivePowerOfTwo(Int32)

    Declaration
    [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
    public static void CheckIntPositivePowerOfTwo(int value)
    Parameters
    Type Name Description
    Int32 value

    CheckIsUnmanaged<T>()

    Declaration
    [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
    public static void CheckIsUnmanaged<T>()
    Type Parameters
    Name Description
    T

    Hash(Void*, Int32)

    Returns hash value of memory block. Function is using djb2 (non-cryptographic hash).

    Declaration
    public static uint Hash(void *pointer, int bytes)
    Parameters
    Type Name Description
    Void* pointer
    Int32 bytes
    Returns
    Type Description
    UInt32

    IsAligned(UInt64, Int32)

    Declaration
    public static bool IsAligned(ulong offset, int alignmentPowerOfTwo)
    Parameters
    Type Name Description
    UInt64 offset
    Int32 alignmentPowerOfTwo
    Returns
    Type Description
    Boolean

    IsAligned(Void*, Int32)

    Declaration
    public static bool IsAligned(void *p, int alignmentPowerOfTwo)
    Parameters
    Type Name Description
    Void* p
    Int32 alignmentPowerOfTwo
    Returns
    Type Description
    Boolean

    IsPowerOfTwo(Int32)

    Declaration
    public static bool IsPowerOfTwo(int value)
    Parameters
    Type Name Description
    Int32 value
    Returns
    Type Description
    Boolean

    Log2Ceil(Int32)

    Declaration
    public static int Log2Ceil(int value)
    Parameters
    Type Name Description
    Int32 value
    Returns
    Type Description
    Int32

    Log2Floor(Int32)

    Declaration
    public static int Log2Floor(int value)
    Parameters
    Type Name Description
    Int32 value
    Returns
    Type Description
    Int32
    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