rns-engine 0.4.1__cp313-cp313-win_amd64.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.
- rns_engine/__init__.py +72 -0
- rns_engine/_core.cp313-win_amd64.pyd +0 -0
- rns_engine/_core.cpp +2346 -0
- rns_engine/engine.py +252 -0
- rns_engine-0.4.1.dist-info/METADATA +345 -0
- rns_engine-0.4.1.dist-info/RECORD +9 -0
- rns_engine-0.4.1.dist-info/WHEEL +5 -0
- rns_engine-0.4.1.dist-info/licenses/LICENSE +661 -0
- rns_engine-0.4.1.dist-info/top_level.txt +1 -0
rns_engine/__init__.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from importlib.metadata import PackageNotFoundError, version as _distribution_version
|
|
2
|
+
|
|
3
|
+
from ._core import (
|
|
4
|
+
HAS_AVX2,
|
|
5
|
+
M,
|
|
6
|
+
M0,
|
|
7
|
+
M1,
|
|
8
|
+
M2,
|
|
9
|
+
M3,
|
|
10
|
+
encode,
|
|
11
|
+
decode,
|
|
12
|
+
op,
|
|
13
|
+
add,
|
|
14
|
+
sub,
|
|
15
|
+
mul,
|
|
16
|
+
div_,
|
|
17
|
+
fma,
|
|
18
|
+
affine_repeat,
|
|
19
|
+
mul_u64,
|
|
20
|
+
fma_u64,
|
|
21
|
+
affine_repeat_u64,
|
|
22
|
+
add_u64_io,
|
|
23
|
+
add_u64_io_omp,
|
|
24
|
+
add_u64_auto,
|
|
25
|
+
sub_u64_io,
|
|
26
|
+
sub_u64_io_omp,
|
|
27
|
+
sub_u64_auto,
|
|
28
|
+
mul_u64_io,
|
|
29
|
+
mul_u64_io_omp,
|
|
30
|
+
mul_u64_auto,
|
|
31
|
+
fma_u64_io,
|
|
32
|
+
fma_u64_io_omp,
|
|
33
|
+
fma_u64_auto,
|
|
34
|
+
affine_repeat_u64_io,
|
|
35
|
+
affine_repeat_u64_io_omp,
|
|
36
|
+
affine_repeat_u64_auto,
|
|
37
|
+
omp_max_threads,
|
|
38
|
+
omp_set_num_threads,
|
|
39
|
+
omp_num_procs,
|
|
40
|
+
)
|
|
41
|
+
from .engine import EncodedArray, Session, SessionCache
|
|
42
|
+
|
|
43
|
+
try:
|
|
44
|
+
__version__ = _distribution_version("rns_engine")
|
|
45
|
+
except PackageNotFoundError:
|
|
46
|
+
# This only occurs when importing directly from an unpacked source tree
|
|
47
|
+
# rather than from an installed wheel/editable build.
|
|
48
|
+
__version__ = "0+unknown"
|
|
49
|
+
|
|
50
|
+
__all__ = [
|
|
51
|
+
"HAS_AVX2",
|
|
52
|
+
"M", "M0", "M1", "M2", "M3",
|
|
53
|
+
"encode", "decode", "op",
|
|
54
|
+
"add", "sub", "mul", "div_", "fma",
|
|
55
|
+
"affine_repeat",
|
|
56
|
+
"mul_u64", "fma_u64", "affine_repeat_u64",
|
|
57
|
+
"add_u64_io", "add_u64_io_omp", "add_u64_auto",
|
|
58
|
+
"sub_u64_io", "sub_u64_io_omp", "sub_u64_auto",
|
|
59
|
+
"mul_u64_io", "mul_u64_io_omp", "mul_u64_auto",
|
|
60
|
+
"fma_u64_io", "fma_u64_io_omp", "fma_u64_auto",
|
|
61
|
+
"affine_repeat_u64_io", "affine_repeat_u64_io_omp", "affine_repeat_u64_auto",
|
|
62
|
+
"omp_max_threads", "omp_set_num_threads", "omp_num_procs",
|
|
63
|
+
"EncodedArray", "SessionCache", "Session",
|
|
64
|
+
"info",
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
def info():
|
|
68
|
+
print(f"rns_engine v{__version__}")
|
|
69
|
+
print(f" Dynamic range : [0, {M:,})")
|
|
70
|
+
print(f" Moduli : {M0} x {M1} x {M2} x {M3}")
|
|
71
|
+
print(f" AVX2 : {'yes' if HAS_AVX2 else 'no'}")
|
|
72
|
+
print(" Core APIs : add/sub/mul/fma + raw/omp/auto scalar-broadcast family")
|
|
Binary file
|