+++ /dev/null
-"""
-This is autodoxy, a sphinx extension providing autodoc-like directives
-that are feed with Doxygen files.
-
-It is highly inspired from the autodoc_doxygen sphinx extension, but
-adapted to my own needs in SimGrid.
-https://github.com/rmcgibbo/sphinxcontrib-autodoc_doxygen
-
-Licence: MIT
-Copyright (c) 2015 Robert T. McGibbon
-Copyright (c) 2019 Martin Quinson
-"""
-from __future__ import print_function, absolute_import, division
-
-import os.path
-import re
-import sys
-import traceback # debug, big time
-
-from six import itervalues
-from lxml import etree as ET
-from sphinx.ext.autodoc import Documenter, members_option, ALL
-try:
- from sphinx.ext.autodoc import AutoDirective
- sphinxVersion = 1
-except ImportError:
- sphinxVersion = 2
-from sphinx.errors import ExtensionError
-from sphinx.util import logging
-
-##########################################################################
-# XML utils
-##########################################################################
-def format_xml_paragraph(xmlnode):
- """Format an Doxygen XML segment (principally a detaileddescription)
- as a paragraph for inclusion in the rst document
-
- Parameters
- ----------
- xmlnode
-
- Returns
- -------
- lines
- A list of lines.
- """
- return [l.rstrip() for l in _DoxygenXmlParagraphFormatter().generic_visit(xmlnode).lines]
-
-def elm2xml(xelm):
- """Return the unparsed form of the element"""
- res = '<{}'.format(xelm.tag)
- for key in xelm.keys():
- res += ' {}="{}"'.format(key, xelm.attrib[key])
- res += ">"
- if xelm.text is not None: # Text before the first child
- res += xelm.text
- for i in xelm.getchildren(): # serialize every subtag
- res += elm2xml(i)
- if xelm.tail is not None: # Text after last child
- res += xelm.tail
- res += '</{}>'.format(xelm.tag)
- return res
-def elm2txt(xelm):
- """Return the content of the element, with all tags removed. Only the text remains"""
- res = ''
- if xelm.text is not None: # Text before the first child
- res += xelm.text
- for i in xelm.getchildren(): # serialize every subtag
- res += elm2txt(i)
- if xelm.tail is not None: # Text after last child
- res += xelm.tail
- return res
-
-class _DoxygenXmlParagraphFormatter(object):
- # This class follows the model of the stdlib's ast.NodeVisitor for tree traversal
- # where you dispatch on the element type to a different method for each node
- # during the traverse.
-
- # It's supposed to handle paragraphs, references, preformatted text (code blocks), and lists.
-
- def __init__(self):
- self.lines = ['']
- self.continue_line = False
-
- def visit(self, node):
- method = 'visit_' + node.tag
- visitor = getattr(self, method, self.generic_visit)
- return visitor(node)
-
- def generic_visit(self, node):
- for child in node.getchildren():
- self.visit(child)
- return self
-
- def visit_ref(self, node):
- ref = get_doxygen_root().findall('.//*[@id="%s"]' % node.get('refid'))
- if ref:
- ref = ref[0]
- if ref.tag == 'memberdef':
- parent = ref.xpath('./ancestor::compounddef/compoundname')[0].text
- name = ref.find('./name').text
- real_name = parent + '::' + name
- elif ref.tag in ('compounddef', 'enumvalue'):
- name_node = ref.find('./name')
- real_name = name_node.text if name_node is not None else ''
- else:
- raise NotImplementedError(ref.tag)
- else:
- real_name = None
-
- val = [':cpp:any:`', node.text]
- if real_name:
- val.extend((' <', real_name, '>`'))
- else:
- val.append('`')
- if node.tail is not None:
- val.append(node.tail)
-
- self.lines[-1] += ''.join(val)
-
- def visit_para(self, node):
- if node.text is not None:
- if self.continue_line:
- self.lines[-1] += node.text
- else:
- self.lines.append(node.text)
- self.generic_visit(node)
- self.lines.append('')
- self.continue_line = False
-
- def visit_verbatim(self, node):
- if node.text is not None:
- # remove the leading ' *' of any lines
- lines = [re.sub('^\s*\*','', l) for l in node.text.split('\n')]
- # Merge each paragraph together
- text = re.sub("\n\n", "PaRaGrraphSplit", '\n'.join(lines))
- text = re.sub('\n', '', text)
- lines = text.split('PaRaGrraphSplit')
-
- # merge content to the built doc
- if self.continue_line:
- self.lines[-1] += lines[0]
- lines = lines[1:]
- for l in lines:
- self.lines.append('')
- self.lines.append(l)
- self.generic_visit(node)
- self.lines.append('')
- self.continue_line = False
-
- def visit_parametername(self, node):
- if 'direction' in node.attrib:
- direction = '[%s] ' % node.get('direction')
- else:
- direction = ''
-
- self.lines.append('**%s** -- %s' % (
- node.text, direction))
- self.continue_line = True
-
- def visit_parameterlist(self, node):
- lines = [l for l in type(self)().generic_visit(node).lines if l != '']
- self.lines.extend([':parameters:', ''] + ['* %s' % l for l in lines] + [''])
-
- def visit_simplesect(self, node):
- if node.get('kind') == 'return':
- self.lines.append(':returns: ')
- self.continue_line = True
- self.generic_visit(node)
-
- def visit_listitem(self, node):
- self.lines.append(' - ')
- self.continue_line = True
- self.generic_visit(node)
-
- def visit_preformatted(self, node):
- segment = [node.text if node.text is not None else '']
- for n in node.getchildren():
- segment.append(n.text)
- if n.tail is not None:
- segment.append(n.tail)
-
- lines = ''.join(segment).split('\n')
- self.lines.extend(('.. code-block:: C++', ''))
- self.lines.extend([' ' + l for l in lines])
-
- def visit_computeroutput(self, node):
- c = node.find('preformatted')
- if c is not None:
- return self.visit_preformatted(c)
- return self.visit_preformatted(node)
-
- def visit_xrefsect(self, node):
- if node.find('xreftitle').text == 'Deprecated':
- sublines = type(self)().generic_visit(node).lines
- self.lines.extend(['.. admonition:: Deprecated'] + [' ' + s for s in sublines])
- else:
- raise ValueError(node)
-
- def visit_subscript(self, node):
- self.lines[-1] += '\ :sub:`%s` %s' % (node.text, node.tail)
-
-
-##########################################################################
-# Directives
-##########################################################################
-
-
-class DoxygenDocumenter(Documenter):
- # Variables to store the names of the object being documented. modname and fullname are redundant,
- # and objpath is always the empty list. This is inelegant, but we need to work with the superclass.
-
- fullname = None # example: "OpenMM::NonbondedForce" or "OpenMM::NonbondedForce::methodName""
- modname = None # example: "OpenMM::NonbondedForce" or "OpenMM::NonbondedForce::methodName""
- objname = None # example: "NonbondedForce" or "methodName"
- objpath = [] # always the empty list
- object = None # the xml node for the object
-
- option_spec = {
- 'members': members_option,
- }
-
- def __init__(self, directive, name, indent=u'', my_id = None):
- super(DoxygenDocumenter, self).__init__(directive, name, indent)
- if my_id is not None:
- self.parse_id(my_id)
-
- def parse_id(self, id_to_parse):
- return False
-
- def parse_name(self):
- """Determine what module to import and what attribute to document.
- Returns True and sets *self.modname*, *self.objname*, *self.fullname*,
- if parsing and resolving was successful.
- """
- # To view the context and order in which all of these methods get called,
- # See, Documenter.generate(). That's the main "entry point" that first
- # calls parse_name(), follwed by import_object(), format_signature(),
- # add_directive_header(), and then add_content() (which calls get_doc())
-
- # If we were provided a prototype, that must be an overloaded function. Save it.
- self.argsstring = None
- if "(" in self.name:
- (self.name, self.argsstring) = self.name.split('(', 1)
- self.argsstring = "({}".format(self.argsstring)
-
- # methods in the superclass sometimes use '.' to join namespace/class
- # names with method names, and we don't want that.
- self.name = self.name.replace('.', '::')
- self.fullname = self.name
- self.modname = self.fullname
- self.objpath = []
-
- if '::' in self.name:
- parts = self.name.split('::')
- self.klassname = parts[-2]
- self.objname = parts[-1]
- else:
- self.objname = self.name
- self.klassname = ""
-
- return True
-
- def add_directive_header(self, sig):
- """Add the directive header and options to the generated content."""
- domain = getattr(self, 'domain', 'cpp')
- directive = getattr(self, 'directivetype', self.objtype)
- name = self.format_name()
- sourcename = self.get_sourcename()
- #print('.. %s:%s:: %s%s' % (domain, directive, name, sig))
- self.add_line(u'.. %s:%s:: %s%s' % (domain, directive, name, sig),
- sourcename)
-
- def document_members(self, all_members=False):
- """Generate reST for member documentation.
- If *all_members* is True, do all members, else those given by
- *self.options.members*.
- """
- want_all = all_members or self.options.inherited_members or \
- self.options.members is ALL
- # find out which members are documentable
- members_check_module, members = self.get_object_members(want_all)
-
- # remove members given by exclude-members
- if self.options.exclude_members:
- members = [(membername, member) for (membername, member) in members
- if membername not in self.options.exclude_members]
-
- # document non-skipped members
- memberdocumenters = []
- for (mname, member, isattr) in self.filter_members(members, want_all):
- if sphinxVersion >= 2:
- classes = [cls for cls in itervalues(self.env.app.registry.documenters)
- if cls.can_document_member(member, mname, isattr, self)]
- else:
- classes = [cls for cls in itervalues(AutoDirective._registry)
- if cls.can_document_member(member, mname, isattr, self)]
- if not classes:
- # don't know how to document this member
- continue
-
- # prefer the documenter with the highest priority
- classes.sort(key=lambda cls: cls.priority)
-
- documenter = classes[-1](self.directive, mname, indent=self.indent, id=member.get('id'))
- memberdocumenters.append((documenter, isattr))
-
- for documenter, isattr in memberdocumenters:
- documenter.generate(
- all_members=True, real_modname=self.real_modname,
- check_module=members_check_module and not isattr)
-
- # reset current objects
- self.env.temp_data['autodoc:module'] = None
- self.env.temp_data['autodoc:class'] = None
-
-
-class DoxygenClassDocumenter(DoxygenDocumenter):
- objtype = 'doxyclass'
- directivetype = 'class'
- domain = 'cpp'
- priority = 100
-
- option_spec = {
- 'members': members_option,
- }
-
- @classmethod
- def can_document_member(cls, member, membername, isattr, parent):
- # this method is only called from Documenter.document_members
- # when a higher level documenter (module or namespace) is trying
- # to choose the appropriate documenter for each of its lower-level
- # members. Currently not implemented since we don't have a higher-level
- # doumenter like a DoxygenNamespaceDocumenter.
- return False
-
- def import_object(self):
- """Import the object and set it as *self.object*. In the call sequence, this
- is executed right after parse_name(), so it can use *self.fullname*, *self.objname*,
- and *self.modname*.
-
- Returns True if successful, False if an error occurred.
- """
- xpath_query = './/compoundname[text()="%s"]/..' % self.fullname
- match = get_doxygen_root().xpath(xpath_query)
- if len(match) != 1:
- raise ExtensionError('[autodoxy] could not find class (fullname="%s"). I tried '
- 'the following xpath: "%s"' % (self.fullname, xpath_query))
-
- self.object = match[0]
- return True
-
- def format_signature(self):
- return ''
-
- def format_name(self):
- return self.fullname
-
- def get_doc(self, encoding=None): # This method is called with 1 parameter in Sphinx 2.x and 2 parameters in Sphinx 1.x
- detaileddescription = self.object.find('detaileddescription')
- doc = [format_xml_paragraph(detaileddescription)]
- return doc
-
- def get_object_members(self, want_all):
- all_members = self.object.xpath('.//sectiondef[@kind="public-func" '
- 'or @kind="public-static-func"]/memberdef[@kind="function"]')
-
- if want_all:
- return False, ((m.find('name').text, m) for m in all_members)
- if not self.options.members:
- return False, []
- return False, ((m.find('name').text, m) for m in all_members if m.find('name').text in self.options.members)
-
- def filter_members(self, members, want_all):
- ret = []
- for (membername, member) in members:
- ret.append((membername, member, False))
- return ret
-
- def document_members(self, all_members=False):
- super(DoxygenClassDocumenter, self).document_members(all_members=all_members)
- # Uncomment to view the generated rst for the class.
- # print('\n'.join(self.directive.result))
-
-autodoxy_requalified_identifiers = []
-def fix_namespaces(str):
- for unqualified,fullyqualif in autodoxy_requalified_identifiers:
- p = re.compile("(^| ){:s}".format(unqualified))
- str = p.sub(' {:s}'.format(fullyqualif), str)
- return str
-
-class DoxygenMethodDocumenter(DoxygenDocumenter):
- objtype = 'doxymethod'
- directivetype = 'function'
- domain = 'cpp'
- priority = 100
-
- @classmethod
- def can_document_member(cls, member, membername, isattr, parent):
- if ET.iselement(member) and member.tag == 'memberdef' and member.get('kind') == 'function':
- return True
- return False
-
- def parse_id(self, id_to_parse):
- print("Parse ID {}".format(id_to_parse))
- xp = './/*[@id="%s"]' % id_to_parse
- match = get_doxygen_root().xpath(xp)
- if match:
- match = match[0]
- print("ID: {}".format(elm2xml(match)))
- self.fullname = match.find('./definition').text.split()[-1]
- self.modname = self.fullname
- self.objname = match.find('./name').text
- self.object = match
- return False
-
- def import_object(self):
- if ET.iselement(self.object):
- # self.object already set from DoxygenDocumenter.parse_name(),
- # caused by passing in the `id` of the node instead of just a
- # classname or method name
- return True
-
-# sys.stderr.write("fullname: {}".format(self.fullname))
-# traceback.print_stack()
- if '::' in self.fullname:
- (obj, meth) = self.fullname.rsplit('::', 1)
- # 'public-func' and 'public-static-func' are for classes while 'func' alone is for namespaces
- prefix = './/compoundname[text()="{:s}"]/../sectiondef[@kind="public-func" or @kind="public-static-func" or @kind="func"]'.format(obj)
- obj = "{:s}::".format(obj)
- else:
- meth = self.fullname
- prefix = './'
- obj = ''
-
- xpath_query_noparam = ('{:s}/memberdef[@kind="function"]/name[text()="{:s}"]/..').format(prefix, meth)
- xpath_query = ""
- if self.argsstring is not None:
- xpath_query = ('{:s}/memberdef[@kind="function" and argsstring/text()="{:s}"]/name[text()="{:s}"]/..').format(prefix,self.argsstring,meth)
- else:
- xpath_query = xpath_query_noparam
- match = get_doxygen_root().xpath(xpath_query)
- if not match:
- logger = logging.getLogger(__name__)
-
- if self.argsstring is not None:
- candidates = get_doxygen_root().xpath(xpath_query_noparam)
- if len(candidates) == 1:
- logger.warning("[autodoxy] Using method '{}{}{}' instead of '{}{}{}'. You may want to drop your specification of the signature, or to fix it."
- .format(obj, meth, candidates[0].find('argsstring').text, obj, meth, self.argsstring))
- self.object = candidates[0]
- return True
- logger.warning("[autodoxy] WARNING: Could not find method {}{}{}".format(obj, meth, self.argsstring))
- if not candidates:
- logger.warning("[autodoxy] WARNING: (no candidate found)")
- logger.warning("Query was: {}".format(xpath_query))
- for cand in candidates:
- logger.warning("[autodoxy] WARNING: Existing candidate: {}{}{}".format(obj, meth, cand.find('argsstring').text))
- else:
- logger.warning("[autodoxy] WARNING: Could not find method {}{} in Doxygen files\nQuery: {}".format(obj, meth, xpath_query))
- return False
- self.object = match[0]
- return True
-
- def get_doc(self, encoding=None): # This method is called with 1 parameter in Sphinx 2.x and 2 parameters in Sphinx 1.x
- detaileddescription = self.object.find('detaileddescription')
- doc = [format_xml_paragraph(detaileddescription)]
- return doc
-
- def format_name(self):
- def text(el):
- if el.text is not None:
- return el.text
- return ''
-
- def tail(el):
- if el.tail is not None:
- return el.tail
- return ''
-
- rtype_el = self.object.find('type')
- rtype_el_ref = rtype_el.find('ref')
- if rtype_el_ref is not None:
- rtype = text(rtype_el) + text(rtype_el_ref) + tail(rtype_el_ref)
- else:
- rtype = rtype_el.text
-
- # print("rtype: {}".format(rtype))
- signame = fix_namespaces((rtype and (rtype + ' ') or '') + self.klassname + "::"+ self.objname )
-# print("signame: '{}'".format(signame))
- return self.format_template_name() + signame
-
- def format_template_name(self):
- types = [e.text for e in self.object.findall('templateparamlist/param/type')]
- if not types:
- return ''
- ret = 'template <%s>' % ','.join(types)
-# print ("template: {}".format(ret))
- return ret
-
- def format_signature(self):
- args = fix_namespaces(self.object.find('argsstring').text)
-# print ("signature: {}".format(args))
- return args
-
- def document_members(self, all_members=False):
- pass
-
-class DoxygenVariableDocumenter(DoxygenDocumenter):
- objtype = 'doxyvar'
- directivetype = 'var'
- domain = 'cpp'
- priority = 100
-
- @classmethod
- def can_document_member(cls, member, membername, isattr, parent):
- if ET.iselement(member) and member.tag == 'memberdef' and member.get('kind') == 'variable':
- return True
- return False
-
- def import_object(self):
- if ET.iselement(self.object):
- # self.object already set from DoxygenDocumenter.parse_name(),
- # caused by passing in the `id` of the node instead of just a
- # classname or method name
- return True
-
- (obj, var) = self.fullname.rsplit('::', 1)
-
- xpath_query = ('.//compoundname[text()="{:s}"]/../sectiondef[@kind="public-attrib" or @kind="public-static-attrib"]'
- '/memberdef[@kind="variable"]/name[text()="{:s}"]/..').format(obj, var)
-# print("fullname {}".format(self.fullname))
- match = get_doxygen_root().xpath(xpath_query)
- if not match:
- logger = logging.getLogger(__name__)
-
- logger.warning("[autodoxy] WARNING: could not find variable {}::{} in Doxygen files".format(obj, var))
- return False
- self.object = match[0]
- return True
-
- def parse_id(self, id_to_parse):
- xp = './/*[@id="%s"]' % id_to_parse
- match = get_doxygen_root().xpath(xp)
- if match:
- match = match[0]
- self.fullname = match.find('./definition').text.split()[-1]
- self.modname = self.fullname
- self.objname = match.find('./name').text
- self.object = match
- return False
-
- def format_name(self):
- def text(el):
- if el.text is not None:
- return el.text
- return ''
-
- # Remove all tags (such as refs) but keep the text of the element's type
- rtype = elm2txt(self.object.find('type')).replace("\n", " ")
- rtype = re.sub(" +", " ", rtype) # s/ +/ /
- signame = (rtype and (rtype + ' ') or '') + self.klassname + "::" + self.objname
- res = fix_namespaces(self.format_template_name() + signame)
-# print("formatted name: {}".format(res))
- return res
-
- def get_doc(self, encoding=None): # This method is called with 1 parameter in Sphinx 2.x and 2 parameters in Sphinx 1.x
- detaileddescription = self.object.find('detaileddescription')
- doc = [format_xml_paragraph(detaileddescription)]
-# print ("doc: {}".format(doc))
- return doc
-
- def format_template_name(self):
- types = [e.text for e in self.object.findall('templateparamlist/param/type')]
- if not types:
- return ''
- ret = 'template <%s>' % ','.join(types)
-# print ("template: {}".format(ret))
- return ret
-
- def document_members(self, all_members=False):
- pass
-
-
-##########################################################################
-# Setup the extension
-##########################################################################
-def set_doxygen_xml(app):
- """Load all doxygen XML files from the app config variable
- `app.config.doxygen_xml` which should be a path to a directory
- containing doxygen xml output
- """
- err = ExtensionError(
- '[autodoxy] No doxygen xml output found in doxygen_xml="%s"' % app.config.doxygen_xml)
-
- if not os.path.isdir(app.config.doxygen_xml):
- raise err
-
- files = [os.path.join(app.config.doxygen_xml, f)
- for f in os.listdir(app.config.doxygen_xml)
- if f.lower().endswith('.xml') and not f.startswith('._')]
- if not files:
- raise err
-
- setup.DOXYGEN_ROOT = ET.ElementTree(ET.Element('root')).getroot()
- for current_file in files:
- root = ET.parse(current_file).getroot()
- for node in root:
- setup.DOXYGEN_ROOT.append(node)
-
- if app.config.autodoxy_requalified_identifiers is not None:
- global autodoxy_requalified_identifiers
- autodoxy_requalified_identifiers = app.config.autodoxy_requalified_identifiers
-
-def get_doxygen_root():
- """Get the root element of the doxygen XML document.
- """
- if not hasattr(setup, 'DOXYGEN_ROOT'):
- setup.DOXYGEN_ROOT = ET.Element("root") # dummy
- return setup.DOXYGEN_ROOT
-
-
-def setup(app):
- import sphinx.ext.autosummary
-
- app.connect("builder-inited", set_doxygen_xml)
-# app.connect("builder-inited", process_generate_options)
-
- app.setup_extension('sphinx.ext.autodoc')
-# app.setup_extension('sphinx.ext.autosummary')
-
- app.add_autodocumenter(DoxygenClassDocumenter)
- app.add_autodocumenter(DoxygenMethodDocumenter)
- app.add_autodocumenter(DoxygenVariableDocumenter)
- app.add_config_value("doxygen_xml", "", True)
- app.add_config_value("autodoxy_requalified_identifiers", [], True)
-
-# app.add_directive('autodoxysummary', DoxygenAutosummary)
-# app.add_directive('autodoxyenum', DoxygenAutoEnum)
-
- return {'version': sphinx.__display_version__, 'parallel_read_safe': True}
class Actor
==============
-.. autodoxyclass:: simgrid::s4u::Actor
+.. doxygenclass:: simgrid::s4u::Actor
.. doxygentypedef:: aid_t
Pointer to a constant actor object.
- .. autodoxymethod:: sg_actor_ref(const_sg_actor_t actor)
- .. autodoxymethod:: sg_actor_unref(const_sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_ref
+ .. doxygenfunction:: sg_actor_unref
+
Creating actors
---------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, const std::function< void()> &code)
- .. autodoxymethod:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, F code)
- .. autodoxymethod:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, F code, Args... args)
- .. autodoxymethod:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, const std::string &function, std::vector< std::string > args)
+ .. doxygenfunction:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, const std::function< void()> &code)
+ .. doxygenfunction:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, F code)
+ .. doxygenfunction:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, F code, Args... args)
+ .. doxygenfunction:: simgrid::s4u::Actor::create(const std::string &name, s4u::Host *host, const std::string &function, std::vector< std::string > args)
- .. autodoxymethod:: simgrid::s4u::Actor::init(const std::string &name, s4u::Host *host)
- .. autodoxymethod:: simgrid::s4u::Actor::start(const std::function< void()> &code)
+ .. doxygenfunction:: simgrid::s4u::Actor::init(const std::string &name, s4u::Host *host)
+ .. doxygenfunction:: simgrid::s4u::Actor::start(const std::function< void()> &code)
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_actor_create(const char *name, sg_host_t host, xbt_main_func_t code, int argc, const char *const *argv)
- .. autodoxymethod:: sg_actor_init(const char *name, sg_host_t host)
- .. autodoxymethod:: sg_actor_start(sg_actor_t actor, xbt_main_func_t code, int argc, const char *const *argv)
+ .. doxygenfunction:: sg_actor_create(const char *name, sg_host_t host, xbt_main_func_t code, int argc, const char *const *argv)
+ .. doxygenfunction:: sg_actor_init(const char *name, sg_host_t host)
+ .. doxygenfunction:: sg_actor_start(sg_actor_t actor, xbt_main_func_t code, int argc, const char *const *argv)
- .. autodoxymethod:: sg_actor_attach(const char *name, void *data, sg_host_t host, xbt_dict_t properties)
- .. autodoxymethod:: sg_actor_detach()
+ .. doxygenfunction:: sg_actor_attach(const char *name, void *data, sg_host_t host, xbt_dict_t properties)
+ .. doxygenfunction:: sg_actor_detach()
Retrieving actors
-----------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Actor::by_pid(aid_t pid)
- .. autodoxymethod:: simgrid::s4u::Actor::self()
+ .. doxygenfunction:: simgrid::s4u::Actor::by_pid(aid_t pid)
+ .. doxygenfunction:: simgrid::s4u::Actor::self()
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_actor_by_PID(aid_t pid)
- .. autodoxymethod:: sg_actor_self()
+ .. doxygenfunction:: sg_actor_by_PID(aid_t pid)
+ .. doxygenfunction:: sg_actor_self()
Querying info
-------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Actor::get_cname
- .. autodoxymethod:: simgrid::s4u::Actor::get_name
- .. autodoxymethod:: simgrid::s4u::Actor::get_pid
- .. autodoxymethod:: simgrid::s4u::Actor::get_ppid
- .. autodoxymethod:: simgrid::s4u::Actor::get_properties() const
- .. autodoxymethod:: simgrid::s4u::Actor::get_property(const std::string &key) const
- .. autodoxymethod:: simgrid::s4u::Actor::set_property(const std::string &key, const std::string &value)
+ .. doxygenfunction:: simgrid::s4u::Actor::get_cname
+ .. doxygenfunction:: simgrid::s4u::Actor::get_name
+ .. doxygenfunction:: simgrid::s4u::Actor::get_pid
+ .. doxygenfunction:: simgrid::s4u::Actor::get_ppid
+ .. doxygenfunction:: simgrid::s4u::Actor::get_properties() const
+ .. doxygenfunction:: simgrid::s4u::Actor::get_property(const std::string &key) const
+ .. doxygenfunction:: simgrid::s4u::Actor::set_property(const std::string &key, const std::string &value)
- .. autodoxymethod:: simgrid::s4u::Actor::get_host
- .. autodoxymethod:: simgrid::s4u::Actor::set_host
+ .. doxygenfunction:: simgrid::s4u::Actor::get_host
+ .. doxygenfunction:: simgrid::s4u::Actor::set_host
- .. autodoxymethod:: simgrid::s4u::Actor::get_refcount
- .. autodoxymethod:: simgrid::s4u::Actor::get_impl
+ .. doxygenfunction:: simgrid::s4u::Actor::get_refcount
+ .. doxygenfunction:: simgrid::s4u::Actor::get_impl
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_actor_get_name(const_sg_actor_t actor)
- .. autodoxymethod:: sg_actor_get_PID(const_sg_actor_t actor)
- .. autodoxymethod:: sg_actor_get_PPID(const_sg_actor_t actor)
- .. autodoxymethod:: sg_actor_get_properties(const_sg_actor_t actor)
- .. autodoxymethod:: sg_actor_get_property_value(const_sg_actor_t actor, const char *name)
+ .. doxygenfunction:: sg_actor_get_name(const_sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_get_PID(const_sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_get_PPID(const_sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_get_properties(const_sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_get_property_value(const_sg_actor_t actor, const char *name)
- .. autodoxymethod:: sg_actor_get_host(const_sg_actor_t actor)
- .. autodoxymethod:: sg_actor_set_host(sg_actor_t actor, sg_host_t host)
+ .. doxygenfunction:: sg_actor_get_host(const_sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_set_host(sg_actor_t actor, sg_host_t host)
- .. autodoxymethod:: sg_actor_get_data(const_sg_actor_t actor)
- .. autodoxymethod:: sg_actor_set_data(sg_actor_t actor, void *userdata)
+ .. doxygenfunction:: sg_actor_get_data(const_sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_set_data(sg_actor_t actor, void *userdata)
Suspending and resuming actors
------------------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Actor::suspend()
- .. autodoxymethod:: simgrid::s4u::Actor::resume()
- .. autodoxymethod:: simgrid::s4u::Actor::is_suspended
+ .. doxygenfunction:: simgrid::s4u::Actor::suspend()
+ .. doxygenfunction:: simgrid::s4u::Actor::resume()
+ .. doxygenfunction:: simgrid::s4u::Actor::is_suspended
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_actor_suspend(sg_actor_t actor)
- .. autodoxymethod:: sg_actor_resume(sg_actor_t actor)
- .. autodoxymethod:: sg_actor_is_suspended(const_sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_suspend(sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_resume(sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_is_suspended(const_sg_actor_t actor)
Specifying when actors should terminate
---------------------------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Actor::kill()
- .. autodoxymethod:: simgrid::s4u::Actor::kill_all()
- .. autodoxymethod:: simgrid::s4u::Actor::set_kill_time(double time)
- .. autodoxymethod:: simgrid::s4u::Actor::get_kill_time
+ .. doxygenfunction:: simgrid::s4u::Actor::kill()
+ .. doxygenfunction:: simgrid::s4u::Actor::kill_all()
+ .. doxygenfunction:: simgrid::s4u::Actor::set_kill_time(double time)
+ .. doxygenfunction:: simgrid::s4u::Actor::get_kill_time
- .. autodoxymethod:: simgrid::s4u::Actor::restart()
- .. autodoxymethod:: simgrid::s4u::Actor::daemonize()
- .. autodoxymethod:: simgrid::s4u::Actor::is_daemon
+ .. doxygenfunction:: simgrid::s4u::Actor::restart()
+ .. doxygenfunction:: simgrid::s4u::Actor::daemonize()
+ .. doxygenfunction:: simgrid::s4u::Actor::is_daemon
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_actor_kill(sg_actor_t actor)
- .. autodoxymethod:: sg_actor_kill_all()
- .. autodoxymethod:: sg_actor_set_kill_time(sg_actor_t actor, double kill_time)
+ .. doxygenfunction:: sg_actor_kill(sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_kill_all()
+ .. doxygenfunction:: sg_actor_set_kill_time(sg_actor_t actor, double kill_time)
- .. autodoxymethod:: sg_actor_restart(sg_actor_t actor)
- .. autodoxymethod:: sg_actor_daemonize(sg_actor_t actor)
- .. autodoxymethod:: sg_actor_is_daemon
+ .. doxygenfunction:: sg_actor_restart(sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_daemonize(sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_is_daemon
.. _API_s4u_Actor_end:
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Actor::on_exit
- .. autodoxymethod:: simgrid::s4u::Actor::join() const
- .. autodoxymethod:: simgrid::s4u::Actor::join(double timeout) const
- .. autodoxymethod:: simgrid::s4u::Actor::set_auto_restart(bool autorestart)
+ .. doxygenfunction:: simgrid::s4u::Actor::on_exit
+ .. doxygenfunction:: simgrid::s4u::Actor::join() const
+ .. doxygenfunction:: simgrid::s4u::Actor::join(double timeout) const
+ .. doxygenfunction:: simgrid::s4u::Actor::set_auto_restart(bool autorestart)
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_actor_join(const_sg_actor_t actor, double timeout)
- .. autodoxymethod:: sg_actor_set_auto_restart(sg_actor_t actor, int auto_restart)
+ .. doxygenfunction:: sg_actor_join(const_sg_actor_t actor, double timeout)
+ .. doxygenfunction:: sg_actor_set_auto_restart(sg_actor_t actor, int auto_restart)
Signals
-------
.. group-tab:: C++
- .. autodoxyvar:: simgrid::s4u::Actor::on_creation
- .. autodoxyvar:: simgrid::s4u::Actor::on_suspend
- .. autodoxyvar:: simgrid::s4u::Actor::on_host_change
- .. autodoxyvar:: simgrid::s4u::Actor::on_resume
- .. autodoxyvar:: simgrid::s4u::Actor::on_sleep
- .. autodoxyvar:: simgrid::s4u::Actor::on_wake_up
- .. autodoxyvar:: simgrid::s4u::Actor::on_termination
- .. autodoxyvar:: simgrid::s4u::Actor::on_destruction
+ .. doxygenvariable:: simgrid::s4u::Actor::on_creation
+ .. doxygenvariable:: simgrid::s4u::Actor::on_suspend
+ .. doxygenvariable:: simgrid::s4u::Actor::on_host_change
+ .. doxygenvariable:: simgrid::s4u::Actor::on_resume
+ .. doxygenvariable:: simgrid::s4u::Actor::on_sleep
+ .. doxygenvariable:: simgrid::s4u::Actor::on_wake_up
+ .. doxygenvariable:: simgrid::s4u::Actor::on_termination
+ .. doxygenvariable:: simgrid::s4u::Actor::on_destruction
.. _API_s4u_this_actor:
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::this_actor::get_cname()
- .. autodoxymethod:: simgrid::s4u::this_actor::get_name()
- .. autodoxymethod:: simgrid::s4u::this_actor::get_pid()
- .. autodoxymethod:: simgrid::s4u::this_actor::get_ppid()
- .. autodoxymethod:: simgrid::s4u::this_actor::is_maestro()
+ .. doxygenfunction:: simgrid::s4u::this_actor::get_cname()
+ .. doxygenfunction:: simgrid::s4u::this_actor::get_name()
+ .. doxygenfunction:: simgrid::s4u::this_actor::get_pid()
+ .. doxygenfunction:: simgrid::s4u::this_actor::get_ppid()
+ .. doxygenfunction:: simgrid::s4u::this_actor::is_maestro()
- .. autodoxymethod:: simgrid::s4u::this_actor::get_host()
- .. autodoxymethod:: simgrid::s4u::this_actor::set_host(Host *new_host)
+ .. doxygenfunction:: simgrid::s4u::this_actor::get_host()
+ .. doxygenfunction:: simgrid::s4u::this_actor::set_host(Host *new_host)
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_actor_self_get_data()
- .. autodoxymethod:: sg_actor_self_set_data(void *data)
- .. autodoxymethod:: sg_actor_self_get_name()
- .. autodoxymethod:: sg_actor_self_get_pid()
- .. autodoxymethod:: sg_actor_self_get_ppid()
- .. autodoxymethod:: sg_host_self()
- .. autodoxymethod:: sg_host_self_get_name()
+ .. doxygenfunction:: sg_actor_self_get_data()
+ .. doxygenfunction:: sg_actor_self_set_data(void *data)
+ .. doxygenfunction:: sg_actor_self_get_name()
+ .. doxygenfunction:: sg_actor_self_get_pid()
+ .. doxygenfunction:: sg_actor_self_get_ppid()
+ .. doxygenfunction:: sg_host_self()
+ .. doxygenfunction:: sg_host_self_get_name()
Suspending and resuming
-----------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::this_actor::suspend()
- .. autodoxymethod:: simgrid::s4u::this_actor::yield()
+ .. doxygenfunction:: simgrid::s4u::this_actor::suspend()
+ .. doxygenfunction:: simgrid::s4u::this_actor::yield()
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_actor_yield()
+ .. doxygenfunction:: sg_actor_yield()
Logging messages
----------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::this_actor::sleep_for(double duration)
- .. autodoxymethod:: simgrid::s4u::this_actor::sleep_for(std::chrono::duration< Rep, Period > duration)
- .. autodoxymethod:: simgrid::s4u::this_actor::sleep_until(const SimulationTimePoint< Duration > &wakeup_time)
- .. autodoxymethod:: simgrid::s4u::this_actor::sleep_until(double wakeup_time)
+ .. doxygenfunction:: simgrid::s4u::this_actor::sleep_for(double duration)
+ .. doxygenfunction:: simgrid::s4u::this_actor::sleep_for(std::chrono::duration< Rep, Period > duration)
+ .. doxygenfunction:: simgrid::s4u::this_actor::sleep_until(const SimulationTimePoint< Duration > &wakeup_time)
+ .. doxygenfunction:: simgrid::s4u::this_actor::sleep_until(double wakeup_time)
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_actor_sleep_for(double duration)
+ .. doxygenfunction:: sg_actor_sleep_for(double duration)
Simulating executions
---------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::this_actor::exec_async
- .. autodoxymethod:: simgrid::s4u::this_actor::exec_init(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts)
- .. autodoxymethod:: simgrid::s4u::this_actor::exec_init(double flops_amounts)
- .. autodoxymethod:: simgrid::s4u::this_actor::execute(double flop)
- .. autodoxymethod:: simgrid::s4u::this_actor::execute(double flop, double priority)
- .. autodoxymethod:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts)
- .. autodoxymethod:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts, double timeout)
+ .. doxygenfunction:: simgrid::s4u::this_actor::exec_async
+ .. doxygenfunction:: simgrid::s4u::this_actor::exec_init(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts)
+ .. doxygenfunction:: simgrid::s4u::this_actor::exec_init(double flops_amounts)
+ .. doxygenfunction:: simgrid::s4u::this_actor::execute(double flop)
+ .. doxygenfunction:: simgrid::s4u::this_actor::execute(double flop, double priority)
+ .. doxygenfunction:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts)
+ .. doxygenfunction:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts, double timeout)
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_actor_execute(double flops)
- .. autodoxymethod:: sg_actor_execute_with_priority(double flops, double priority)
- .. autodoxymethod:: sg_actor_exec_init(double computation_amount)
- .. autodoxymethod:: sg_actor_exec_async(double computation_amount)
+ .. doxygenfunction:: sg_actor_execute(double flops)
+ .. doxygenfunction:: sg_actor_execute_with_priority(double flops, double priority)
+ .. doxygenfunction:: sg_actor_exec_init(double computation_amount)
+ .. doxygenfunction:: sg_actor_exec_async(double computation_amount)
+ .. doxygenfunction:: sg_actor_parallel_exec_init(int host_nb, const sg_host_t* host_list, double* flops_amount, double* bytes_amount);
Exiting
-------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::this_actor::exit()
- .. autodoxymethod:: simgrid::s4u::this_actor::on_exit(const std::function< void(bool)> &fun)
+ .. doxygenfunction:: simgrid::s4u::this_actor::exit()
+ .. doxygenfunction:: simgrid::s4u::this_actor::on_exit(const std::function< void(bool)> &fun)
.. group-tab:: Python
Simulation Engine
====================
-.. autodoxyclass:: simgrid::s4u::Engine
+.. doxygenclass:: simgrid::s4u::Engine
Initialization
--------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Engine::Engine(int *argc, char **argv)
- .. autodoxymethod:: simgrid::s4u::Engine::is_initialized()
- .. autodoxymethod:: simgrid::s4u::Engine::shutdown()
- .. autodoxymethod:: simgrid::s4u::Engine::set_config(const std::string &str)
- .. autodoxymethod:: simgrid::s4u::Engine::set_config(const std::string &name, bool value)
- .. autodoxymethod:: simgrid::s4u::Engine::set_config(const std::string &name, double value)
- .. autodoxymethod:: simgrid::s4u::Engine::set_config(const std::string &name, int value)
- .. autodoxymethod:: simgrid::s4u::Engine::set_config(const std::string &name, const std::string &value)
+ .. doxygenfunction:: simgrid::s4u::Engine::Engine(int *argc, char **argv)
+ .. doxygenfunction:: simgrid::s4u::Engine::is_initialized()
+ .. doxygenfunction:: simgrid::s4u::Engine::shutdown()
+ .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &str)
+ .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &name, bool value)
+ .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &name, double value)
+ .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &name, int value)
+ .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &name, const std::string &value)
- .. autodoxymethod:: simgrid::s4u::Engine::load_deployment
- .. autodoxymethod:: simgrid::s4u::Engine::load_platform
- .. autodoxymethod:: simgrid::s4u::Engine::register_actor(const std::string &name)
- .. autodoxymethod:: simgrid::s4u::Engine::register_actor(const std::string &name, F code)
- .. autodoxymethod:: simgrid::s4u::Engine::register_default(const std::function< void(int, char **)> &code)
- .. autodoxymethod:: simgrid::s4u::Engine::register_default(const kernel::actor::ActorCodeFactory &factory)
+ .. doxygenfunction:: simgrid::s4u::Engine::load_deployment
+ .. doxygenfunction:: simgrid::s4u::Engine::load_platform
+ .. doxygenfunction:: simgrid::s4u::Engine::register_actor(const std::string &name)
+ .. doxygenfunction:: simgrid::s4u::Engine::register_actor(const std::string &name, F code)
+ .. doxygenfunction:: simgrid::s4u::Engine::register_default(const std::function< void(int, char **)> &code)
+ .. doxygenfunction:: simgrid::s4u::Engine::register_default(const kernel::actor::ActorCodeFactory &factory)
- .. autodoxymethod:: simgrid::s4u::Engine::register_function(const std::string &name, const std::function< void(int, char **)> &code)
- .. autodoxymethod:: simgrid::s4u::Engine::register_function(const std::string &name, const std::function< void(std::vector< std::string >)> &code)
- .. autodoxymethod:: simgrid::s4u::Engine::register_function(const std::string &name, const kernel::actor::ActorCodeFactory &factory)
+ .. doxygenfunction:: simgrid::s4u::Engine::register_function(const std::string &name, const std::function< void(int, char **)> &code)
+ .. doxygenfunction:: simgrid::s4u::Engine::register_function(const std::string &name, const std::function< void(std::vector< std::string >)> &code)
+ .. doxygenfunction:: simgrid::s4u::Engine::register_function(const std::string &name, const kernel::actor::ActorCodeFactory &factory)
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: simgrid_init
+ .. doxygenfunction:: simgrid_init
- .. autodoxymethod:: simgrid_load_deployment
- .. autodoxymethod:: simgrid_load_platform
- .. autodoxymethod:: simgrid_register_default
- .. autodoxymethod:: simgrid_register_function
+ .. doxygenfunction:: simgrid_load_deployment
+ .. doxygenfunction:: simgrid_load_platform
+ .. doxygenfunction:: simgrid_register_default
+ .. doxygenfunction:: simgrid_register_function
Run the simulation
------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Engine::get_clock()
- .. autodoxymethod:: simgrid::s4u::Engine::run
+ .. doxygenfunction:: simgrid::s4u::Engine::get_clock()
+ .. doxygenfunction:: simgrid::s4u::Engine::run
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: simgrid_get_clock
- .. autodoxymethod:: simgrid_run
+ .. doxygenfunction:: simgrid_get_clock
+ .. doxygenfunction:: simgrid_run
Retrieving actors
-----------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Engine::get_actor_count
- .. autodoxymethod:: simgrid::s4u::Engine::get_all_actors
- .. autodoxymethod:: simgrid::s4u::Engine::get_filtered_actors
+ .. doxygenfunction:: simgrid::s4u::Engine::get_actor_count
+ .. doxygenfunction:: simgrid::s4u::Engine::get_all_actors
+ .. doxygenfunction:: simgrid::s4u::Engine::get_filtered_actors
.. group-tab:: C
- .. autodoxymethod:: simgrid_get_actor_count()
+ .. doxygenfunction:: simgrid_get_actor_count()
Retrieving hosts
----------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Engine::get_all_hosts
- .. autodoxymethod:: simgrid::s4u::Engine::get_host_count
- .. autodoxymethod:: simgrid::s4u::Engine::get_filtered_hosts
- .. autodoxymethod:: simgrid::s4u::Engine::host_by_name
- .. autodoxymethod:: simgrid::s4u::Engine::host_by_name_or_null
+ .. doxygenfunction:: simgrid::s4u::Engine::get_all_hosts
+ .. doxygenfunction:: simgrid::s4u::Engine::get_host_count
+ .. doxygenfunction:: simgrid::s4u::Engine::get_filtered_hosts
+ .. doxygenfunction:: simgrid::s4u::Engine::host_by_name
+ .. doxygenfunction:: simgrid::s4u::Engine::host_by_name_or_null
.. group-tab:: Python
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Engine::get_all_links
- .. autodoxymethod:: simgrid::s4u::Engine::get_link_count
- .. autodoxymethod:: simgrid::s4u::Engine::get_filtered_links
- .. autodoxymethod:: simgrid::s4u::Engine::link_by_name
- .. autodoxymethod:: simgrid::s4u::Engine::link_by_name_or_null
+ .. doxygenfunction:: simgrid::s4u::Engine::get_all_links
+ .. doxygenfunction:: simgrid::s4u::Engine::get_link_count
+ .. doxygenfunction:: simgrid::s4u::Engine::get_filtered_links
+ .. doxygenfunction:: simgrid::s4u::Engine::link_by_name
+ .. doxygenfunction:: simgrid::s4u::Engine::link_by_name_or_null
Interacting with the routing
----------------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Engine::get_all_netpoints
- .. autodoxymethod:: simgrid::s4u::Engine::get_filtered_netzones
- .. autodoxymethod:: simgrid::s4u::Engine::get_instance()
- .. autodoxymethod:: simgrid::s4u::Engine::get_netzone_root
- .. autodoxymethod:: simgrid::s4u::Engine::netpoint_by_name_or_null
- .. autodoxymethod:: simgrid::s4u::Engine::netzone_by_name_or_null
- .. autodoxymethod:: simgrid::s4u::Engine::set_netzone_root(const NetZone *netzone)
+ .. doxygenfunction:: simgrid::s4u::Engine::get_all_netpoints
+ .. doxygenfunction:: simgrid::s4u::Engine::get_filtered_netzones
+ .. doxygenfunction:: simgrid::s4u::Engine::get_instance()
+ .. doxygenfunction:: simgrid::s4u::Engine::get_netzone_root
+ .. doxygenfunction:: simgrid::s4u::Engine::netpoint_by_name_or_null
+ .. doxygenfunction:: simgrid::s4u::Engine::netzone_by_name_or_null
+ .. doxygenfunction:: simgrid::s4u::Engine::set_netzone_root(const NetZone *netzone)
Signals
-------
.. group-tab:: C++
- .. autodoxyvar:: simgrid::s4u::Engine::on_deadlock
- .. autodoxyvar:: simgrid::s4u::Engine::on_platform_created
- .. autodoxyvar:: simgrid::s4u::Engine::on_platform_creation
- .. autodoxyvar:: simgrid::s4u::Engine::on_simulation_end
- .. autodoxyvar:: simgrid::s4u::Engine::on_time_advance
+ .. doxygenvariable:: simgrid::s4u::Engine::on_deadlock
+ .. doxygenvariable:: simgrid::s4u::Engine::on_platform_created
+ .. doxygenvariable:: simgrid::s4u::Engine::on_platform_creation
+ .. doxygenvariable:: simgrid::s4u::Engine::on_simulation_end
+ .. doxygenvariable:: simgrid::s4u::Engine::on_time_advance
.. _API_s4u_Mailbox:
class Mailbox
================
-.. autodoxyclass:: simgrid::s4u::Mailbox
+.. doxygenclass:: simgrid::s4u::Mailbox
Please also refer to the :ref:`full doc on s4u::Mailbox <s4u_mailbox>`.
engine. Once created, there is no way to destroy a mailbox before the end
of the simulation.
- .. autodoxymethod:: simgrid::s4u::Mailbox::by_name(const std::string &name)
+ .. doxygenfunction:: simgrid::s4u::Mailbox::by_name(const std::string &name)
.. group-tab:: Python
#include <simgrid/s4u/mailbox.h>
- .. autodoxymethod:: sg_mailbox_by_name(const char *alias)
+ .. doxygenfunction:: sg_mailbox_by_name(const char *alias)
.. group-tab:: C
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Mailbox::get_cname
- .. autodoxymethod:: simgrid::s4u::Mailbox::get_name
+ .. doxygenfunction:: simgrid::s4u::Mailbox::get_cname
+ .. doxygenfunction:: simgrid::s4u::Mailbox::get_name
.. group-tab:: Python
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Mailbox::put(void *payload, uint64_t simulated_size_in_bytes)
- .. autodoxymethod:: simgrid::s4u::Mailbox::put(void *payload, uint64_t simulated_size_in_bytes, double timeout)
- .. autodoxymethod:: simgrid::s4u::Mailbox::put_async(void *data, uint64_t simulated_size_in_bytes)
- .. autodoxymethod:: simgrid::s4u::Mailbox::put_init()
- .. autodoxymethod:: simgrid::s4u::Mailbox::put_init(void *data, uint64_t simulated_size_in_bytes)
+ .. doxygenfunction:: simgrid::s4u::Mailbox::put(void *payload, uint64_t simulated_size_in_bytes)
+ .. doxygenfunction:: simgrid::s4u::Mailbox::put(void *payload, uint64_t simulated_size_in_bytes, double timeout)
+ .. doxygenfunction:: simgrid::s4u::Mailbox::put_async(void *data, uint64_t simulated_size_in_bytes)
+ .. doxygenfunction:: simgrid::s4u::Mailbox::put_init()
+ .. doxygenfunction:: simgrid::s4u::Mailbox::put_init(void *data, uint64_t simulated_size_in_bytes)
.. group-tab:: Python
.. group-tab: C
- .. autodoxymethod:: sg_mailbox_put(sg_mailbox_t mailbox, void *payload, long simulated_size_in_bytes)
- .. autodoxymethod:: sg_mailbox_put_init(sg_mailbox_t mailbox, void *payload, long simulated_size_in_bytes)
- .. autodoxymethod:: sg_mailbox_put_async(sg_mailbox_t mailbox, void *payload, long simulated_size_in_bytes)
+ .. doxygenfunction:: sg_mailbox_put(sg_mailbox_t mailbox, void *payload, long simulated_size_in_bytes)
+ .. doxygenfunction:: sg_mailbox_put_init(sg_mailbox_t mailbox, void *payload, long simulated_size_in_bytes)
+ .. doxygenfunction:: sg_mailbox_put_async(sg_mailbox_t mailbox, void *payload, long simulated_size_in_bytes)
Receiving data
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Mailbox::empty
- .. autodoxymethod:: simgrid::s4u::Mailbox::front
- .. autodoxymethod:: simgrid::s4u::Mailbox::get()
- .. autodoxymethod:: simgrid::s4u::Mailbox::get(double timeout)
- .. autodoxymethod:: simgrid::s4u::Mailbox::get_async(T **data)
- .. autodoxymethod:: simgrid::s4u::Mailbox::get_init()
- .. autodoxymethod:: simgrid::s4u::Mailbox::iprobe(int type, bool(*match_fun)(void *, void *, kernel::activity::CommImpl *), void *data)
- .. autodoxymethod:: simgrid::s4u::Mailbox::listen
- .. autodoxymethod:: simgrid::s4u::Mailbox::ready
+ .. doxygenfunction:: simgrid::s4u::Mailbox::empty
+ .. doxygenfunction:: simgrid::s4u::Mailbox::front
+ .. doxygenfunction:: simgrid::s4u::Mailbox::get()
+ .. doxygenfunction:: simgrid::s4u::Mailbox::get(double timeout)
+ .. doxygenfunction:: simgrid::s4u::Mailbox::get_async(T **data)
+ .. doxygenfunction:: simgrid::s4u::Mailbox::get_init()
+ .. doxygenfunction:: simgrid::s4u::Mailbox::iprobe(int type, bool(*match_fun)(void *, void *, kernel::activity::CommImpl *), void *data)
+ .. doxygenfunction:: simgrid::s4u::Mailbox::listen
+ .. doxygenfunction:: simgrid::s4u::Mailbox::ready
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_mailbox_get(sg_mailbox_t mailbox)
- .. autodoxymethod:: sg_mailbox_get_async(sg_mailbox_t mailbox, void **data)
- .. autodoxymethod:: sg_mailbox_get_name(const_sg_mailbox_t mailbox)
- .. autodoxymethod:: sg_mailbox_listen(const char *alias)
+ .. doxygenfunction:: sg_mailbox_get(sg_mailbox_t mailbox)
+ .. doxygenfunction:: sg_mailbox_get_async(sg_mailbox_t mailbox, void **data)
+ .. doxygenfunction:: sg_mailbox_get_name(const_sg_mailbox_t mailbox)
+ .. doxygenfunction:: sg_mailbox_listen(const char *alias)
Receiving actor
---------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Mailbox::get_receiver
- .. autodoxymethod:: simgrid::s4u::Mailbox::set_receiver(ActorPtr actor)
+ .. doxygenfunction:: simgrid::s4u::Mailbox::get_receiver
+ .. doxygenfunction:: simgrid::s4u::Mailbox::set_receiver(ActorPtr actor)
.. group-tab:: C
- .. autodoxymethod:: sg_mailbox_set_receiver(const char *alias)
+ .. doxygenfunction:: sg_mailbox_set_receiver(const char *alias)
.. _API_s4u_Resource:
class Disk
=============
-.. autodoxyclass:: simgrid::s4u::Disk
+.. doxygenclass:: simgrid::s4u::Disk
Basic management
----------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Disk::get_cname() const
- .. autodoxymethod:: simgrid::s4u::Disk::get_host() const
- .. autodoxymethod:: simgrid::s4u::Disk::get_name() const
- .. autodoxymethod:: simgrid::s4u::Disk::get_properties() const
- .. autodoxymethod:: simgrid::s4u::Disk::get_property(const std::string &key) const
- .. autodoxymethod:: simgrid::s4u::Disk::get_read_bandwidth() const
- .. autodoxymethod:: simgrid::s4u::Disk::get_write_bandwidth() const
- .. autodoxymethod:: simgrid::s4u::Disk::set_property(const std::string &, const std::string &value)
+ .. doxygenfunction:: simgrid::s4u::Disk::get_cname() const
+ .. doxygenfunction:: simgrid::s4u::Disk::get_host() const
+ .. doxygenfunction:: simgrid::s4u::Disk::get_name() const
+ .. doxygenfunction:: simgrid::s4u::Disk::get_properties() const
+ .. doxygenfunction:: simgrid::s4u::Disk::get_property(const std::string &key) const
+ .. doxygenfunction:: simgrid::s4u::Disk::get_read_bandwidth() const
+ .. doxygenfunction:: simgrid::s4u::Disk::get_write_bandwidth() const
+ .. doxygenfunction:: simgrid::s4u::Disk::set_property(const std::string &, const std::string &value)
I/O operations
--------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Disk::io_init(sg_size_t size, s4u::Io::OpType type)
- .. autodoxymethod:: simgrid::s4u::Disk::read(sg_size_t size)
- .. autodoxymethod:: simgrid::s4u::Disk::read_async(sg_size_t size)
- .. autodoxymethod:: simgrid::s4u::Disk::write(sg_size_t size)
- .. autodoxymethod:: simgrid::s4u::Disk::write_async(sg_size_t size)
+ .. doxygenfunction:: simgrid::s4u::Disk::io_init(sg_size_t size, s4u::Io::OpType type)
+ .. doxygenfunction:: simgrid::s4u::Disk::read(sg_size_t size)
+ .. doxygenfunction:: simgrid::s4u::Disk::read_async(sg_size_t size)
+ .. doxygenfunction:: simgrid::s4u::Disk::write(sg_size_t size)
+ .. doxygenfunction:: simgrid::s4u::Disk::write_async(sg_size_t size)
Signals
-------
.. group-tab:: C++
- .. autodoxyvar:: simgrid::s4u::Disk::on_creation
- .. autodoxyvar:: simgrid::s4u::Disk::on_destruction
- .. autodoxyvar:: simgrid::s4u::Disk::on_state_change
+ .. doxygenvariable:: simgrid::s4u::Disk::on_creation
+ .. doxygenvariable:: simgrid::s4u::Disk::on_destruction
+ .. doxygenvariable:: simgrid::s4u::Disk::on_state_change
.. _API_s4u_Host:
class Host
=============
-.. autodoxyclass:: simgrid::s4u::Host
+.. doxygenclass:: simgrid::s4u::Host
Basic management
----------------
idiom on hosts because SimGrid does not allow (yet) to create nor
destroy resources once the simulation is started.
- .. autodoxymethod:: simgrid::s4u::Host::destroy()
+ .. doxygenfunction:: simgrid::s4u::Host::destroy()
.. group-tab:: Python
See also :cpp:func:`simgrid::s4u::Engine::get_all_hosts`.
- .. autodoxymethod:: simgrid::s4u::Host::by_name(const std::string &name)
- .. autodoxymethod:: simgrid::s4u::Host::by_name_or_null(const std::string &name)
- .. autodoxymethod:: simgrid::s4u::Host::current()
+ .. doxygenfunction:: simgrid::s4u::Host::by_name(const std::string &name)
+ .. doxygenfunction:: simgrid::s4u::Host::by_name_or_null(const std::string &name)
+ .. doxygenfunction:: simgrid::s4u::Host::current()
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_host_by_name(const char *name)
- .. autodoxymethod:: sg_host_count()
- .. autodoxymethod:: sg_host_list()
- .. autodoxymethod:: sg_hosts_as_dynar()
+ .. doxygenfunction:: sg_host_by_name(const char *name)
+ .. doxygenfunction:: sg_host_count()
+ .. doxygenfunction:: sg_host_list()
+ .. doxygenfunction:: sg_hosts_as_dynar()
Querying info
-------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Host::get_cname() const
- .. autodoxymethod:: simgrid::s4u::Host::get_core_count() const
- .. autodoxymethod:: simgrid::s4u::Host::get_name() const
- .. autodoxymethod:: simgrid::s4u::Host::get_available_speed() const
- .. autodoxymethod:: simgrid::s4u::Host::get_load() const
- .. autodoxymethod:: simgrid::s4u::Host::get_speed() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_cname() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_core_count() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_name() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_available_speed() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_load() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_speed() const
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_host_core_count(const_sg_host_t host)
- .. autodoxymethod:: sg_host_dump(const_sg_host_t ws)
- .. autodoxymethod:: sg_host_get_name(const_sg_host_t host)
- .. autodoxymethod:: sg_host_get_load(const_sg_host_t host)
- .. autodoxymethod:: sg_host_get_speed(const_sg_host_t host)
+ .. doxygenfunction:: sg_host_core_count(const_sg_host_t host)
+ .. doxygenfunction:: sg_host_dump(const_sg_host_t ws)
+ .. doxygenfunction:: sg_host_get_name(const_sg_host_t host)
+ .. doxygenfunction:: sg_host_get_load(const_sg_host_t host)
+ .. doxygenfunction:: sg_host_get_speed(const_sg_host_t host)
User data and properties
------------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Host::get_properties() const
- .. autodoxymethod:: simgrid::s4u::Host::get_property(const std::string &key) const
- .. autodoxymethod:: simgrid::s4u::Host::set_properties(const std::unordered_map< std::string, std::string > &properties)
- .. autodoxymethod:: simgrid::s4u::Host::set_property(const std::string &key, const std::string &value)
+ .. doxygenfunction:: simgrid::s4u::Host::get_properties() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_property(const std::string &key) const
+ .. doxygenfunction:: simgrid::s4u::Host::set_properties(const std::unordered_map< std::string, std::string > &properties)
+ .. doxygenfunction:: simgrid::s4u::Host::set_property(const std::string &key, const std::string &value)
.. group-tab:: C
- .. autodoxymethod:: sg_host_set_property_value(sg_host_t host, const char *name, const char *value)
- .. autodoxymethod:: sg_host_get_properties(const_sg_host_t host)
- .. autodoxymethod:: sg_host_get_property_value(const_sg_host_t host, const char *name)
- .. autodoxymethod:: sg_host_extension_create(void(*deleter)(void *))
- .. autodoxymethod:: sg_host_extension_get(const_sg_host_t host, size_t rank)
+ .. doxygenfunction:: sg_host_set_property_value(sg_host_t host, const char *name, const char *value)
+ .. doxygenfunction:: sg_host_get_properties(const_sg_host_t host)
+ .. doxygenfunction:: sg_host_get_property_value(const_sg_host_t host, const char *name)
+ .. doxygenfunction:: sg_host_extension_create(void(*deleter)(void *))
+ .. doxygenfunction:: sg_host_extension_get(const_sg_host_t host, size_t rank)
Retrieving components
---------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Host::add_disk(const Disk *disk)
- .. autodoxymethod:: simgrid::s4u::Host::get_actor_count() const
- .. autodoxymethod:: simgrid::s4u::Host::get_all_actors() const
- .. autodoxymethod:: simgrid::s4u::Host::get_disks() const
- .. autodoxymethod:: simgrid::s4u::Host::remove_disk(const std::string &disk_name)
+ .. doxygenfunction:: simgrid::s4u::Host::add_disk(const Disk *disk)
+ .. doxygenfunction:: simgrid::s4u::Host::get_actor_count() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_all_actors() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_disks() const
+ .. doxygenfunction:: simgrid::s4u::Host::remove_disk(const std::string &disk_name)
.. group-tab:: C
- .. autodoxymethod:: sg_host_get_actor_list(const_sg_host_t host, xbt_dynar_t whereto)
+ .. doxygenfunction:: sg_host_get_actor_list(const_sg_host_t host, xbt_dynar_t whereto)
On/Off
------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Host::is_on() const
- .. autodoxymethod:: simgrid::s4u::Host::turn_off()
- .. autodoxymethod:: simgrid::s4u::Host::turn_on()
+ .. doxygenfunction:: simgrid::s4u::Host::is_on() const
+ .. doxygenfunction:: simgrid::s4u::Host::turn_off()
+ .. doxygenfunction:: simgrid::s4u::Host::turn_on()
.. group-tab:: C
- .. autodoxymethod:: sg_host_is_on(const_sg_host_t host)
- .. autodoxymethod:: sg_host_turn_off(sg_host_t host)
- .. autodoxymethod:: sg_host_turn_on(sg_host_t host)
+ .. doxygenfunction:: sg_host_is_on(const_sg_host_t host)
+ .. doxygenfunction:: sg_host_turn_off(sg_host_t host)
+ .. doxygenfunction:: sg_host_turn_on(sg_host_t host)
DVFS
----
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Host::get_pstate() const
- .. autodoxymethod:: simgrid::s4u::Host::get_pstate_count() const
- .. autodoxymethod:: simgrid::s4u::Host::get_pstate_speed(int pstate_index) const
- .. autodoxymethod:: simgrid::s4u::Host::set_pstate(int pstate_index)
- .. autodoxymethod:: simgrid::s4u::Host::set_speed_profile(kernel::profile::Profile *p)
- .. autodoxymethod:: simgrid::s4u::Host::set_state_profile(kernel::profile::Profile *p)
+ .. doxygenfunction:: simgrid::s4u::Host::get_pstate() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_pstate_count() const
+ .. doxygenfunction:: simgrid::s4u::Host::get_pstate_speed(int pstate_index) const
+ .. doxygenfunction:: simgrid::s4u::Host::set_pstate(int pstate_index)
+ .. doxygenfunction:: simgrid::s4u::Host::set_speed_profile(kernel::profile::Profile *p)
+ .. doxygenfunction:: simgrid::s4u::Host::set_state_profile(kernel::profile::Profile *p)
.. group-tab:: Python
.. group-tab:: C
- .. autodoxymethod:: sg_host_get_available_speed(const_sg_host_t host)
- .. autodoxymethod:: sg_host_get_nb_pstates(const_sg_host_t host)
- .. autodoxymethod:: sg_host_get_pstate(const_sg_host_t host)
- .. autodoxymethod:: sg_host_get_pstate_speed(const_sg_host_t host, int pstate_index)
- .. autodoxymethod:: sg_host_set_pstate(sg_host_t host, int pstate)
+ .. doxygenfunction:: sg_host_get_available_speed(const_sg_host_t host)
+ .. doxygenfunction:: sg_host_get_nb_pstates(const_sg_host_t host)
+ .. doxygenfunction:: sg_host_get_pstate(const_sg_host_t host)
+ .. doxygenfunction:: sg_host_get_pstate_speed(const_sg_host_t host, int pstate_index)
+ .. doxygenfunction:: sg_host_set_pstate(sg_host_t host, int pstate)
Execution
---------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Host::exec_async
- .. autodoxymethod:: simgrid::s4u::Host::execute(double flops) const
- .. autodoxymethod:: simgrid::s4u::Host::execute(double flops, double priority) const
+ .. doxygenfunction:: simgrid::s4u::Host::exec_async
+ .. doxygenfunction:: simgrid::s4u::Host::execute(double flops) const
+ .. doxygenfunction:: simgrid::s4u::Host::execute(double flops, double priority) const
Platform and routing
--------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Host::get_englobing_zone()
- .. autodoxymethod:: simgrid::s4u::Host::get_netpoint() const
- .. autodoxymethod:: simgrid::s4u::Host::route_to(const Host *dest, std::vector< Link * > &links, double *latency) const
- .. autodoxymethod:: simgrid::s4u::Host::route_to(const Host *dest, std::vector< kernel::resource::LinkImpl * > &links, double *latency) const
- .. autodoxymethod:: simgrid::s4u::Host::sendto(Host *dest, double byte_amount)
- .. autodoxymethod:: simgrid::s4u::Host::sendto_async(Host *dest, double byte_amount)
+ .. doxygenfunction:: simgrid::s4u::Host::get_englobing_zone()
+ .. doxygenfunction:: simgrid::s4u::Host::get_netpoint() const
+ .. doxygenfunction:: simgrid::s4u::Host::route_to(const Host *dest, std::vector< Link * > &links, double *latency) const
+ .. doxygenfunction:: simgrid::s4u::Host::route_to(const Host *dest, std::vector< kernel::resource::LinkImpl * > &links, double *latency) const
+ .. doxygenfunction:: simgrid::s4u::Host::sendto(Host *dest, double byte_amount)
+ .. doxygenfunction:: simgrid::s4u::Host::sendto_async(Host *dest, double byte_amount)
.. group-tab:: C
- .. autodoxymethod:: sg_host_get_route(const_sg_host_t from, const_sg_host_t to, xbt_dynar_t links)
- .. autodoxymethod:: sg_host_get_route_bandwidth(const_sg_host_t from, const_sg_host_t to)
- .. autodoxymethod:: sg_host_get_route_latency(const_sg_host_t from, const_sg_host_t to)
- .. autodoxymethod:: sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount)
+ .. doxygenfunction:: sg_host_get_route(const_sg_host_t from, const_sg_host_t to, xbt_dynar_t links)
+ .. doxygenfunction:: sg_host_get_route_bandwidth(const_sg_host_t from, const_sg_host_t to)
+ .. doxygenfunction:: sg_host_get_route_latency(const_sg_host_t from, const_sg_host_t to)
+ .. doxygenfunction:: sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount)
Signals
-------
.. group-tab:: C++
- .. autodoxyvar:: simgrid::s4u::Host::on_creation
- .. autodoxyvar:: simgrid::s4u::Host::on_destruction
- .. autodoxyvar:: simgrid::s4u::Host::on_speed_change
- .. autodoxyvar:: simgrid::s4u::Host::on_state_change
+ .. doxygenvariable:: simgrid::s4u::Host::on_creation
+ .. doxygenvariable:: simgrid::s4u::Host::on_destruction
+ .. doxygenvariable:: simgrid::s4u::Host::on_speed_change
+ .. doxygenvariable:: simgrid::s4u::Host::on_state_change
.. _API_s4u_Link:
class Link
=============
-.. autodoxyclass:: simgrid::s4u::Link
+.. doxygenclass:: simgrid::s4u::Link
Basic management
----------------
See also :cpp:func:`simgrid::s4u::Engine::get_all_links`.
- .. autodoxymethod:: simgrid::s4u::Link::by_name(const std::string &name)
- .. autodoxymethod:: simgrid::s4u::Link::by_name_or_null(const std::string &name)
+ .. doxygenfunction:: simgrid::s4u::Link::by_name(const std::string &name)
+ .. doxygenfunction:: simgrid::s4u::Link::by_name_or_null(const std::string &name)
.. group-tab:: C
- .. autodoxymethod:: sg_link_by_name(const char *name)
- .. autodoxymethod:: sg_link_count()
- .. autodoxymethod:: sg_link_list()
+ .. doxygenfunction:: sg_link_by_name(const char *name)
+ .. doxygenfunction:: sg_link_count()
+ .. doxygenfunction:: sg_link_list()
Querying info
--------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Link::get_bandwidth() const
- .. autodoxymethod:: simgrid::s4u::Link::get_cname() const
- .. autodoxymethod:: simgrid::s4u::Link::get_latency() const
- .. autodoxymethod:: simgrid::s4u::Link::get_name() const
- .. autodoxymethod:: simgrid::s4u::Link::get_sharing_policy() const
- .. autodoxymethod:: simgrid::s4u::Link::get_usage() const
- .. autodoxymethod:: simgrid::s4u::Link::is_used() const
+ .. doxygenfunction:: simgrid::s4u::Link::get_bandwidth() const
+ .. doxygenfunction:: simgrid::s4u::Link::get_cname() const
+ .. doxygenfunction:: simgrid::s4u::Link::get_latency() const
+ .. doxygenfunction:: simgrid::s4u::Link::get_name() const
+ .. doxygenfunction:: simgrid::s4u::Link::get_sharing_policy() const
+ .. doxygenfunction:: simgrid::s4u::Link::get_usage() const
+ .. doxygenfunction:: simgrid::s4u::Link::is_used() const
.. group-tab:: C
- .. autodoxymethod:: sg_link_get_bandwidth(const_sg_link_t link)
- .. autodoxymethod:: sg_link_get_latency(const_sg_link_t link)
- .. autodoxymethod:: sg_link_get_name(const_sg_link_t link)
- .. autodoxymethod:: sg_link_is_shared(const_sg_link_t link)
+ .. doxygenfunction:: sg_link_get_bandwidth(const_sg_link_t link)
+ .. doxygenfunction:: sg_link_get_latency(const_sg_link_t link)
+ .. doxygenfunction:: sg_link_get_name(const_sg_link_t link)
+ .. doxygenfunction:: sg_link_is_shared(const_sg_link_t link)
Modifying characteristics
-------------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Link::set_bandwidth(double value)
- .. autodoxymethod:: simgrid::s4u::Link::set_latency(double value)
+ .. doxygenfunction:: simgrid::s4u::Link::set_bandwidth(double value)
+ .. doxygenfunction:: simgrid::s4u::Link::set_latency(double value)
.. group-tab:: C
- .. autodoxymethod:: sg_link_set_bandwidth(sg_link_t link, double value)
- .. autodoxymethod:: sg_link_set_latency(sg_link_t link, double value)
+ .. doxygenfunction:: sg_link_set_bandwidth(sg_link_t link, double value)
+ .. doxygenfunction:: sg_link_set_latency(sg_link_t link, double value)
User data and properties
------------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Link::get_property(const std::string &key) const
- .. autodoxymethod:: simgrid::s4u::Link::set_property(const std::string &key, const std::string &value)
+ .. doxygenfunction:: simgrid::s4u::Link::get_property(const std::string &key) const
+ .. doxygenfunction:: simgrid::s4u::Link::set_property(const std::string &key, const std::string &value)
.. group-tab:: C
- .. autodoxymethod:: sg_link_get_data(const_sg_link_t link)
- .. autodoxymethod:: sg_link_set_data(sg_link_t link, void *data)
+ .. doxygenfunction:: sg_link_get_data(const_sg_link_t link)
+ .. doxygenfunction:: sg_link_set_data(sg_link_t link, void *data)
On/Off
------
See also :cpp:func:`simgrid::s4u::Link::set_state_profile`.
- .. autodoxymethod:: simgrid::s4u::Link::is_on() const
- .. autodoxymethod:: simgrid::s4u::Link::turn_off()
- .. autodoxymethod:: simgrid::s4u::Link::turn_on()
+ .. doxygenfunction:: simgrid::s4u::Link::is_on() const
+ .. doxygenfunction:: simgrid::s4u::Link::turn_off()
+ .. doxygenfunction:: simgrid::s4u::Link::turn_on()
Dynamic profiles
----------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Link::set_bandwidth_profile(kernel::profile::Profile *profile)
- .. autodoxymethod:: simgrid::s4u::Link::set_latency_profile(kernel::profile::Profile *profile)
- .. autodoxymethod:: simgrid::s4u::Link::set_state_profile(kernel::profile::Profile *profile)
+ .. doxygenfunction:: simgrid::s4u::Link::set_bandwidth_profile(kernel::profile::Profile *profile)
+ .. doxygenfunction:: simgrid::s4u::Link::set_latency_profile(kernel::profile::Profile *profile)
+ .. doxygenfunction:: simgrid::s4u::Link::set_state_profile(kernel::profile::Profile *profile)
WIFI links
----------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Link::set_host_wifi_rate
+ .. doxygenfunction:: simgrid::s4u::Link::set_host_wifi_rate
Signals
-------
.. group-tab:: C++
- .. autodoxyvar:: simgrid::s4u::Link::on_bandwidth_change
- .. autodoxyvar:: simgrid::s4u::Link::on_communicate
- .. autodoxyvar:: simgrid::s4u::Link::on_communication_state_change
- .. autodoxyvar:: simgrid::s4u::Link::on_creation
- .. autodoxyvar:: simgrid::s4u::Link::on_destruction
- .. autodoxyvar:: simgrid::s4u::Link::on_state_change
+ .. doxygenvariable:: simgrid::s4u::Link::on_bandwidth_change
+ .. doxygenvariable:: simgrid::s4u::Link::on_communicate
+ .. doxygenvariable:: simgrid::s4u::Link::on_communication_state_change
+ .. doxygenvariable:: simgrid::s4u::Link::on_creation
+ .. doxygenvariable:: simgrid::s4u::Link::on_destruction
+ .. doxygenvariable:: simgrid::s4u::Link::on_state_change
.. _API_s4u_NetZone:
class NetZone
================
-.. autodoxyclass:: simgrid::s4u::NetZone
+.. doxygenclass:: simgrid::s4u::NetZone
Basic management
----------------
.. group-tab:: C
- .. autodoxymethod:: sg_zone_get_by_name(const char *name)
- .. autodoxymethod:: sg_zone_get_root()
+ .. doxygenfunction:: sg_zone_get_by_name(const char *name)
+ .. doxygenfunction:: sg_zone_get_root()
Querying info
--------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::NetZone::get_cname() const
- .. autodoxymethod:: simgrid::s4u::NetZone::get_name() const
+ .. doxygenfunction:: simgrid::s4u::NetZone::get_cname() const
+ .. doxygenfunction:: simgrid::s4u::NetZone::get_name() const
.. group-tab:: C
- .. autodoxymethod:: sg_zone_get_name(const_sg_netzone_t zone)
+ .. doxygenfunction:: sg_zone_get_name(const_sg_netzone_t zone)
User data and properties
------------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::NetZone::get_properties() const
- .. autodoxymethod:: simgrid::s4u::NetZone::get_property(const std::string &key) const
- .. autodoxymethod:: simgrid::s4u::NetZone::set_property(const std::string &key, const std::string &value)
+ .. doxygenfunction:: simgrid::s4u::NetZone::get_properties() const
+ .. doxygenfunction:: simgrid::s4u::NetZone::get_property(const std::string &key) const
+ .. doxygenfunction:: simgrid::s4u::NetZone::set_property(const std::string &key, const std::string &value)
.. group-tab:: C
- .. autodoxymethod:: sg_zone_get_property_value(const_sg_netzone_t as, const char *name)
- .. autodoxymethod:: sg_zone_set_property_value(sg_netzone_t netzone, const char *name, const char *value)
+ .. doxygenfunction:: sg_zone_get_property_value(const_sg_netzone_t as, const char *name)
+ .. doxygenfunction:: sg_zone_set_property_value(sg_netzone_t netzone, const char *name, const char *value)
Retrieving components
---------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::NetZone::get_all_hosts() const
- .. autodoxymethod:: simgrid::s4u::NetZone::get_host_count() const
+ .. doxygenfunction:: simgrid::s4u::NetZone::get_all_hosts() const
+ .. doxygenfunction:: simgrid::s4u::NetZone::get_host_count() const
.. group-tab:: C
- .. autodoxymethod:: sg_zone_get_hosts(const_sg_netzone_t zone, xbt_dynar_t whereto)
+ .. doxygenfunction:: sg_zone_get_hosts(const_sg_netzone_t zone, xbt_dynar_t whereto)
Routing data
------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::NetZone::add_bypass_route
- .. autodoxymethod:: simgrid::s4u::NetZone::add_component(kernel::routing::NetPoint *elm)
- .. autodoxymethod:: simgrid::s4u::NetZone::add_route
- .. autodoxymethod:: simgrid::s4u::NetZone::get_children() const
- .. autodoxymethod:: simgrid::s4u::NetZone::get_father()
+ .. doxygenfunction:: simgrid::s4u::NetZone::add_bypass_route
+ .. doxygenfunction:: simgrid::s4u::NetZone::add_component(kernel::routing::NetPoint *elm)
+ .. doxygenfunction:: simgrid::s4u::NetZone::add_route
+ .. doxygenfunction:: simgrid::s4u::NetZone::get_children() const
+ .. doxygenfunction:: simgrid::s4u::NetZone::get_father()
.. group-tab:: C
- .. autodoxymethod:: sg_zone_get_sons(const_sg_netzone_t zone, xbt_dict_t whereto)
+ .. doxygenfunction:: sg_zone_get_sons(const_sg_netzone_t zone, xbt_dict_t whereto)
Signals
-------
.. group-tab:: C++
- .. autodoxyvar:: simgrid::s4u::NetZone::on_creation
- .. autodoxyvar:: simgrid::s4u::NetZone::on_route_creation
- .. autodoxyvar:: simgrid::s4u::NetZone::on_seal
+ .. doxygenvariable:: simgrid::s4u::NetZone::on_creation
+ .. doxygenvariable:: simgrid::s4u::NetZone::on_route_creation
+ .. doxygenvariable:: simgrid::s4u::NetZone::on_seal
.. _API_s4u_VirtualMachine:
=======================
-.. autodoxyclass:: simgrid::s4u::VirtualMachine
+.. doxygenclass:: simgrid::s4u::VirtualMachine
Basic management
----------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::VirtualMachine(const std::string &name, Host *physical_host, int core_amount)
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::VirtualMachine(const std::string &name, Host *physical_host, int core_amount, size_t ramsize)
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::destroy
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::VirtualMachine(const std::string &name, Host *physical_host, int core_amount)
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::VirtualMachine(const std::string &name, Host *physical_host, int core_amount, size_t ramsize)
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::destroy
.. group-tab:: C
- .. autodoxymethod:: sg_vm_create_core
- .. autodoxymethod:: sg_vm_create_multicore
- .. autodoxymethod:: sg_vm_destroy
+ .. doxygenfunction:: sg_vm_create_core
+ .. doxygenfunction:: sg_vm_create_multicore
+ .. doxygenfunction:: sg_vm_destroy
Querying info
--------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::get_pm() const
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::get_ramsize() const
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::get_state() const
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::get_pm() const
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::get_ramsize() const
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::get_state() const
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::set_bound(double bound)
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::set_pm(Host *pm)
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::set_ramsize(size_t ramsize)
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::set_bound(double bound)
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::set_pm(Host *pm)
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::set_ramsize(size_t ramsize)
.. group-tab:: C
- .. autodoxymethod:: sg_vm_get_ramsize(const_sg_vm_t vm)
- .. autodoxymethod:: sg_vm_set_bound(sg_vm_t vm, double bound)
- .. autodoxymethod:: sg_vm_set_ramsize(sg_vm_t vm, size_t size)
+ .. doxygenfunction:: sg_vm_get_ramsize(const_sg_vm_t vm)
+ .. doxygenfunction:: sg_vm_set_bound(sg_vm_t vm, double bound)
+ .. doxygenfunction:: sg_vm_set_ramsize(sg_vm_t vm, size_t size)
- .. autodoxymethod:: sg_vm_get_name
- .. autodoxymethod:: sg_vm_get_pm
- .. autodoxymethod:: sg_vm_is_created
- .. autodoxymethod:: sg_vm_is_running
- .. autodoxymethod:: sg_vm_is_suspended
+ .. doxygenfunction:: sg_vm_get_name
+ .. doxygenfunction:: sg_vm_get_pm
+ .. doxygenfunction:: sg_vm_is_created
+ .. doxygenfunction:: sg_vm_is_running
+ .. doxygenfunction:: sg_vm_is_suspended
Life cycle
----------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::resume()
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::shutdown()
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::start()
- .. autodoxymethod:: simgrid::s4u::VirtualMachine::suspend()
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::resume()
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::shutdown()
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::start()
+ .. doxygenfunction:: simgrid::s4u::VirtualMachine::suspend()
.. group-tab:: C
- .. autodoxymethod:: sg_vm_start
- .. autodoxymethod:: sg_vm_suspend
- .. autodoxymethod:: sg_vm_resume
- .. autodoxymethod:: sg_vm_shutdown
+ .. doxygenfunction:: sg_vm_start
+ .. doxygenfunction:: sg_vm_suspend
+ .. doxygenfunction:: sg_vm_resume
+ .. doxygenfunction:: sg_vm_shutdown
Signals
-------
.. group-tab:: C++
- .. autodoxyvar:: simgrid::s4u::VirtualMachine::on_migration_end
- .. autodoxyvar:: simgrid::s4u::VirtualMachine::on_migration_start
- .. autodoxyvar:: simgrid::s4u::VirtualMachine::on_resume
- .. autodoxyvar:: simgrid::s4u::VirtualMachine::on_shutdown
- .. autodoxyvar:: simgrid::s4u::VirtualMachine::on_start
- .. autodoxyvar:: simgrid::s4u::VirtualMachine::on_started
- .. autodoxyvar:: simgrid::s4u::VirtualMachine::on_suspend
+ .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_migration_end
+ .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_migration_start
+ .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_resume
+ .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_shutdown
+ .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_start
+ .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_started
+ .. doxygenvariable:: simgrid::s4u::VirtualMachine::on_suspend
.. _API_s4u_Activity:
class Activity
==============
-.. autodoxyclass:: simgrid::s4u::Activity
+.. doxygenclass:: simgrid::s4u::Activity
- **Known subclasses:**
- :ref:`Communications <API_s4u_Comm>` (started on Mailboxes and consuming links),
- :ref:`Executions <API_s4u_Exec>` (started on Host and consuming CPU resources)
- :ref:`I/O <API_s4u_Io>` (started on and consumming disks).
- See also the :ref:`section on activities <s4u_Activities>` above.
+**Known subclasses:**
+:ref:`Communications <API_s4u_Comm>` (started on Mailboxes and consuming links),
+:ref:`Executions <API_s4u_Exec>` (started on Host and consuming CPU resources)
+:ref:`I/O <API_s4u_Io>` (started on and consumming disks).
+See also the :ref:`section on activities <s4u_Activities>` above.
Basic management
----------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Activity::get_cname
- .. autodoxymethod:: simgrid::s4u::Activity::get_name
- .. autodoxymethod:: simgrid::s4u::Activity::get_remaining() const
- .. autodoxymethod:: simgrid::s4u::Activity::get_state() const
- .. autodoxymethod:: simgrid::s4u::Activity::set_remaining(double remains)
- .. autodoxymethod:: simgrid::s4u::Activity::set_state(Activity::State state)
+ .. doxygenfunction:: simgrid::s4u::Activity::get_cname
+ .. doxygenfunction:: simgrid::s4u::Activity::get_name
+ .. doxygenfunction:: simgrid::s4u::Activity::get_remaining() const
+ .. doxygenfunction:: simgrid::s4u::Activity::get_state() const
+ .. doxygenfunction:: simgrid::s4u::Activity::set_remaining(double remains)
+ .. doxygenfunction:: simgrid::s4u::Activity::set_state(Activity::State state)
Activities life cycle
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Activity::start
- .. autodoxymethod:: simgrid::s4u::Activity::cancel
- .. autodoxymethod:: simgrid::s4u::Activity::test
- .. autodoxymethod:: simgrid::s4u::Activity::wait
- .. autodoxymethod:: simgrid::s4u::Activity::wait_for
- .. autodoxymethod:: simgrid::s4u::Activity::wait_until(double time_limit)
- .. autodoxymethod:: simgrid::s4u::Activity::vetoable_start()
+ .. doxygenfunction:: simgrid::s4u::Activity::start
+ .. doxygenfunction:: simgrid::s4u::Activity::cancel
+ .. doxygenfunction:: simgrid::s4u::Activity::test
+ .. doxygenfunction:: simgrid::s4u::Activity::wait
+ .. doxygenfunction:: simgrid::s4u::Activity::wait_for
+ .. doxygenfunction:: simgrid::s4u::Activity::wait_until(double time_limit)
+ .. doxygenfunction:: simgrid::s4u::Activity::vetoable_start()
Suspending and resuming an activity
-----------------------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Activity::suspend
- .. autodoxymethod:: simgrid::s4u::Activity::resume
- .. autodoxymethod:: simgrid::s4u::Activity::is_suspended
+ .. doxygenfunction:: simgrid::s4u::Activity::suspend
+ .. doxygenfunction:: simgrid::s4u::Activity::resume
+ .. doxygenfunction:: simgrid::s4u::Activity::is_suspended
.. _API_s4u_Comm:
class Comm
=============
-.. autodoxyclass:: simgrid::s4u::Comm
+.. doxygenclass:: simgrid::s4u::Comm
Basic management
----------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Comm::get_dst_data_size() const
- .. autodoxymethod:: simgrid::s4u::Comm::get_mailbox() const
- .. autodoxymethod:: simgrid::s4u::Comm::get_sender() const
- .. autodoxymethod:: simgrid::s4u::Comm::set_dst_data(void **buff)
- .. autodoxymethod:: simgrid::s4u::Comm::set_dst_data(void **buff, size_t size)
- .. autodoxymethod:: simgrid::s4u::Comm::detach()
- .. autodoxymethod:: simgrid::s4u::Comm::detach(void(*clean_function)(void *))
- .. autodoxymethod:: simgrid::s4u::Comm::set_rate(double rate)
- .. autodoxymethod:: simgrid::s4u::Comm::set_src_data(void *buff)
- .. autodoxymethod:: simgrid::s4u::Comm::set_src_data(void *buff, size_t size)
- .. autodoxymethod:: simgrid::s4u::Comm::set_src_data_size(size_t size)
+ .. doxygenfunction:: simgrid::s4u::Comm::get_dst_data_size() const
+ .. doxygenfunction:: simgrid::s4u::Comm::get_mailbox() const
+ .. doxygenfunction:: simgrid::s4u::Comm::get_sender() const
+ .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff)
+ .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff, size_t size)
+ .. doxygenfunction:: simgrid::s4u::Comm::detach()
+ .. doxygenfunction:: simgrid::s4u::Comm::detach(void(*clean_function)(void *))
+ .. doxygenfunction:: simgrid::s4u::Comm::set_rate(double rate)
+ .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff)
+ .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff, size_t size)
+ .. doxygenfunction:: simgrid::s4u::Comm::set_src_data_size(size_t size)
Life cycle
----------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Comm::cancel
- .. autodoxymethod:: simgrid::s4u::Comm::start
- .. autodoxymethod:: simgrid::s4u::Comm::test
- .. autodoxymethod:: simgrid::s4u::Comm::test_any(const std::vector< CommPtr > *comms)
- .. autodoxymethod:: simgrid::s4u::Comm::wait
- .. autodoxymethod:: simgrid::s4u::Comm::wait_all(const std::vector< CommPtr > *comms)
- .. autodoxymethod:: simgrid::s4u::Comm::wait_any(const std::vector< CommPtr > *comms)
- .. autodoxymethod:: simgrid::s4u::Comm::wait_any_for(const std::vector< CommPtr > *comms_in, double timeout)
- .. autodoxymethod:: simgrid::s4u::Comm::wait_for
+ .. doxygenfunction:: simgrid::s4u::Comm::cancel
+ .. doxygenfunction:: simgrid::s4u::Comm::start
+ .. doxygenfunction:: simgrid::s4u::Comm::test
+ .. doxygenfunction:: simgrid::s4u::Comm::test_any(const std::vector< CommPtr > *comms)
+ .. doxygenfunction:: simgrid::s4u::Comm::wait
+ .. doxygenfunction:: simgrid::s4u::Comm::wait_all(const std::vector< CommPtr > *comms)
+ .. doxygenfunction:: simgrid::s4u::Comm::wait_any(const std::vector< CommPtr > *comms)
+ .. doxygenfunction:: simgrid::s4u::Comm::wait_any_for(const std::vector< CommPtr > *comms_in, double timeout)
+ .. doxygenfunction:: simgrid::s4u::Comm::wait_for
.. group-tab:: Python
.. group-tab:: C++
- .. autodoxyvar:: simgrid::s4u::Comm::on_completion
- .. autodoxyvar:: simgrid::s4u::Comm::on_start
+ .. doxygenvariable:: simgrid::s4u::Comm::on_completion
+ .. doxygenvariable:: simgrid::s4u::Comm::on_start
.. _API_s4u_Exec:
class Exec
=============
-.. autodoxyclass:: simgrid::s4u::Exec
+.. doxygenclass:: simgrid::s4u::Exec
Basic management
----------------
.. code:: Python
from simgrid import Exec
+
+ .. group-tab:: C
+
+ .. code-block:: C
+
+ #include <simgrid/exec.h>
Querying info
-------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Exec::get_cost() const
- .. autodoxymethod:: simgrid::s4u::Exec::get_finish_time() const
- .. autodoxymethod:: simgrid::s4u::Exec::get_host() const
- .. autodoxymethod:: simgrid::s4u::Exec::get_host_number() const
+ .. doxygenfunction:: simgrid::s4u::Exec::get_cost() const
+ .. doxygenfunction:: simgrid::s4u::Exec::get_finish_time() const
+ .. doxygenfunction:: simgrid::s4u::Exec::get_host() const
+ .. doxygenfunction:: simgrid::s4u::Exec::get_host_number() const
.. cpp:function:: double Exec::get_remaining()
On sequential executions, returns the amount of flops that remain to be done;
This cannot be used on parallel executions.
- .. autodoxymethod:: simgrid::s4u::Exec::get_remaining_ratio
- .. autodoxymethod:: simgrid::s4u::Exec::get_start_time() const
- .. autodoxymethod:: simgrid::s4u::Exec::set_bound(double bound)
- .. autodoxymethod:: simgrid::s4u::Exec::set_host
- .. autodoxymethod:: simgrid::s4u::Exec::set_priority(double priority)
+ .. doxygenfunction:: simgrid::s4u::Exec::get_remaining_ratio
+ .. doxygenfunction:: simgrid::s4u::Exec::get_start_time() const
+ .. doxygenfunction:: simgrid::s4u::Exec::set_bound(double bound)
+ .. doxygenfunction:: simgrid::s4u::Exec::set_host
+ .. doxygenfunction:: simgrid::s4u::Exec::set_priority(double priority)
.. group-tab:: Python
- .. autoattribute:: simgrid.Exec.host
- .. autoattribute:: simgrid.Exec.remaining
- .. autoattribute:: simgrid.Exec.remaining_ratio
+ .. autoattribute:: simgrid.Exec.host
+ .. autoattribute:: simgrid.Exec.remaining
+ .. autoattribute:: simgrid.Exec.remaining_ratio
+
+ .. group-tab:: C
+
+ .. doxygenfunction:: sg_exec_set_bound(sg_exec_t exec, double bound)
+ .. doxygenfunction:: sg_exec_get_name(const_sg_exec_t exec)
+ .. doxygenfunction:: sg_exec_set_name(sg_exec_t exec, const char* name)
+ .. doxygenfunction:: sg_exec_set_host(sg_exec_t exec, sg_host_t new_host)
+ .. doxygenfunction:: sg_exec_get_remaining(const_sg_exec_t exec)
+ .. doxygenfunction:: sg_exec_get_remaining_ratio(const_sg_exec_t exec)
Life cycle
----------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Exec::cancel
- .. autodoxymethod:: simgrid::s4u::Exec::set_timeout(double timeout)
- .. autodoxymethod:: simgrid::s4u::Exec::start
- .. autodoxymethod:: simgrid::s4u::Exec::test
- .. autodoxymethod:: simgrid::s4u::Exec::wait
- .. autodoxymethod:: simgrid::s4u::Exec::wait_any(std::vector< ExecPtr > *execs)
- .. autodoxymethod:: simgrid::s4u::Exec::wait_any_for(std::vector< ExecPtr > *execs, double timeout)
- .. autodoxymethod:: simgrid::s4u::Exec::wait_for
+ .. doxygenfunction:: simgrid::s4u::Exec::cancel
+ .. doxygenfunction:: simgrid::s4u::Exec::set_timeout(double timeout)
+ .. doxygenfunction:: simgrid::s4u::Exec::start
+ .. doxygenfunction:: simgrid::s4u::Exec::test
+ .. doxygenfunction:: simgrid::s4u::Exec::wait
+ .. doxygenfunction:: simgrid::s4u::Exec::wait_any(std::vector< ExecPtr > *execs)
+ .. doxygenfunction:: simgrid::s4u::Exec::wait_any_for(std::vector< ExecPtr > *execs, double timeout)
+ .. doxygenfunction:: simgrid::s4u::Exec::wait_for
.. group-tab:: Python
.. automethod:: simgrid.Exec.test
.. automethod:: simgrid.Exec.wait
+ .. group-tab:: C
+
+ .. doxygenfunction:: sg_exec_start(sg_exec_t exec)
+ .. doxygenfunction:: sg_exec_cancel(sg_exec_t exec);
+ .. doxygenfunction:: sg_exec_test(sg_exec_t exec);
+ .. doxygenfunction:: sg_exec_wait(sg_exec_t exec);
+ .. doxygenfunction:: sg_exec_wait_for(sg_exec_t exec, double timeout);
+ .. doxygenfunction:: sg_exec_wait_any_for(sg_exec_t* execs, size_t count, double timeout);
+ .. doxygenfunction:: sg_exec_wait_any(sg_exec_t* execs, size_t count);
+
Signals
-------
.. group-tab:: C++
- .. autodoxyvar:: simgrid::s4u::Exec::on_start
- .. autodoxyvar:: simgrid::s4u::Exec::on_completion
+ .. doxygenvariable:: simgrid::s4u::Exec::on_start
+ .. doxygenvariable:: simgrid::s4u::Exec::on_completion
.. _API_s4u_Io:
class Io
===========
-.. autodoxyclass:: simgrid::s4u::Io
+.. doxygenclass:: simgrid::s4u::Io
Basic management
----------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Io::get_performed_ioops() const
- .. autodoxymethod:: simgrid::s4u::Io::get_remaining
+ .. doxygenfunction:: simgrid::s4u::Io::get_performed_ioops() const
+ .. doxygenfunction:: simgrid::s4u::Io::get_remaining
Life cycle
----------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Io::cancel
- .. autodoxymethod:: simgrid::s4u::Io::start
- .. autodoxymethod:: simgrid::s4u::Io::test
- .. autodoxymethod:: simgrid::s4u::Io::wait
- .. autodoxymethod:: simgrid::s4u::Io::wait_for
+ .. doxygenfunction:: simgrid::s4u::Io::cancel
+ .. doxygenfunction:: simgrid::s4u::Io::start
+ .. doxygenfunction:: simgrid::s4u::Io::test
+ .. doxygenfunction:: simgrid::s4u::Io::wait
+ .. doxygenfunction:: simgrid::s4u::Io::wait_for
.. _API_s4u_Synchronizations:
Mutex
==============
-.. autodoxyclass:: simgrid::s4u::Mutex
+.. doxygenclass:: simgrid::s4u::Mutex
Basic management
----------------
.. doxygentypedef:: MutexPtr
- .. autodoxymethod:: simgrid::s4u::Mutex::Mutex(kernel::activity::MutexImpl *mutex)
- .. autodoxymethod:: simgrid::s4u::Mutex::create()
- .. autodoxymethod:: simgrid::s4u::Mutex::~Mutex()
+ .. doxygenfunction:: simgrid::s4u::Mutex::Mutex(kernel::activity::MutexImpl *mutex)
+ .. doxygenfunction:: simgrid::s4u::Mutex::create()
+ .. doxygenfunction:: simgrid::s4u::Mutex::~Mutex()
.. group-tab:: C
Pointer to a constant mutex object.
- .. autodoxymethod:: sg_mutex_init()
- .. autodoxymethod:: sg_mutex_destroy(const_sg_mutex_t mutex)
+ .. doxygenfunction:: sg_mutex_init()
+ .. doxygenfunction:: sg_mutex_destroy(const_sg_mutex_t mutex)
Locking
-------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Mutex::lock()
- .. autodoxymethod:: simgrid::s4u::Mutex::try_lock()
- .. autodoxymethod:: simgrid::s4u::Mutex::unlock()
+ .. doxygenfunction:: simgrid::s4u::Mutex::lock()
+ .. doxygenfunction:: simgrid::s4u::Mutex::try_lock()
+ .. doxygenfunction:: simgrid::s4u::Mutex::unlock()
.. group-tab:: C
- .. autodoxymethod:: sg_mutex_lock(sg_mutex_t mutex)
- .. autodoxymethod:: sg_mutex_try_lock(sg_mutex_t mutex)
- .. autodoxymethod:: sg_mutex_unlock(sg_mutex_t mutex)
+ .. doxygenfunction:: sg_mutex_lock(sg_mutex_t mutex)
+ .. doxygenfunction:: sg_mutex_try_lock(sg_mutex_t mutex)
+ .. doxygenfunction:: sg_mutex_unlock(sg_mutex_t mutex)
.. _API_s4u_Barrier:
Barrier
================
-.. autodoxyclass:: simgrid::s4u::Barrier
+.. doxygenclass:: simgrid::s4u::Barrier
- .. tabs::
+.. tabs::
- .. group-tab:: C++
+ .. group-tab:: C++
- .. code-block:: C++
+ .. code-block:: C++
- #include <simgrid/s4u/Barrier.hpp>
+ #include <simgrid/s4u/Barrier.hpp>
- .. doxygentypedef:: BarrierPtr
+ .. doxygentypedef:: BarrierPtr
- .. autodoxymethod:: simgrid::s4u::Barrier::Barrier(unsigned int expected_actors)
- .. autodoxymethod:: simgrid::s4u::Barrier::create(unsigned int expected_actors)
- .. autodoxymethod:: simgrid::s4u::Barrier::wait()
+ .. doxygenfunction:: simgrid::s4u::Barrier::Barrier(unsigned int expected_actors)
+ .. doxygenfunction:: simgrid::s4u::Barrier::create(unsigned int expected_actors)
+ .. doxygenfunction:: simgrid::s4u::Barrier::wait()
- .. group-tab:: C
+ .. group-tab:: C
- .. code-block:: C
+ .. code-block:: C
- #include <simgrid/barrier.hpp>
+ #include <simgrid/barrier.hpp>
- .. doxygentypedef:: sg_bar_t
- .. cpp:type:: const s4u_Barrier* const_sg_bar_t
+ .. doxygentypedef:: sg_bar_t
+ .. cpp:type:: const s4u_Barrier* const_sg_bar_t
- Pointer to a constant barrier object.
+ Pointer to a constant barrier object.
- .. autodoxymethod:: sg_barrier_init(unsigned int count)
- .. autodoxymethod:: sg_barrier_destroy(const_sg_bar_t bar)
- .. autodoxymethod:: sg_barrier_wait(sg_bar_t bar)
+ .. doxygenfunction:: sg_barrier_init(unsigned int count)
+ .. doxygenfunction:: sg_barrier_destroy(const_sg_bar_t bar)
+ .. doxygenfunction:: sg_barrier_wait(sg_bar_t bar)
.. _API_s4u_ConditionVariable:
Condition variable
==========================
-.. autodoxyclass:: simgrid::s4u::ConditionVariable
+.. doxygenclass:: simgrid::s4u::ConditionVariable
Basic management
----------------
.. doxygentypedef:: ConditionVariablePtr
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::create()
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::create()
.. group-tab:: C
#include <simgrid/cond.h>
.. doxygentypedef:: sg_cond_t
- .. autodoxymethod:: sg_cond_init
- .. autodoxymethod:: sg_cond_destroy
+ .. doxygenfunction:: sg_cond_init
+ .. doxygenfunction:: sg_cond_destroy
Waiting and notifying
---------------------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::notify_all()
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::notify_one()
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait(s4u::MutexPtr lock)
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait(const std::unique_lock< s4u::Mutex > &lock)
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait(const std::unique_lock< Mutex > &lock, P pred)
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait_for(const std::unique_lock< s4u::Mutex > &lock, double duration)
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait_for(const std::unique_lock< s4u::Mutex > &lock, double duration, P pred)
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait_for(const std::unique_lock< s4u::Mutex > &lock, std::chrono::duration< Rep, Period > duration)
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait_for(const std::unique_lock< s4u::Mutex > &lock, std::chrono::duration< Rep, Period > duration, P pred)
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait_until(const std::unique_lock< s4u::Mutex > &lock, const SimulationTimePoint< Duration > &timeout_time)
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait_until(const std::unique_lock< s4u::Mutex > &lock, const SimulationTimePoint< Duration > &timeout_time, P pred)
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait_until(const std::unique_lock< s4u::Mutex > &lock, double timeout_time)
- .. autodoxymethod:: simgrid::s4u::ConditionVariable::wait_until(const std::unique_lock< s4u::Mutex > &lock, double timeout_time, P pred)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::notify_all()
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::notify_one()
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait(s4u::MutexPtr lock)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait(const std::unique_lock< s4u::Mutex > &lock)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait(const std::unique_lock< Mutex > &lock, P pred)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait_for(const std::unique_lock< s4u::Mutex > &lock, double duration)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait_for(const std::unique_lock< s4u::Mutex > &lock, double duration, P pred)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait_for(const std::unique_lock< s4u::Mutex > &lock, std::chrono::duration< Rep, Period > duration)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait_for(const std::unique_lock< s4u::Mutex > &lock, std::chrono::duration< Rep, Period > duration, P pred)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait_until(const std::unique_lock< s4u::Mutex > &lock, const SimulationTimePoint< Duration > &timeout_time)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait_until(const std::unique_lock< s4u::Mutex > &lock, const SimulationTimePoint< Duration > &timeout_time, P pred)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait_until(const std::unique_lock< s4u::Mutex > &lock, double timeout_time)
+ .. doxygenfunction:: simgrid::s4u::ConditionVariable::wait_until(const std::unique_lock< s4u::Mutex > &lock, double timeout_time, P pred)
.. group-tab:: C
- .. autodoxymethod:: sg_cond_notify_all
- .. autodoxymethod:: sg_cond_notify_one
- .. autodoxymethod:: sg_cond_wait
- .. autodoxymethod:: sg_cond_wait_for
+ .. doxygenfunction:: sg_cond_notify_all
+ .. doxygenfunction:: sg_cond_notify_one
+ .. doxygenfunction:: sg_cond_wait
+ .. doxygenfunction:: sg_cond_wait_for
.. _API_s4u_Semaphore:
Semaphore
==================
-.. autodoxyclass:: simgrid::s4u::Semaphore
+.. doxygenclass:: simgrid::s4u::Semaphore
Basic management
#include <simgrid/s4u/Semaphore.hpp>
.. doxygentypedef:: SemaphorePtr
- .. autodoxymethod:: simgrid::s4u::Semaphore::Semaphore(unsigned int initial_capacity)
- .. autodoxymethod:: simgrid::s4u::Semaphore::~Semaphore()
- .. autodoxymethod:: simgrid::s4u::Semaphore::create(unsigned int initial_capacity)
+ .. doxygenfunction:: simgrid::s4u::Semaphore::Semaphore(unsigned int initial_capacity)
+ .. doxygenfunction:: simgrid::s4u::Semaphore::~Semaphore()
+ .. doxygenfunction:: simgrid::s4u::Semaphore::create(unsigned int initial_capacity)
.. group-tab:: C
Pointer to a constant semaphore object.
- .. autodoxymethod:: sg_sem_init(int initial_value)
- .. autodoxymethod:: sg_sem_destroy(const_sg_sem_t sem)
+ .. doxygenfunction:: sg_sem_init(int initial_value)
+ .. doxygenfunction:: sg_sem_destroy(const_sg_sem_t sem)
Locking
-------
.. group-tab:: C++
- .. autodoxymethod:: simgrid::s4u::Semaphore::acquire()
- .. autodoxymethod:: simgrid::s4u::Semaphore::acquire_timeout(double timeout)
- .. autodoxymethod:: simgrid::s4u::Semaphore::get_capacity() const
- .. autodoxymethod:: simgrid::s4u::Semaphore::release()
- .. autodoxymethod:: simgrid::s4u::Semaphore::would_block() const
+ .. doxygenfunction:: simgrid::s4u::Semaphore::acquire()
+ .. doxygenfunction:: simgrid::s4u::Semaphore::acquire_timeout(double timeout)
+ .. doxygenfunction:: simgrid::s4u::Semaphore::get_capacity() const
+ .. doxygenfunction:: simgrid::s4u::Semaphore::release()
+ .. doxygenfunction:: simgrid::s4u::Semaphore::would_block() const
.. group-tab:: C
- .. autodoxymethod:: sg_sem_acquire(sg_sem_t sem)
- .. autodoxymethod:: sg_sem_acquire_timeout(sg_sem_t sem, double timeout)
- .. autodoxymethod:: sg_sem_get_capacity(const_sg_sem_t sem)
- .. autodoxymethod:: sg_sem_release(sg_sem_t sem)
- .. autodoxymethod:: sg_sem_would_block(const_sg_sem_t sem)
+ .. doxygenfunction:: sg_sem_acquire(sg_sem_t sem)
+ .. doxygenfunction:: sg_sem_acquire_timeout(sg_sem_t sem, double timeout)
+ .. doxygenfunction:: sg_sem_get_capacity(const_sg_sem_t sem)
+ .. doxygenfunction:: sg_sem_release(sg_sem_t sem)
+ .. doxygenfunction:: sg_sem_would_block(const_sg_sem_t sem)
.. |hr| raw:: html