xcrossfire 1.0.0__tar.gz
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-1.0.0/LICENSE.txt +21 -0
- xcrossfire-1.0.0/PKG-INFO +25 -0
- xcrossfire-1.0.0/README.md +2 -0
- xcrossfire-1.0.0/setup.cfg +4 -0
- xcrossfire-1.0.0/setup.py +27 -0
- xcrossfire-1.0.0/xcrossfire/__init__.py +53 -0
- xcrossfire-1.0.0/xcrossfire/xcrossfire.dll +0 -0
- xcrossfire-1.0.0/xcrossfire.egg-info/PKG-INFO +25 -0
- xcrossfire-1.0.0/xcrossfire.egg-info/SOURCES.txt +10 -0
- xcrossfire-1.0.0/xcrossfire.egg-info/dependency_links.txt +1 -0
- xcrossfire-1.0.0/xcrossfire.egg-info/requires.txt +1 -0
- xcrossfire-1.0.0/xcrossfire.egg-info/top_level.txt +1 -0
|
@@ -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,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,27 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="xcrossfire",
|
|
5
|
+
version="1.0.0",
|
|
6
|
+
author="XCrossFire Devs",
|
|
7
|
+
description="Ultra High-Performance SIMD AVX2 Assisted Search Engine for Python",
|
|
8
|
+
# Yeh lines README aur LICENSE ko pack karne ke liye zaroori hain
|
|
9
|
+
long_description=open('README.md', encoding='utf-8').read(),
|
|
10
|
+
long_description_content_type='text/markdown',
|
|
11
|
+
license='MIT',
|
|
12
|
+
|
|
13
|
+
packages=find_packages(),
|
|
14
|
+
package_data={
|
|
15
|
+
"xcrossfire": ["xcrossfire.dll"],
|
|
16
|
+
},
|
|
17
|
+
include_package_data=True,
|
|
18
|
+
classifiers=[
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Operating System :: Microsoft :: Windows",
|
|
22
|
+
],
|
|
23
|
+
python_requires=">=3.8",
|
|
24
|
+
install_requires=[
|
|
25
|
+
"numpy>=1.20.0",
|
|
26
|
+
],
|
|
27
|
+
)
|
|
@@ -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,10 @@
|
|
|
1
|
+
LICENSE.txt
|
|
2
|
+
README.md
|
|
3
|
+
setup.py
|
|
4
|
+
xcrossfire/__init__.py
|
|
5
|
+
xcrossfire/xcrossfire.dll
|
|
6
|
+
xcrossfire.egg-info/PKG-INFO
|
|
7
|
+
xcrossfire.egg-info/SOURCES.txt
|
|
8
|
+
xcrossfire.egg-info/dependency_links.txt
|
|
9
|
+
xcrossfire.egg-info/requires.txt
|
|
10
|
+
xcrossfire.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
numpy>=1.20.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
xcrossfire
|