diff --git a/CMakeLists.txt b/CMakeLists.txt index 299229c..96b1645 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,9 @@ project(main # Set the C++ standard to C++20 for this project set(CMAKE_CXX_STANDARD 20) +# Enable OpenMP support for parallel programming +SET(CMAKE_CXX_FLAGS "-fopenmp") + # Ensure that the necessary C++11 features are available, as required by the RapidCSV library set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/pyproject.toml b/pyproject.toml index c5525ca..eb78636 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dependencies = [ "tqdm", "pytest" ] -version = "2.0.11" +version = "2.0.12" [tool.setuptools.packages.find] where = ["src_python"] diff --git a/setup.py b/setup.py index 7cd8fd3..c7fb859 100755 --- a/setup.py +++ b/setup.py @@ -102,10 +102,11 @@ def generate_cython_stub_file(pyx_filepath: str, output_filepath: str) -> None: if sys.platform == "win32": - compile_flags = ["/Ox", "/std:c++20"] + compile_flags = ["/Ox", "/std:c++20",'-fopenmp'] + extra_link_args =['-lgomp','-fopenmp'], else: - compile_flags = ["-std=c++2a", "-O3"] - + compile_flags = ["-std=c++2a", "-O3",'-fopenmp'] + extra_link_args =['-lgomp','-fopenmp'], this_directory = Path(__file__).parent @@ -124,7 +125,7 @@ def generate_cython_stub_file(pyx_filepath: str, output_filepath: str) -> None: library_dirs=[], include_dirs=[np.get_include(),'src_cpp', 'include/robin_map','include/ldpc/src_cpp'], extra_compile_args=compile_flags, - extra_link_args=[], + extra_link_args=extra_link_args, language="c++", ) )