numbox 0.2.16__py3-none-any.whl → 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- numbox/__init__.py +1 -1
- numbox/utils/lowlevel.py +8 -2
- {numbox-0.2.16.dist-info → numbox-0.3.0.dist-info}/METADATA +2 -3
- {numbox-0.2.16.dist-info → numbox-0.3.0.dist-info}/RECORD +7 -7
- {numbox-0.2.16.dist-info → numbox-0.3.0.dist-info}/WHEEL +1 -1
- {numbox-0.2.16.dist-info → numbox-0.3.0.dist-info}/LICENSE +0 -0
- {numbox-0.2.16.dist-info → numbox-0.3.0.dist-info}/top_level.txt +0 -0
numbox/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.
|
|
1
|
+
__version__ = '0.3.0'
|
numbox/utils/lowlevel.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from importlib.metadata import version
|
|
1
2
|
from llvmlite import ir
|
|
2
3
|
from llvmlite.ir.builder import IRBuilder
|
|
3
4
|
from numba import carray, njit
|
|
@@ -17,6 +18,11 @@ from numbox.utils.void_type import VoidType
|
|
|
17
18
|
from numbox.utils.highlevel import determine_field_index
|
|
18
19
|
|
|
19
20
|
|
|
21
|
+
numba_version = int(version("numba").split(".")[1])
|
|
22
|
+
assert numba_version >= 60, numba_version
|
|
23
|
+
function_struct_size = 3 if numba_version >= 61 else 2 # See `FunctionModel` struct (c_addr, py_addr[, jit_addr])
|
|
24
|
+
|
|
25
|
+
|
|
20
26
|
@intrinsic
|
|
21
27
|
def _cast(typingctx: Context, source_ty, dest_ty_ref: TypeRef):
|
|
22
28
|
dest_ty = dest_ty_ref.instance_type
|
|
@@ -114,13 +120,13 @@ def get_func_p_as_int_from_func_struct(func_):
|
|
|
114
120
|
|
|
115
121
|
@intrinsic
|
|
116
122
|
def _get_func_tuple(typingctx, func_ty):
|
|
117
|
-
return_tuple_type = UniTuple(intp,
|
|
123
|
+
return_tuple_type = UniTuple(intp, function_struct_size)
|
|
118
124
|
sig = return_tuple_type(func_ty)
|
|
119
125
|
|
|
120
126
|
def codegen(context, builder, signature, args):
|
|
121
127
|
func_struct = args[0]
|
|
122
128
|
lst = []
|
|
123
|
-
for i in range(
|
|
129
|
+
for i in range(function_struct_size):
|
|
124
130
|
lst.append(builder.ptrtoint(builder.extract_value(func_struct, i), intp_t))
|
|
125
131
|
return context.make_tuple(builder, return_tuple_type, lst)
|
|
126
132
|
return sig, codegen
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: numbox
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Author: Mikhail Goykhman
|
|
5
5
|
License: MIT License (with Citation Clause)
|
|
6
6
|
|
|
@@ -34,8 +34,7 @@ Keywords: llvmlite,numba,numpy
|
|
|
34
34
|
Requires-Python: >=3.10
|
|
35
35
|
Description-Content-Type: text/markdown
|
|
36
36
|
License-File: LICENSE
|
|
37
|
-
Requires-Dist: numba<0.
|
|
38
|
-
Requires-Dist: numba==0.63.1; python_version == "3.14"
|
|
37
|
+
Requires-Dist: numba<0.64.0,>=0.60.0
|
|
39
38
|
Provides-Extra: docs
|
|
40
39
|
Requires-Dist: sphinx==8.1.3; extra == "docs"
|
|
41
40
|
Requires-Dist: sphinx-sitemap==2.7.2; extra == "docs"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
numbox/__init__.py,sha256=
|
|
1
|
+
numbox/__init__.py,sha256=3wVEs2QD_7OcTlD97cZdCeizd2hUbJJ0GeIO8wQIjrk,22
|
|
2
2
|
numbox/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
numbox/core/configurations.py,sha256=0bCmxXL-QMwtvyIDhpXLeT-1KJMf_QpH0wLuEvYLGxQ,68
|
|
4
4
|
numbox/core/any/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -28,13 +28,13 @@ numbox/core/work/work.py,sha256=yISGKbXsut5ZSbRT2h6uMAAFsKDQ__fcX27HuI6ydhA,1502
|
|
|
28
28
|
numbox/core/work/work_utils.py,sha256=3q_nnBdzuxWWcdFpbRL2H0T9ZNkUgx1J1uhiZkX3YG4,1039
|
|
29
29
|
numbox/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
30
|
numbox/utils/highlevel.py,sha256=3dEdIbk0OJcBmuWdbuwG-0v80U19sSYMIxOR8qslGsQ,8360
|
|
31
|
-
numbox/utils/lowlevel.py,sha256=
|
|
31
|
+
numbox/utils/lowlevel.py,sha256=1jw9JjlT6MW4zHRgHioGDZH41AqjXDaEwV4xE90GDaI,11000
|
|
32
32
|
numbox/utils/meminfo.py,sha256=ykFi8Vt0WcHI3ztgMwvpn6NqaflDSQGL8tjI01jrzm0,1759
|
|
33
33
|
numbox/utils/standard.py,sha256=SPsQcyLZw21RaNCdfkIGE_QBaVnMtZjJY4F40_GGuak,347
|
|
34
34
|
numbox/utils/timer.py,sha256=5_d690Fb3L2axJBRxtoB0qe23exBosNR4qu6cno4QfY,641
|
|
35
35
|
numbox/utils/void_type.py,sha256=IkZsjNeAIShYJtvWbvERdHnl_mbF1rCRWiM3gp6II8U,404
|
|
36
|
-
numbox-0.
|
|
37
|
-
numbox-0.
|
|
38
|
-
numbox-0.
|
|
39
|
-
numbox-0.
|
|
40
|
-
numbox-0.
|
|
36
|
+
numbox-0.3.0.dist-info/LICENSE,sha256=YYgNvjH_p6-1NsdrIqGJnr1GUbZzA_8DxsP6vVfM6nY,1446
|
|
37
|
+
numbox-0.3.0.dist-info/METADATA,sha256=rOEx_BB3q6x3jchoLmwn0ITAsoAan1uTRpPoHixyRYg,2884
|
|
38
|
+
numbox-0.3.0.dist-info/WHEEL,sha256=WnJ8fYhv8N4SYVK2lLYNI6N0kVATA7b0piVUNvqIIJE,91
|
|
39
|
+
numbox-0.3.0.dist-info/top_level.txt,sha256=A67jOkfqidCSYYm6ifjN_WZyIiR1B27fjxv6nNbPvjc,7
|
|
40
|
+
numbox-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|