1+ # *****************************************************************************
2+ # Copyright (c) 2020, Intel Corporation All rights reserved.
3+ #
4+ # Redistribution and use in source and binary forms, with or without
5+ # modification, are permitted provided that the following conditions are met:
6+ #
7+ # Redistributions of source code must retain the above copyright notice,
8+ # this list of conditions and the following disclaimer.
9+ #
10+ # Redistributions in binary form must reproduce the above copyright notice,
11+ # this list of conditions and the following disclaimer in the documentation
12+ # and/or other materials provided with the distribution.
13+ #
14+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17+ # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
18+ # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20+ # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21+ # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22+ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23+ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24+ # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25+ # *****************************************************************************
26+
127import numba
228import sdc
329
1036from . import hconcurrent_hash
1137ll .add_symbol ('create_int_hashmap' , hconcurrent_hash .create_int_hashmap )
1238ll .add_symbol ('delete_int_hashmap' , hconcurrent_hash .delete_int_hashmap )
13- ll .add_symbol ('addelem_int_hashmap' ,hconcurrent_hash .addelem_int_hashmap )
39+ ll .add_symbol ('addelem_int_hashmap' , hconcurrent_hash .addelem_int_hashmap )
1440
15- ll .add_symbol ('createiter_int_hashmap' ,hconcurrent_hash .createiter_int_hashmap )
16- ll .add_symbol ('enditer_int_hashmap' ,hconcurrent_hash .enditer_int_hashmap )
17- ll .add_symbol ('nextiter_int_hashmap' ,hconcurrent_hash .nextiter_int_hashmap )
18- ll .add_symbol ('iterkey_int_hashmap' ,hconcurrent_hash .iterkey_int_hashmap )
19- ll .add_symbol ('itersize_int_hashmap' ,hconcurrent_hash .itersize_int_hashmap )
20- ll .add_symbol ('iterelem_int_hashmap' ,hconcurrent_hash .iterelem_int_hashmap )
21- ll .add_symbol ('deleteiter_int_hashmap' ,hconcurrent_hash .deleteiter_int_hashmap )
41+ ll .add_symbol ('createiter_int_hashmap' , hconcurrent_hash .createiter_int_hashmap )
42+ ll .add_symbol ('enditer_int_hashmap' , hconcurrent_hash .enditer_int_hashmap )
43+ ll .add_symbol ('nextiter_int_hashmap' , hconcurrent_hash .nextiter_int_hashmap )
44+ ll .add_symbol ('iterkey_int_hashmap' , hconcurrent_hash .iterkey_int_hashmap )
45+ ll .add_symbol ('itersize_int_hashmap' , hconcurrent_hash .itersize_int_hashmap )
46+ ll .add_symbol ('iterelem_int_hashmap' , hconcurrent_hash .iterelem_int_hashmap )
47+ ll .add_symbol ('deleteiter_int_hashmap' , hconcurrent_hash .deleteiter_int_hashmap )
2248
2349_create_int_hashmap = types .ExternalFunction ("create_int_hashmap" ,
2450 types .voidptr ())
4672def create_int_hashmap ():
4773 pass
4874
75+
4976def delete_int_hashmap ():
5077 pass
5178
79+
5280def addelem_int_hashmap ():
5381 pass
5482
5583
5684def createiter_int_hashmap ():
5785 pass
5886
87+
5988def enditer_int_hashmap ():
6089 pass
6190
91+
6292def nextiter_int_hashmap ():
6393 pass
6494
95+
6596def iterkey_int_hashmap ():
6697 pass
6798
99+
68100def itersize_int_hashmap ():
69101 pass
70102
103+
71104def iterelem_int_hashmap ():
72105 pass
73106
107+
74108def deleteiter_int_hashmap ():
75109 pass
76110
111+
77112@overload (create_int_hashmap )
78113def create_int_hashmap_overload ():
79114 return lambda : _create_int_hashmap ()
80115
116+
81117@overload (delete_int_hashmap )
82118def delete_int_hashmap_overload (h ):
83119 return lambda h : _delete_int_hashmap (h )
84120
121+
85122@overload (addelem_int_hashmap )
86123def addelem_int_hashmap_overload (h , key , val ):
87124 return lambda h , key , val : _addelem_int_hashmap (h , key , val )
@@ -91,26 +128,32 @@ def addelem_int_hashmap_overload(h, key, val):
91128def createiter_int_hashmap_overload (h ):
92129 return lambda h : _createiter_int_hashmap (h )
93130
131+
94132@overload (enditer_int_hashmap )
95133def enditer_int_hashmap_overload (h ):
96134 return lambda h : _enditer_int_hashmap (h )
97135
136+
98137@overload (nextiter_int_hashmap )
99138def nextiter_int_hashmap_overload (h ):
100139 return lambda h : _nextiter_int_hashmap (h )
101140
141+
102142@overload (iterkey_int_hashmap )
103143def iterkey_int_hashmap_overload (h ):
104144 return lambda h : _iterkey_int_hashmap (h )
105145
146+
106147@overload (itersize_int_hashmap )
107148def itersize_int_hashmap_overload (h ):
108149 return lambda h : _itersize_int_hashmap (h )
109150
151+
110152@overload (iterelem_int_hashmap )
111153def iterelem_int_hashmap_overload (h , i ):
112154 return lambda h , i : _iterelem_int_hashmap (h , i )
113155
156+
114157@overload (deleteiter_int_hashmap )
115158def deleteiter_int_hashmap_overload (h ):
116159 return lambda h : _deleteiter_int_hashmap (h )
0 commit comments