Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetUnsafeBucketData

Returns a "bucket" view of this hash map.
Read time 1 minuteLast updated 17 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

GetUnsafeBucketData<T, U>(NativeParallelHashMap<T, T>)

Returns a "bucket" view of this hash map.
public static UnsafeParallelHashMapBucketData GetUnsafeBucketData<TKey, TValue>(this NativeParallelHashMap<TKey, TValue> container) where TKey : unmanaged, IEquatable<TKey> where TValue : unmanaged

Parameters

The hash map.

Returns

Type

Description

UnsafeParallelHashMapBucketDataA "bucket" view of this hash map.

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<T, U>(NativeParallelMultiHashMap<T, T>)

Returns a "bucket" view of this multi hash map.
public static UnsafeParallelHashMapBucketData GetUnsafeBucketData<TKey, TValue>(this NativeParallelMultiHashMap<TKey, TValue> container) where TKey : unmanaged, IEquatable<TKey> where TValue : unmanaged

Parameters

The multi hash map.

Returns

Type

Description

UnsafeParallelHashMapBucketDataA "bucket" view of this multi hash map.

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.