Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple adaptive loop diagram to overview #1126

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added docs/images/adaptiveloop.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions docs/images/diagram_xml/adaptiveloop.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<mxfile host="app.diagrams.net" modified="2023-10-10T15:23:19.249Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/118.0" etag="MYnnSqnDCQL1vC68zsrn" version="22.0.4" type="device">
<diagram id="So9COAy3udL509a2Arj8" name="Page-1">
<mxGraphModel dx="1113" dy="1027" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="4sTCNYGbPbaJPwJmf5uU-10" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeWidth=8;fillColor=#dae8fc;strokeColor=#6c8ebf;shadow=0;endArrow=block;endFill=1;" parent="1" source="Eila8J3MZG09ezIj7BeO-4" target="4sTCNYGbPbaJPwJmf5uU-3" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="Eila8J3MZG09ezIj7BeO-4" value="&lt;font color=&quot;#fafafa&quot;&gt;Generators&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fontStyle=2;shadow=1;fillColor=#105391;strokeColor=#000000;perimeterSpacing=5;strokeWidth=4;fontSize=24;fontColor=#ffffff;" parent="1" vertex="1">
<mxGeometry x="370" y="360" width="150" height="60" as="geometry" />
</mxCell>
<mxCell id="4sTCNYGbPbaJPwJmf5uU-9" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeWidth=8;fillColor=#d5e8d4;strokeColor=#82b366;shadow=0;endArrow=block;endFill=1;" parent="1" source="1PzkiIWN6Ap1b435hDzn-5" target="4sTCNYGbPbaJPwJmf5uU-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="1PzkiIWN6Ap1b435hDzn-5" value="&lt;font color=&quot;#000000&quot;&gt;Simulators&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fontStyle=2;shadow=1;fillColor=#97D077;fontColor=#ffffff;strokeColor=#000000;perimeterSpacing=5;strokeWidth=4;fontSize=24;" parent="1" vertex="1">
<mxGeometry x="370" y="260" width="150" height="60" as="geometry" />
</mxCell>
<mxCell id="4sTCNYGbPbaJPwJmf5uU-8" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=1;entryDx=0;entryDy=0;strokeWidth=8;fillColor=#d5e8d4;strokeColor=#82b366;shadow=0;endArrow=block;endFill=1;" parent="1" source="4sTCNYGbPbaJPwJmf5uU-2" target="Eila8J3MZG09ezIj7BeO-4" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4sTCNYGbPbaJPwJmf5uU-2" value="d&lt;b&gt;&lt;font face=&quot;Lucida Console&quot;&gt;&lt;i&gt;&lt;font style=&quot;font-size: 30px;&quot;&gt;f(x&lt;/font&gt;n&lt;font style=&quot;font-size: 30px;&quot;&gt;)&lt;/font&gt;&lt;/i&gt;&lt;/font&gt;&lt;/b&gt;" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=4;strokeColor=#000000;fontColor=none;fillColor=#97D077;noLabel=1;labelBackgroundColor=none;labelBorderColor=none;fontSize=21;fontFamily=Lucida Console;verticalAlign=middle;align=center;shadow=1;perimeterSpacing=1;" parent="1" vertex="1">
<mxGeometry x="275" y="295" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="4sTCNYGbPbaJPwJmf5uU-7" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=0;entryDx=0;entryDy=0;strokeWidth=8;fillColor=#dae8fc;strokeColor=#6c8ebf;shadow=0;endArrow=block;endFill=1;" parent="1" source="4sTCNYGbPbaJPwJmf5uU-3" target="1PzkiIWN6Ap1b435hDzn-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="4sTCNYGbPbaJPwJmf5uU-3" value="" style="ellipse;whiteSpace=wrap;html=1;strokeWidth=4;strokeColor=#000000;fontColor=none;fillColor=#105391;noLabel=1;labelBackgroundColor=none;labelBorderColor=none;fontSize=21;fontFamily=Lucida Console;verticalAlign=middle;align=center;shadow=1;perimeterSpacing=1;" parent="1" vertex="1">
<mxGeometry x="540" y="295" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="4sTCNYGbPbaJPwJmf5uU-4" value="&lt;font style=&quot;font-size: 13px;&quot;&gt;&lt;b&gt;&lt;font face=&quot;Lucida Console&quot;&gt;&lt;i&gt;&lt;font style=&quot;font-size: 40px;&quot;&gt;x&lt;/font&gt;&lt;/i&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;font size=&quot;1&quot;&gt;&lt;font style=&quot;font-size: 14px;&quot; face=&quot;Lucida Console&quot;&gt;&lt;i&gt;&lt;b&gt;n&lt;/b&gt;&lt;/i&gt;&lt;/font&gt;&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;shadow=1;rounded=1;strokeWidth=3;fontColor=#FAFAFA;" parent="1" vertex="1">
<mxGeometry x="556" y="305" width="50" height="60" as="geometry" />
</mxCell>
<mxCell id="1PzkiIWN6Ap1b435hDzn-11" value="&lt;b&gt;&lt;font face=&quot;Lucida Console&quot;&gt;&lt;i&gt;&lt;font style=&quot;font-size: 30px;&quot;&gt;f(x&lt;/font&gt;n&lt;font style=&quot;font-size: 30px;&quot;&gt;)&lt;/font&gt;&lt;/i&gt;&lt;/font&gt;&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;shadow=1;rounded=1;strokeWidth=3;" parent="1" vertex="1">
<mxGeometry x="275" y="310" width="80" height="50" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
7 changes: 7 additions & 0 deletions docs/overview_usecases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ which perform computations via **user functions**:
* :ref:`allocator<api_alloc_f>`: Decides whether a simulator or generator should be
called (and with what inputs/resources) as workers become available

.. figure:: images/adaptiveloop.png
:alt: Adaptive loops
:align: center
:scale: 90

|

The default allocator (``alloc_f``) instructs workers to run the simulator on the
highest priority work from the generator. If a worker is idle and there is
no work, that worker is instructed to call the generator.
Expand Down