Block-Flow: promote IterableDecorator
While at first sight just a superficial variation of the existing IterStateWrapper, it became clear with the evolution of the IterExplorer framework that this setup represents a distinct concept, and especially lends itself for complex and cohesive collaboration in a layered pipeline. Which may, or may not be a good idea, depending on the circumstances. Now, for the implementation of the scheduler memory allocation scheme, another twist is added to the picture: we can not effort the sanity checks on each access, even more so when layering / adapting iterators, where it is essential that the optimiser can remove all unnecessary warts.
This commit is contained in:
parent
946f7c17f7
commit
42ac55ea7b
4 changed files with 328 additions and 148 deletions
|
|
@ -460,39 +460,156 @@ namespace lib {
|
|||
*/
|
||||
template<class IT>
|
||||
class IterStateCore
|
||||
: public IT
|
||||
: public IT
|
||||
{
|
||||
static_assert (lib::meta::can_IterForEach<IT>::value
|
||||
,"Lumiera Iterator required as source");
|
||||
protected:
|
||||
IT&
|
||||
srcIter() const
|
||||
{
|
||||
return unConst(*this);
|
||||
}
|
||||
|
||||
public:
|
||||
using IT::IT;
|
||||
|
||||
/* === state protocol API for IterStateWrapper === */
|
||||
bool
|
||||
checkPoint() const
|
||||
{
|
||||
return bool(srcIter());
|
||||
}
|
||||
|
||||
typename IT::reference
|
||||
yield() const
|
||||
{
|
||||
return *srcIter();
|
||||
}
|
||||
|
||||
void
|
||||
iterNext()
|
||||
{
|
||||
++ srcIter();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decorator-Adapter to make a »state core« iterable as Lumiera Forward Iterator.
|
||||
* This is a fundamental (and low-level) building block and works essentially the
|
||||
* same as IterStateWrapper — with the significant difference however that the
|
||||
* _Core is mixed in by inheritance_ and thus its full interface remains publicly
|
||||
* accessible. Another notable difference is that this adapter deliberately
|
||||
* *performs no sanity-checks*. This can be dangerous, but allows to use this
|
||||
* setup even in performance critical code.
|
||||
* @warning be sure to understand the consequences of using ´core.yield()´ without
|
||||
* checks; it might be a good idea to build safety checks into the Core
|
||||
* API functions instead.
|
||||
* @tparam T nominal result type (maybe const, but without reference).
|
||||
* The resulting iterator will yield a reference to this type T
|
||||
* @tparam COR type of the »state core«. The resulting iterator will _mix-in_
|
||||
* this type, and thus inherit properties like copy, move, VTable, POD.
|
||||
* The COR must implement the following _iteration control API:_
|
||||
* -# `checkPoint` establishes if the given state element represents a valid state
|
||||
* -# ´iterNext` evolves this state by one step (sideeffect)
|
||||
* -# `yield` realises the given state, exposing a result of type `T&`
|
||||
*/
|
||||
template<typename T, class COR>
|
||||
class IterableDecorator
|
||||
: public COR
|
||||
{
|
||||
COR & _core() { return static_cast<COR&> (*this); }
|
||||
COR const& _core() const { return static_cast<COR const&> (*this); }
|
||||
|
||||
protected:
|
||||
void
|
||||
__throw_if_empty() const
|
||||
{
|
||||
if (not isValid())
|
||||
_throwIterExhausted();
|
||||
}
|
||||
|
||||
public:
|
||||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
typedef T value_type;
|
||||
|
||||
/** by default, pass anything down for initialisation of the core.
|
||||
* @note especially this allows move-initialisation from an existing core.
|
||||
* @remarks to prevent this rule from "eating" the standard copy operations,
|
||||
* and the no-op default ctor, we need to declare them explicitly below.
|
||||
*/
|
||||
template<typename...ARGS>
|
||||
IterableDecorator (ARGS&& ...init)
|
||||
: COR(std::forward<ARGS>(init)...)
|
||||
{ }
|
||||
|
||||
IterableDecorator() =default;
|
||||
IterableDecorator (IterableDecorator&&) =default;
|
||||
IterableDecorator (IterableDecorator const&) =default;
|
||||
IterableDecorator& operator= (IterableDecorator&&) =default;
|
||||
IterableDecorator& operator= (IterableDecorator const&) =default;
|
||||
|
||||
|
||||
/* === lumiera forward iterator concept === */
|
||||
|
||||
explicit operator bool() const { return isValid(); }
|
||||
|
||||
reference
|
||||
operator*() const
|
||||
{
|
||||
return _core().yield(); // core interface: yield
|
||||
}
|
||||
|
||||
pointer
|
||||
operator->() const
|
||||
{
|
||||
return & _core().yield(); // core interface: yield
|
||||
}
|
||||
|
||||
IterableDecorator&
|
||||
operator++()
|
||||
{
|
||||
_core().iterNext(); // core interface: iterNext
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool
|
||||
isValid () const
|
||||
{
|
||||
return _core().checkPoint(); // core interface: checkPoint
|
||||
}
|
||||
|
||||
bool
|
||||
empty () const
|
||||
{
|
||||
return not isValid();
|
||||
}
|
||||
|
||||
|
||||
|
||||
ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (IterableDecorator);
|
||||
|
||||
|
||||
/// Supporting equality comparisons of equivalent iterators (equivalent state core)...
|
||||
template<class T1, class T2>
|
||||
friend bool
|
||||
operator== (IterableDecorator<T1,COR> const& il, IterableDecorator<T2,COR> const& ir)
|
||||
{
|
||||
static_assert (lib::meta::can_IterForEach<IT>::value
|
||||
,"Lumiera Iterator required as source");
|
||||
protected:
|
||||
IT&
|
||||
srcIter() const
|
||||
{
|
||||
return unConst(*this);
|
||||
}
|
||||
|
||||
public:
|
||||
using IT::IT;
|
||||
|
||||
/* === state protocol API for IterStateWrapper === */
|
||||
bool
|
||||
checkPoint() const
|
||||
{
|
||||
return bool(srcIter());
|
||||
}
|
||||
|
||||
typename IT::reference
|
||||
yield() const
|
||||
{
|
||||
return *srcIter();
|
||||
}
|
||||
|
||||
void
|
||||
iterNext()
|
||||
{
|
||||
++ srcIter();
|
||||
}
|
||||
};
|
||||
return (il.empty() and ir.empty())
|
||||
or (il.isValid() and ir.isValid() and il._core() == ir._core());
|
||||
}
|
||||
|
||||
template<class T1, class T2>
|
||||
friend bool
|
||||
operator!= (IterableDecorator<T1,COR> const& il, IterableDecorator<T2,COR> const& ir)
|
||||
{
|
||||
return not (il == ir);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -175,112 +175,6 @@ namespace lib {
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* Decorate a state or logic core to treat it as Lumiera Forward Iterator.
|
||||
* This Adapter does essentially the same as \ref IterStateWrapper, but here
|
||||
* the state core is not encapsulated opaque, but rather inherited, and thus
|
||||
* the full interface of the core remains publicly accessible.
|
||||
*/
|
||||
template<typename T, class COR>
|
||||
class IterableDecorator
|
||||
: public COR
|
||||
{
|
||||
COR & _core() { return static_cast<COR&> (*this); }
|
||||
COR const& _core() const { return static_cast<COR const&> (*this); }
|
||||
|
||||
protected:
|
||||
void
|
||||
__throw_if_empty() const
|
||||
{
|
||||
if (not isValid())
|
||||
throw lumiera::error::Invalid ("Can't iterate further",
|
||||
lumiera::error::LUMIERA_ERROR_ITER_EXHAUST);
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
typedef T value_type;
|
||||
|
||||
/** by default, pass anything down for initialisation of the core.
|
||||
* @note especially this allows move-initialisation from an existing core.
|
||||
* @remarks to prevent this rule from "eating" the standard copy operations,
|
||||
* and the no-op default ctor, we need to declare them explicitly below.
|
||||
*/
|
||||
template<typename...ARGS>
|
||||
IterableDecorator (ARGS&& ...init)
|
||||
: COR(std::forward<ARGS>(init)...)
|
||||
{ }
|
||||
|
||||
IterableDecorator() =default;
|
||||
IterableDecorator (IterableDecorator&&) =default;
|
||||
IterableDecorator (IterableDecorator const&) =default;
|
||||
IterableDecorator& operator= (IterableDecorator&&) =default;
|
||||
IterableDecorator& operator= (IterableDecorator const&) =default;
|
||||
|
||||
|
||||
/* === lumiera forward iterator concept === */
|
||||
|
||||
explicit operator bool() const { return isValid(); }
|
||||
|
||||
reference
|
||||
operator*() const
|
||||
{
|
||||
__throw_if_empty();
|
||||
return _core().yield (); // core interface: yield
|
||||
}
|
||||
|
||||
pointer
|
||||
operator->() const
|
||||
{
|
||||
__throw_if_empty();
|
||||
return & _core().yield(); // core interface: yield
|
||||
}
|
||||
|
||||
IterableDecorator&
|
||||
operator++()
|
||||
{
|
||||
__throw_if_empty();
|
||||
_core().iterNext(); // core interface: iterNext
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool
|
||||
isValid () const
|
||||
{
|
||||
return _core().checkPoint(); // core interface: checkPoint
|
||||
}
|
||||
|
||||
bool
|
||||
empty () const
|
||||
{
|
||||
return not isValid();
|
||||
}
|
||||
|
||||
|
||||
|
||||
ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (IterableDecorator);
|
||||
|
||||
|
||||
/// Supporting equality comparisons of equivalent iterators (same state core)...
|
||||
template<class T1, class T2>
|
||||
friend bool
|
||||
operator== (IterableDecorator<T1,COR> const& il, IterableDecorator<T2,COR> const& ir)
|
||||
{
|
||||
return (il.empty() and ir.empty())
|
||||
or (il.isValid() and ir.isValid() and il._core() == ir._core());
|
||||
}
|
||||
|
||||
template<class T1, class T2>
|
||||
friend bool
|
||||
operator!= (IterableDecorator<T1,COR> const& il, IterableDecorator<T2,COR> const& ir)
|
||||
{
|
||||
return not (il == ir);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Adapt an IterSource to make it iterable. As such, lib::IterSource is meant
|
||||
* to be iterable, while only exposing a conventional VTable-based _iteration interface_.
|
||||
|
|
@ -403,7 +297,7 @@ namespace lib {
|
|||
struct _DecoratorTraits<SRC, enable_if<is_StateCore<SRC>>>
|
||||
{
|
||||
using SrcVal = typename CoreYield<SRC>::value_type;
|
||||
using SrcIter = iter_explorer::IterableDecorator<SrcVal, SRC>;
|
||||
using SrcIter = lib::IterableDecorator<SrcVal, SRC>;
|
||||
};
|
||||
|
||||
template<class SRC>
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ namespace gear {
|
|||
return AllocatorHandle{alloc_.begin()};
|
||||
}
|
||||
else
|
||||
{
|
||||
{//find out how the given time relates to existing Epochs
|
||||
UNIMPLEMENTED ("search through existing Epochs to locate the latest one to support given deadline");
|
||||
}
|
||||
}
|
||||
|
|
@ -257,7 +257,9 @@ namespace gear {
|
|||
void
|
||||
discardBefore (Time deadline)
|
||||
{
|
||||
UNIMPLEMENTED ("traverse oldest Epochs and discard obsoleted");
|
||||
if (isnil (alloc_)
|
||||
or asEpoch(alloc_.first()).gate().deadline() > deadline)
|
||||
return;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -54483,13 +54483,34 @@
|
|||
<node CREATED="1535890788898" ID="ID_474606436" MODIFIED="1557498707235" TEXT="IterAdapter"/>
|
||||
<node CREATED="1684279298314" ID="ID_734662702" MODIFIED="1684279301874" TEXT="RangeIterator"/>
|
||||
<node CREATED="1535891020739" ID="ID_7899831" MODIFIED="1557498707235" TEXT="IterStateWrapper">
|
||||
<node CREATED="1535891026946" ID="ID_958757780" MODIFIED="1557498707235" TEXT="sehr wichtiges Konzept"/>
|
||||
<node CREATED="1535891031609" ID="ID_1246882752" MODIFIED="1557498707236" TEXT="leider zwei Ausprägungen">
|
||||
<node CREATED="1535891041376" ID="ID_1943507267" MODIFIED="1557498707236" TEXT="Core ist opaque (private)"/>
|
||||
<node CREATED="1535891050566" ID="ID_89731232" MODIFIED="1557498707236" TEXT="von Core erben">
|
||||
<node CREATED="1535895093066" ID="ID_1894277171" MODIFIED="1557498707236" TEXT="IterableDecorator"/>
|
||||
<node CREATED="1535895095322" ID="ID_1368242997" MODIFIED="1557498707236" TEXT="gehört zu TreeExplorer"/>
|
||||
<node CREATED="1535891026946" ID="ID_958757780" MODIFIED="1689250762384" TEXT="sehr wichtiges Konzept">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node CREATED="1689250778284" ID="ID_1412378116" MODIFIED="1689250782728" TEXT="Eigenschaften ">
|
||||
<icon BUILTIN="info"/>
|
||||
<node CREATED="1535891041376" ID="ID_1943507267" MODIFIED="1689250787543" TEXT="Core ist opaque (private)"/>
|
||||
<node CREATED="1689250792218" ID="ID_812557407" MODIFIED="1689250808684" TEXT="Core muß ein Iteration-Control-API bereitstellen"/>
|
||||
</node>
|
||||
<node CREATED="1535891031609" ID="ID_1246882752" MODIFIED="1689250747093" TEXT="manchmal braucht man aber Zugang zur Core">
|
||||
<node CREATED="1689250848218" ID="ID_1379551481" MODIFIED="1689250877891" TEXT="proteced: Zugriffsfunktion stateCore()"/>
|
||||
<node CREATED="1689250881790" ID="ID_1753762237" MODIFIED="1689250891320" TEXT="anderer Ansatz ...">
|
||||
<node CREATED="1535891050566" ID="ID_89731232" MODIFIED="1689250895231" TEXT="von Core erben"/>
|
||||
<node CREATED="1689250950915" ID="ID_1060787420" MODIFIED="1689250960641" TEXT="erlaubt koähsives Layering">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node CREATED="1535895095322" ID="ID_1368242997" MODIFIED="1689251096364" TEXT="entstanden als Basis für TreeExplorer">
|
||||
<arrowlink COLOR="#423d73" DESTINATION="ID_552745986" ENDARROW="Default" ENDINCLINATION="54;-50;" ID="Arrow_ID_695542994" STARTARROW="None" STARTINCLINATION="-250;19;"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1689250933722" ID="ID_552745986" MODIFIED="1689251096364" TEXT="IterableDecorator">
|
||||
<arrowlink COLOR="#4f65c2" DESTINATION="ID_1169599821" ENDARROW="Default" ENDINCLINATION="-74;-108;" ID="Arrow_ID_680083681" STARTARROW="None" STARTINCLINATION="-68;10;"/>
|
||||
<linktarget COLOR="#423d73" DESTINATION="ID_552745986" ENDARROW="Default" ENDINCLINATION="54;-50;" ID="Arrow_ID_695542994" SOURCE="ID_1368242997" STARTARROW="None" STARTINCLINATION="-250;19;"/>
|
||||
<node CREATED="1689251037623" ID="ID_1841817797" MODIFIED="1689251043668" TEXT="minimalistischer Dekorator"/>
|
||||
<node CREATED="1689251072049" ID="ID_1212593505" MODIFIED="1689251084516" TEXT="verwendet gleiches Core-API wie IterStateWrapper"/>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1689251044542" ID="ID_883315640" MODIFIED="1689251065411" TEXT="ausnahmsweise: keinerlei ⟘-checks">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1535890793825" ID="ID_582282005" MODIFIED="1557498707236" TEXT="Itertool">
|
||||
|
|
@ -54522,6 +54543,53 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689250615891" ID="ID_849288475" MODIFIED="1689250626018" TEXT="State-Core-Struktur">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1689250630577" ID="ID_544376950" MODIFIED="1689250664508" TEXT="entwickelt sich zunehmend zu einem Basis-Protokoll für Iteration">
|
||||
<icon BUILTIN="forward"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1689250675659" ID="ID_328217249" MODIFIED="1689250679379" TEXT="Varianten?">
|
||||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
<node COLOR="#435e98" CREATED="1689249180884" ID="ID_1169599821" MODIFIED="1689252396083" TEXT="IterableDecorator : minimalistischer Core-Adapter">
|
||||
<linktarget COLOR="#4b58db" DESTINATION="ID_1169599821" ENDARROW="Default" ENDINCLINATION="-1279;68;" ID="Arrow_ID_1606137974" SOURCE="ID_537950394" STARTARROW="None" STARTINCLINATION="-2178;95;"/>
|
||||
<linktarget COLOR="#4f65c2" DESTINATION="ID_1169599821" ENDARROW="Default" ENDINCLINATION="-74;-108;" ID="Arrow_ID_680083681" SOURCE="ID_552745986" STARTARROW="None" STARTINCLINATION="-68;10;"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1689249279721" ID="ID_1459410871" MODIFIED="1689249306148" TEXT="der Name ist gut — es handelt sich um ein eigenständiges Konzept">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="14"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1689249498676" ID="ID_503269271" MODIFIED="1689250362522" TEXT="Historie: war notwendig im Iter(Tree)Explorer ... und dann wieder im BlockFlow">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Das Konzept des State-Core-Adapters hat sich im Lauf der Jahre herausgebildet, und wird mehr und mehr zu einer fundamentalen Struktur des Iteratoren-Framworks (in dem Maß, wie aus ad-hoc - Adaptern ein ganzes Framework entstanden ist). Im zweiten Anlauf für den Iter(Tree)Explorer habe ich das bereits erkannt, und die gesamte Pipeline darauf aufgebaut; allerdings zeigte sich hier, daß genau die Entscheidung, die »StateCore« als opaque zu betrachten, im größeren Kontext nicht trägt. Daher habe ich hier bewußt die Core als Basisklasse eingemischt; daraus ist der definierende Wesenszug des IterExplorers entstanden, der aber auch gleichzeitig seine größte Gefahr und Schwäche ist: das komplexe hoch-kohäsive Layering. Und nun stoße ich beim Aufbauen der Allokator-Hierarchie für den Scheduler enteut auf eine ähnlich gelagerte Situation, kann aber (da es sich um high-Performance-Code handelt), definitiv nicht den IterExplorer einsetzen. Dies bewegt mich zu dem Schritt, den IterableDecorator als ein eigenständiges Konzept zu etablieren.
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
<icon BUILTIN="list"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1689249315278" ID="ID_1697871189" MODIFIED="1689252392003" TEXT="hier bewußt alle Checks wegelassen">
|
||||
<icon BUILTIN="clanbomber"/>
|
||||
<node CREATED="1689249330748" ID="ID_1202020886" MODIFIED="1689250409855" TEXT="Begründung: das ermöglicht auch Einsatz in performance-kritischem Bereich">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1689249349397" ID="ID_1821818883" MODIFIED="1689250418012" TEXT="Policy: dann müssen eben im Zweifelsfall die Core-API-Funktionen defensiver sein">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node CREATED="1689249382304" ID="ID_1382698959" MODIFIED="1689249425284">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>damit wäre dieser Adapter ein »<b>Iterator-Implementierungs-Atom</b>«</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1535890810111" ID="ID_677938944" MODIFIED="1557498707236" TEXT="IterSource">
|
||||
<node CREATED="1535890823613" ID="ID_1227701237" MODIFIED="1557498707236" TEXT="Lumiera Iterator als Abstraktion"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1535890830772" ID="ID_1558484735" MODIFIED="1557498707236" TEXT="bestehendes Design ist ungeschickt">
|
||||
|
|
@ -78770,7 +78838,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<node COLOR="#338800" CREATED="1688562204824" ID="ID_101196546" MODIFIED="1689215743991" TEXT="Diagnose: Allokation erfolgte">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1688562219790" ID="ID_1157838911" MODIFIED="1689215757521" TEXT="aufräumen">
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1688562219790" ID="ID_1157838911" LINK="#ID_455793213" MODIFIED="1689246472425" TEXT="aufräumen">
|
||||
<icon BUILTIN="bell"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1688562225717" ID="ID_1423239902" MODIFIED="1689215748484" TEXT="Diagnose: Allocation wech">
|
||||
|
|
@ -79744,6 +79812,105 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689246500734" ID="ID_1611070672" MODIFIED="1689246508365" TEXT="Zugriff / Navigation">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689246852684" ID="ID_1894820075" MODIFIED="1689246867447" TEXT="Problemlage">
|
||||
<icon BUILTIN="info"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689246509452" ID="ID_1697713434" MODIFIED="1689246780008">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
<b>Grundproplem</b>: downcast 
|
||||
<font color="#214b76" face="Monospaced">Extent</font>
|
||||
  ⟼ 
|
||||
<font color="#214b76" face="Monospaced">Epoch</font>
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1689246796596" ID="ID_58374999" MODIFIED="1689246832632" TEXT="Zusatz-Komplikation: sowohl Iterator, alsauch Extent& treten auf">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689247882172" ID="ID_1363520850" MODIFIED="1689247914843" TEXT="mögliche Ansätze">
|
||||
<icon BUILTIN="yes"/>
|
||||
<node COLOR="#5b280f" CREATED="1689247931732" ID="ID_1905005266" MODIFIED="1689248098163" TEXT="einen Epochen-Iterator zum universellen Agens ausbauen">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
<node CREATED="1689248019527" ID="ID_167478839" MODIFIED="1689248115737" TEXT="könnte noch weitere Abkürzungsfunktionen tragen">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node CREATED="1689248045523" ID="ID_1976669785" MODIFIED="1689248115737" TEXT="könnte sogar zum Cursor für Suchen ausgebaut werden">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node CREATED="1689247950298" ID="ID_1452153328" MODIFIED="1689248108169" TEXT="für viele Zwecke ein überflüssiger back-Pointer">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node CREATED="1689247971249" ID="ID_518235048" MODIFIED="1689248015881" TEXT="aber der Optimizer bekommt das problemlos hin">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
es ist alles Inline und in einer einzigen Klassenhierarchie,
|
||||
und die Iteratoren sind hier komplett PODs
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1689248078262" ID="ID_1150588267" MODIFIED="1689248102043" TEXT="Stop! das wird jetzt unnötig clever">
|
||||
<icon BUILTIN="stop-sign"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1689248121694" ID="ID_1139194353" MODIFIED="1689248191851" TEXT="Zugriffs-Hierarchie: Allocator::iterator ⧐ EpochIter ⧐ Epoch&">
|
||||
<icon BUILTIN="forward"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689248200483" ID="ID_1272289829" MODIFIED="1689248241810" TEXT="⟹ Konsequenz: Extent& nicht eigenständig verwenden"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689248250300" ID="ID_652125369" MODIFIED="1689248275834" TEXT="Epoch wird dann alle Abkürzungen und Hilfsfunktionen tragen">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689248380839" ID="ID_215002237" MODIFIED="1689248398479" TEXT="BlockFlow stellt dann nur die grundlegenden Konverter bereit">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1689248522225" ID="ID_1824695865" MODIFIED="1689248543003" TEXT="problematisches Layering der Iteratoren">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
<node CREATED="1689248585384" ID="ID_1368624985" MODIFIED="1689248594457" TEXT="IterStateWrapper hat eine private Core"/>
|
||||
<node CREATED="1689248595565" ID="ID_1453930677" MODIFIED="1689248612015" TEXT="in IterExplorer gäbe es eine Variante mit Vererbung"/>
|
||||
<node CREATED="1689248617746" ID="ID_1302719464" MODIFIED="1689248918334" TEXT="die Lumiera Iterator-Adapter machen stets einen ⟘-check">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...das war eine Design-Entscheidung, die im allgemeinen richtig ist (es lohnt sich nicht, auf bound-checking zu verzichten). Aber hier sind wir in einer high-Performance-Zone, und es wäre gefährlich, sich nur darauf zu verlassen, daß der Compiler das per globaler Optimierung noch repariert....
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
<node CREATED="1689248943140" ID="ID_1519420651" MODIFIED="1689248965997" TEXT="je höher die Komplexität (Metaprogramming), deso unsicherer die Optimierung">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689249180884" ID="ID_537950394" MODIFIED="1689250698381" TEXT="IterableDecorator aus IterExplorer extrahieren und verschlanken">
|
||||
<arrowlink COLOR="#4b58db" DESTINATION="ID_1169599821" ENDARROW="Default" ENDINCLINATION="-1279;68;" ID="Arrow_ID_1606137974" STARTARROW="None" STARTINCLINATION="-2178;95;"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
<node CREATED="1689249237435" ID="ID_1601819255" MODIFIED="1689249275064" TEXT="diese Klasse ist eigentlich sehr sauber geschrieben">
|
||||
<icon BUILTIN="ksmiletris"/>
|
||||
</node>
|
||||
<node CREATED="1689249250387" ID="ID_1215357186" MODIFIED="1689249272079" TEXT="sie wird bisher nur über einen einzigen Punkt in IterExplorer integriert (ein Trait-Template)">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1689249279721" ID="ID_643063764" MODIFIED="1689249306148" TEXT="der Name ist gut — es handelt sich um ein eigenständiges Konzept">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="14"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1689249315278" ID="ID_511065777" MODIFIED="1689252415848" TEXT="hier bewußt alle Checks weglassen">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1689249330748" ID="ID_1433877445" MODIFIED="1689249348142" TEXT="Begründung: normalierweise setzt man sowas in einer Pipeline ein"/>
|
||||
<node CREATED="1689249349397" ID="ID_1634720720" MODIFIED="1689249372332" TEXT="Policy: dann müssen eben im Zweifelsfall die Core-API-Funktionen defensiver sein"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1688516187452" ID="ID_843039397" MODIFIED="1688516195292" TEXT="Zusatz-Infos zu verwalten">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1688516199288" ID="ID_1824919687" MODIFIED="1688516212258" TEXT="Epochen-Deadline">
|
||||
|
|
|
|||
Loading…
Reference in a new issue