Class CollectionHelper
Provides helper methods for collections.
Namespace: Unity.Collections
Assembly: solution.dll
Syntax
public static class CollectionHelper
Fields
Name | Description |
---|---|
CacheLineSize | The size in bytes of the current platform's L1 cache lines. |
Methods
Name | Description |
---|---|
Align(int, int) | Returns an allocation size in bytes that factors in alignment. |
Align(ulong, ulong) | Returns an allocation size in bytes that factors in alignment. |
CheckReflectionDataCorrect<T>(IntPtr) | Checks that reflection data was properly registered for a job. |
ConvertExistingDataToNativeArray<T>(void*, int, AllocatorHandle, bool) | Convert existing data into a NativeArray. |
ConvertExistingNativeListToNativeArray<T>(ref NativeList<T>, int, AllocatorHandle) | Convert NativeList into a NativeArray. |
CreateNativeArray<T>(int, AllocatorHandle, NativeArrayOptions) | Create a NativeArray, using a provided AllocatorHandle. |
CreateNativeArray<T>(NativeArray<T>, AllocatorHandle) | Create a NativeArray from another NativeArray, using a provided AllocatorHandle. |
CreateNativeArray<T>(T[], AllocatorHandle) | Create a NativeArray from a managed array, using a provided AllocatorHandle. |
CreateNativeArray<T, U>(int, ref U, NativeArrayOptions) | Create a NativeArray, using a provided allocator that implements IAllocator. |
CreateNativeArray<T, U>(T[], ref U) | Create a NativeArray from a managed array, using a provided Allocator. |
CreateNativeParallelMultiHashMap<TKey, TValue, U>(int, ref U) | Create a NativeParallelMultiHashMap from a managed array, using a provided Allocator. |
DisposeNativeArray<T>(NativeArray<T>, AllocatorHandle) | Dispose a NativeArray from an AllocatorHandle where it is allocated. |
Dispose<T>(NativeArray<T>) | Dispose a NativeArray from an AllocatorHandle where it is allocated. |
Hash(void*, int) | Returns a (non-cryptographic) hash of a memory block. |
IsAligned(ulong, int) | Returns true if an offset has a given alignment. |
IsAligned(void*, int) | Returns true if the address represented by the pointer has a given alignment. |
IsPowerOfTwo(int) | Returns true if a positive value is a non-zero power of two. |
Log2Ceil(int) | Returns the binary logarithm of the |
Log2Floor(int) | Returns the binary logarithm of the |