Closed supratikbose closed 2 years ago
I got the answer: extra_compile_args in module definition inside setup.py did the trick
module1 = Extension(module_name, include_dirs = [np.get_include(), './cpp'], sources = ['./cpp/util.cpp', './cpp/geodesic_distance_2d.cpp', './cpp/geodesic_distance_3d.cpp', './cpp/geodesic_distance.cpp', wrap_source], extra_compile_args = ["-fopenmp"])
Hi, If I trying to modify the code to use openmp within geodesic3d_raster_scan (to calculate the 13 neigbors in parallel). However to trigger openmp, the cpp code should be copmpiled with "gcc -fopenmp" flag. Any Idea, how to do that while triggering "python setup.py build"? regards Supratik