xcrossfire 1.0.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.
xcrossfire/__init__.py ADDED
@@ -0,0 +1,53 @@
1
+ import ctypes
2
+ import os
3
+ import sys
4
+ from array import array # Pure native memory block architecture
5
+
6
+ if sys.platform == 'win32':
7
+ current_dir = os.path.dirname(os.path.abspath(__file__))
8
+ parent_dir = os.path.dirname(current_dir)
9
+ os.add_dll_directory(current_dir)
10
+ os.add_dll_directory(parent_dir)
11
+
12
+ lib_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'xcrossfire.dll')
13
+
14
+ try:
15
+ _core = ctypes.CDLL(lib_path)
16
+ except FileNotFoundError:
17
+ _core = ctypes.cdll.LoadLibrary(lib_path)
18
+
19
+ _core.xcf_boot_engine.argtypes = []
20
+ _core.xcf_boot_engine.restype = None
21
+
22
+ _core.xcf_shutdown_engine.argtypes = []
23
+ _core.xcf_shutdown_engine.restype = None
24
+
25
+ # Pure continuous int pointer linkage
26
+ _core.xcf_search_int.argtypes = [ctypes.POINTER(ctypes.c_int), ctypes.c_size_t, ctypes.c_int]
27
+ _core.xcf_search_int.restype = ctypes.c_int64
28
+
29
+ _core.xcf_boot_engine()
30
+
31
+ def search(python_list, target):
32
+ if not python_list:
33
+ return -1
34
+
35
+ size = len(python_list)
36
+
37
+ # Agar user ne normal list bheji hai, toh use fast primitive array mein cast karenge
38
+ # Yeh backend par direct layout data hota hai jo C++ ko direct hardware access deta hai
39
+ if isinstance(python_list, list):
40
+ native_array = array('i', python_list)
41
+ else:
42
+ native_array = python_list
43
+
44
+ # Direct hardware internal memory address extraction
45
+ address, _ = native_array.buffer_info()
46
+ c_ptr = ctypes.cast(address, ctypes.POINTER(ctypes.c_int))
47
+
48
+ # Engine Fire!
49
+ idx = _core.xcf_search_int(c_ptr, size, target)
50
+ return idx
51
+
52
+ import atexit
53
+ atexit.register(_core.xcf_shutdown_engine)
Binary file
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.4
2
+ Name: xcrossfire
3
+ Version: 1.0.0
4
+ Summary: Ultra High-Performance SIMD AVX2 Assisted Search Engine for Python
5
+ Author: XCrossFire Devs
6
+ License: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: Microsoft :: Windows
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE.txt
13
+ Requires-Dist: numpy>=1.20.0
14
+ Dynamic: author
15
+ Dynamic: classifier
16
+ Dynamic: description
17
+ Dynamic: description-content-type
18
+ Dynamic: license
19
+ Dynamic: license-file
20
+ Dynamic: requires-dist
21
+ Dynamic: requires-python
22
+ Dynamic: summary
23
+
24
+ soniyaalveerashaniylekhikakhan\*\&(\&^%$^$$^078
25
+
@@ -0,0 +1,7 @@
1
+ xcrossfire/__init__.py,sha256=WHdUILRB470mYl5IoHOWe7L_XJXYmKO1t6CzxUe-W14,1668
2
+ xcrossfire/xcrossfire.dll,sha256=NyyPXgy3_Oqb0g6ltjd6HHJPuHDeD-9fWvRUce337Wg,2941293
3
+ xcrossfire-1.0.0.dist-info/licenses/LICENSE.txt,sha256=PFC6o6y3YLM5WkxPDGqcnaDqmoE-NKR6Eoas6GwQ-5U,1097
4
+ xcrossfire-1.0.0.dist-info/METADATA,sha256=A4MO61PHz2f0tkWjWTz4VL6hCJMKyagHk3laXwRz4tY,707
5
+ xcrossfire-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
6
+ xcrossfire-1.0.0.dist-info/top_level.txt,sha256=DcBTnDnV4s8eWIvpenfOQzQLoWXxd04tHhU2gcs8QuE,11
7
+ xcrossfire-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kamil
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use the Software, to copy, modify, merge, publish, distribute, sublicense,
9
+ and/or sell copies of the Software, and to permit persons to whom the
10
+ Software is furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ xcrossfire