Skip to content

Instantly share code, notes, and snippets.

@masouduut94
Last active October 13, 2024 00:57
Show Gist options
  • Save masouduut94/8ef43125491782b802d8dab4f895c28d to your computer and use it in GitHub Desktop.
Save masouduut94/8ef43125491782b802d8dab4f895c28d to your computer and use it in GitHub Desktop.
from setuptools import setup, Extension
import pybind11
pybind11_include = pybind11.get_include()
parallel_cpp_evaluator = Extension(
'parallel_cpp_evaluator',
sources=['parallel_cpp_evaluator.cpp', 'parallel_cpp_evaluator_wrapper.cpp'], # Source files
include_dirs=[pybind11_include],
language='c++',
extra_compile_args=['-std=c++11', '-fopenmp'], # Use C++11 standard and OpenMP
extra_link_args=['-fopenmp'],
)
setup(
name='parallel_cpp_evaluator',
version='0.1',
ext_modules=[parallel_cpp_evaluator], # Add the extension module
zip_safe=False,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment