예제 #1
0
        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
예제 #2
0
        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
예제 #3
0
 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)
예제 #4
0
 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]
예제 #5
0
 def test_impl(key_type, value_type):
     a_dict = ConcurrentDict.empty(key_type, value_type)
     return len(a_dict)
예제 #6
0
 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)
예제 #7
0
 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
예제 #8
0
 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