def test_impl(tdict, key_type, value_type): a_dict = ConcurrentDict.empty(key_type, value_type) for k, v in tdict.items(): a_dict[k] = v res = list(a_dict.items()) # this relies on working iterator return res
def test_impl(key_type, value_type, keys, values): a_dict = ConcurrentDict.empty(key_type, value_type) for i in prange(len(keys)): a_dict[keys[i]] = values[i] res = list(a_dict.items()) # this relies on working iterator return res
def test_impl(keys, value): a_dict = ConcurrentDict.empty(types.int64, types.float64) res = a_dict.fromkeys(keys, value) check_keys = np.array([k in res for k in keys]) return len(res), np.all(check_keys), len(a_dict)
def test_impl(key_type, value_type, key, value): a_dict = ConcurrentDict.empty(key_type, value_type) a_dict[key] = value return len(a_dict), a_dict[key]
def test_impl(key_type, value_type): a_dict = ConcurrentDict.empty(key_type, value_type) return len(a_dict)
def test_impl(key_type, value_type, keys, values): a_dict = ConcurrentDict.empty(key_type, value_type) for k, v in zip(keys, values): a_dict[k] = v return len(a_dict)
def concurrent_dict_fromkeys_impl(cls, keys, value): res = ConcurrentDict.empty(dict_key_type, dict_value_type) for k in keys: res[k] = value return res
def concurrent_dict_fromkeys_impl(cls, keys, value): res = ConcurrentDict.empty(dict_key_type, dict_value_type) for i in numba.prange(len(keys)): res[keys[i]] = value return res