Method GetUnsafeBucketData
GetUnsafeBucketData<TKey, TValue>(NativeParallelHashMap<TKey, TValue>)
Returns a "bucket" view of this hash map.
Declaration
public static UnsafeParallelHashMapBucketData GetUnsafeBucketData<TKey, TValue>(this NativeParallelHashMap<TKey, TValue> container) where TKey : unmanaged, IEquatable<TKey> where TValue : unmanaged
Parameters
Type | Name | Description |
---|---|---|
NativeParallelHashMap<TKey, TValue> | container | The hash map. |
Returns
Type | Description |
---|---|
UnsafeParallelHashMapBucketData | A "bucket" view of this hash map. |
Type Parameters
Name | Description |
---|---|
TKey | The type of the keys. |
TValue | The type of the values. |
Remarks
Internally, the elements of a hash map are split into buckets of type UnsafeParallelHashMapBucketData.
With buckets, a job can safely access the elements of a hash map concurrently as long as each individual bucket is accessed only from an individual thread. Effectively, it is not safe to read elements of an individual bucket concurrently, but it is safe to read elements of separate buckets concurrently.
GetUnsafeBucketData<TKey, TValue>(NativeParallelMultiHashMap<TKey, TValue>)
Returns a "bucket" view of this multi hash map.
Declaration
public static UnsafeParallelHashMapBucketData GetUnsafeBucketData<TKey, TValue>(this NativeParallelMultiHashMap<TKey, TValue> container) where TKey : unmanaged, IEquatable<TKey> where TValue : unmanaged
Parameters
Type | Name | Description |
---|---|---|
NativeParallelMultiHashMap<TKey, TValue> | container | The multi hash map. |
Returns
Type | Description |
---|---|
UnsafeParallelHashMapBucketData | A "bucket" view of this multi hash map. |
Type Parameters
Name | Description |
---|---|
TKey | The type of the keys. |
TValue | The type of the values. |
Remarks
Internally, the elements of a hash map are split into buckets of type UnsafeParallelHashMapBucketData.
With buckets, a job can safely access the elements of a hash map concurrently as long as each individual bucket is accessed only from an individual thread. Effectively, it is not safe to read elements of an individual bucket concurrently, but it is safe to read elements of separate buckets concurrently.