33 typedef Int32 KeyTypeValue;
34 typedef Int32 ValueType;
36 typedef KeyTraitsType::KeyTypeConstRef KeyTypeConstRef;
40 ARCCORE_HOST_DEVICE ValueType operator[](Int32 i)
const {
return _lookup(i); }
41 ARCCORE_HOST_DEVICE Int32 size()
const {
return m_key_buffer_span.size(); }
48 Int32 m_nb_bucket = 0;
53 ARCCORE_HOST_DEVICE Int32 _lookup(KeyTypeConstRef
id)
const
55 return _lookupBucket(_hash(
id),
id);
57 ARCCORE_HOST_DEVICE Int32 _hash(KeyTypeConstRef
id)
const
59 return static_cast<Int32
>(KeyTraitsType::hashFunction(
id) % m_nb_bucket);
61 ARCCORE_HOST_DEVICE Integer _lookupBucket(Int32 bucket, KeyTypeConstRef
id)
const
63 for (Integer i = m_buckets_span[bucket]; i >= 0; i = m_next_buffer_span[i]) {
64 if (m_key_buffer_span[i] ==
id)
87 typedef Int32 KeyTypeValue;
88 typedef Int32 ValueType;
90 typedef KeyTraitsType::KeyTypeConstRef KeyTypeConstRef;
104 ValueType operator[](Int32 i)
const {
return _lookup(i); }
106 KeyTypeValue keyLocalId(Int32 i)
const {
return m_key_buffer[i]; }
108 Int32 size()
const {
return m_key_buffer.size(); }
112 ARCANE_ASSERT((_initialized()), (
"GroupIndexTable not initialized"));
113 ARCANE_ASSERT((_checkIntegrity(
false)), (
"GroupIndexTable integrity failed"));
125 Int32 _hash(KeyTypeConstRef
id)
const
127 ARCANE_ASSERT((_initialized()), (
"GroupIndexTable not initialized"));
128 return m_view._hash(
id);
131 bool _hasKey(KeyTypeConstRef
id)
const;
134 Int32 _lookupBucket(Int32 bucket, KeyTypeConstRef
id)
const
136 ARCANE_ASSERT((_initialized()), (
"GroupIndexTable not initialized"));
137 return m_view._lookupBucket(bucket,
id);
141 Int32 _lookup(KeyTypeConstRef
id)
const
143 ARCANE_ASSERT((_checkIntegrity(
false)), (
"GroupIndexTable integrity failed"));
144 return _lookupBucket(_hash(
id),
id);
148 bool _initialized()
const;
151 bool _checkIntegrity(
bool full =
true)
const;
159 bool m_disable_check_integrity =
false;