Commit 3a76ec81 authored by Tiago Peixoto's avatar Tiago Peixoto

Add OpenMP functions to documentation

parent be8922ea
Pipeline #261 passed with stage
in 181 minutes and 2 seconds
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
:no-members: :no-members:
:no-undoc-members: :no-undoc-members:
.. container:: sec_title
Basic classes
.. autoclass:: Graph .. autoclass:: Graph
:no-members: :no-members:
:no-undoc-members: :no-undoc-members:
...@@ -189,7 +193,6 @@ ...@@ -189,7 +193,6 @@
.. automethod:: save .. automethod:: save
.. autoclass:: GraphView .. autoclass:: GraphView
:show-inheritance: :show-inheritance:
.. autoclass:: Vertex .. autoclass:: Vertex
...@@ -199,8 +202,18 @@ ...@@ -199,8 +202,18 @@
:show-inheritance: :show-inheritance:
:no-members: :no-members:
:members: prop_map :members: prop_map
.. container:: sec_title
I/O functions
.. autofunction:: load_graph .. autofunction:: load_graph
.. autofunction:: load_graph_from_csv .. autofunction:: load_graph_from_csv
.. container:: sec_title
Property map operations
.. autofunction:: group_vector_property .. autofunction:: group_vector_property
.. autofunction:: ungroup_vector_property .. autofunction:: ungroup_vector_property
.. autofunction:: map_property_values .. autofunction:: map_property_values
...@@ -209,8 +222,23 @@ ...@@ -209,8 +222,23 @@
.. autofunction:: incident_edges_op .. autofunction:: incident_edges_op
.. autofunction:: perfect_prop_hash .. autofunction:: perfect_prop_hash
.. autofunction:: value_types .. autofunction:: value_types
.. autofunction:: show_config
.. container:: sec_title
OpenMP control
.. autofunction:: openmp_enabled
.. autofunction:: openmp_get_num_threads
.. autofunction:: openmp_set_num_threads
.. autofunction:: openmp_get_schedule
.. autofunction:: openmp_set_schedule
.. container:: sec_title
Misc
.. autofunction:: show_config
Available subpackages Available subpackages
===================== =====================
......
...@@ -44,6 +44,11 @@ Summary ...@@ -44,6 +44,11 @@ Summary
incident_edges_op incident_edges_op
perfect_prop_hash perfect_prop_hash
value_types value_types
openmp_enabled
openmp_get_num_threads
openmp_set_num_threads
openmp_get_schedule
openmp_set_schedule
show_config show_config
...@@ -3292,7 +3297,7 @@ def _get_rng(): ...@@ -3292,7 +3297,7 @@ def _get_rng():
# OpenMP Setup # OpenMP Setup
def openmp_enabled(): def openmp_enabled():
"""Return `True` if OpenMP was enabled during compilation.""" """Return ``True`` if OpenMP was enabled during compilation."""
return libcore.openmp_enabled() return libcore.openmp_enabled()
def openmp_get_num_threads(): def openmp_get_num_threads():
...@@ -3305,12 +3310,12 @@ def openmp_set_num_threads(n): ...@@ -3305,12 +3310,12 @@ def openmp_set_num_threads(n):
def openmp_get_schedule(): def openmp_get_schedule():
"""Return the runtime OpenMP schedule and chunk size. The schedule can by """Return the runtime OpenMP schedule and chunk size. The schedule can by
any of: `"static"`, `"dynamic"`, `"guided"`, `"auto"`.""" any of: ``"static"``, ``"dynamic"``, ``"guided"``, ``"auto"``."""
return libcore.openmp_get_schedule() return libcore.openmp_get_schedule()
def openmp_set_schedule(schedule, chunk=0): def openmp_set_schedule(schedule, chunk=0):
"""Set the runtime OpenMP schedule and chunk size. The schedule can by """Set the runtime OpenMP schedule and chunk size. The schedule can by
any of: `"static"`, `"dynamic"`, `"guided"`, `"auto"`.""" any of: ``"static"``, ``"dynamic"``, ``"guided"``, ``"auto"``."""
return libcore.openmp_set_schedule(schedule, chunk) return libcore.openmp_set_schedule(schedule, chunk)
if openmp_enabled() and os.environ.get("OMP_SCHEDULE") is None: if openmp_enabled() and os.environ.get("OMP_SCHEDULE") is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment