[Networkit] An effort for code sanity and cleanups / Miscellaneous / GraphIO formats

Maximilian Vogel maximilian.vogel at student.kit.edu
Mon Aug 3 16:19:29 CEST 2015

>> *// auxiliary/Parallelism became useless/redundant [on the C++ side]*
>> Since we specify OpenMP as a "hard" requirement, the wrappers in 
>> auxiliary/Parallelism.h became rather useless, as I also noticed that 
>> they aren't used throughout networkit. Currently, the only "use" is 
>> the re-wrapping for Python in _NetworKit.pyx. But then these should 
>> be wrapped there with auxiliary/Parallelism dropped entirely.
> I’m not sure I get your point. I think it’s very useful to be able to 
> set the degree of parallelism interactively using 
> networkit.setNumberOfThreads, which is based on Parallelism.h.
Sure. My point is a practical one: On the C++ side, the functions from 
Parallelism.h are not used at all and instead of wrapping the wrappers 
in _NetworKit.pyx:
cdef extern from "cpp/auxiliary/Parallelism.h" namespace "Aux":
     void _setNumberOfThreads "Aux::setNumberOfThreads" (int)
     int _getCurrentNumberOfThreads "Aux::getCurrentNumberOfThreads" ()
     int _getMaxNumberOfThreads "Aux::getMaxNumberOfThreads" ()
     void _enableNestedParallelism "Aux::enableNestedParallelism" ()

the OpenMP functions could be wrapped directly:
cdef extern from "<omp.h>":
     void omp_set_num_threads(int nThreads)
     int omp_get_num_threads()
     int omp_get_max_threads()
     void omp_set_nested(int flag)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150803/e06b8853/attachment.html>

More information about the NetworKit mailing list