Skip to content

Commit

Permalink
Add parallelism using OpenMP
Browse files Browse the repository at this point in the history
  • Loading branch information
ayan-b committed Aug 17, 2020
1 parent aae0049 commit 26ebb09
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
compiler_directives["linetrace"] = True
define_macros.append(("CYTHON_TRACE_NOGIL", "1"))


if sys.platform == "darwin":
os.environ["CC"] = "/usr/local/opt/llvm/bin/clang -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
os.environ["CXX"] = "/usr/local/opt/llvm/bin/clang++ -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"

GEODESIC_NAME = "gdist"

GEODESIC_MODULE = [
Expand All @@ -68,7 +73,7 @@
sources=["gdist.pyx"], # Filename of Cython source
language="c++", # Cython create C++ source
# Disable assertions; one is failing geodesic_mesh.h:405
define_macros=define_macros,
define_macros=[('NDEBUG', 1)],
extra_compile_args=[
'--std=c++14',
'/openmp' if sys.platform == 'win32' else '-fopenmp',
Expand Down

0 comments on commit 26ebb09

Please sign in to comment.