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
+
1
27
import numba
2
28
import sdc
3
29
10
36
from . import hconcurrent_hash
11
37
ll .add_symbol ('create_int_hashmap' , hconcurrent_hash .create_int_hashmap )
12
38
ll .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 )
14
40
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 )
22
48
23
49
_create_int_hashmap = types .ExternalFunction ("create_int_hashmap" ,
24
50
types .voidptr ())
46
72
def create_int_hashmap ():
47
73
pass
48
74
75
+
49
76
def delete_int_hashmap ():
50
77
pass
51
78
79
+
52
80
def addelem_int_hashmap ():
53
81
pass
54
82
55
83
56
84
def createiter_int_hashmap ():
57
85
pass
58
86
87
+
59
88
def enditer_int_hashmap ():
60
89
pass
61
90
91
+
62
92
def nextiter_int_hashmap ():
63
93
pass
64
94
95
+
65
96
def iterkey_int_hashmap ():
66
97
pass
67
98
99
+
68
100
def itersize_int_hashmap ():
69
101
pass
70
102
103
+
71
104
def iterelem_int_hashmap ():
72
105
pass
73
106
107
+
74
108
def deleteiter_int_hashmap ():
75
109
pass
76
110
111
+
77
112
@overload (create_int_hashmap )
78
113
def create_int_hashmap_overload ():
79
114
return lambda : _create_int_hashmap ()
80
115
116
+
81
117
@overload (delete_int_hashmap )
82
118
def delete_int_hashmap_overload (h ):
83
119
return lambda h : _delete_int_hashmap (h )
84
120
121
+
85
122
@overload (addelem_int_hashmap )
86
123
def addelem_int_hashmap_overload (h , key , val ):
87
124
return lambda h , key , val : _addelem_int_hashmap (h , key , val )
@@ -91,26 +128,32 @@ def addelem_int_hashmap_overload(h, key, val):
91
128
def createiter_int_hashmap_overload (h ):
92
129
return lambda h : _createiter_int_hashmap (h )
93
130
131
+
94
132
@overload (enditer_int_hashmap )
95
133
def enditer_int_hashmap_overload (h ):
96
134
return lambda h : _enditer_int_hashmap (h )
97
135
136
+
98
137
@overload (nextiter_int_hashmap )
99
138
def nextiter_int_hashmap_overload (h ):
100
139
return lambda h : _nextiter_int_hashmap (h )
101
140
141
+
102
142
@overload (iterkey_int_hashmap )
103
143
def iterkey_int_hashmap_overload (h ):
104
144
return lambda h : _iterkey_int_hashmap (h )
105
145
146
+
106
147
@overload (itersize_int_hashmap )
107
148
def itersize_int_hashmap_overload (h ):
108
149
return lambda h : _itersize_int_hashmap (h )
109
150
151
+
110
152
@overload (iterelem_int_hashmap )
111
153
def iterelem_int_hashmap_overload (h , i ):
112
154
return lambda h , i : _iterelem_int_hashmap (h , i )
113
155
156
+
114
157
@overload (deleteiter_int_hashmap )
115
158
def deleteiter_int_hashmap_overload (h ):
116
159
return lambda h : _deleteiter_int_hashmap (h )
0 commit comments