X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fsync%2Fevent_analysis_chull.h;h=b82596b97009dbe4355b95867607a859bd3ccc49;hb=66eaf2eba602c331d08677dbb59ec3f9e40f0ccc;hp=c9e82457220fa4d6f3bc24f04e226e47d10bd901;hpb=467066eeab8b0a4e5ea07d24f1840310730fd470;p=lttv.git diff --git a/lttv/lttv/sync/event_analysis_chull.h b/lttv/lttv/sync/event_analysis_chull.h index c9e82457..b82596b9 100644 --- a/lttv/lttv/sync/event_analysis_chull.h +++ b/lttv/lttv/sync/event_analysis_chull.h @@ -32,36 +32,44 @@ typedef struct typedef enum { + EXACT, /* Used for identity factors (a0= 0, a1= 1) that map a trace to itself. In * this case, min, max and accuracy are not initialized. */ - EXACT, + + MIDDLE, /* The approximation is the middle of the min and max limits, all fields * are initialized. */ - MIDDLE, + + FALLBACK, /* min and max are not available because the hulls do not respect * assumptions (hulls should not intersect and the upper half-hull should * be below the lower half-hull). The approximation is a "best effort". * All fields are initialized but min and max are NULL. */ - FALLBACK, + + INCOMPLETE, /* min or max is available but not both. The hulls respected assumptions * but all receives took place after all sends or vice versa. approx and * accuracy are not initialized. */ - INCOMPLETE, + + ABSENT, /* The pair of trace did not have communications in both directions (maybe * even no communication at all). approx and accuracy are not initialized. */ - ABSENT, + + SCREWED, /* min and max are not available because the algorithms are screwed. One * of min or max (but not both) is NULL. The other is initialized. Approx * is not initialized. */ - SCREWED, + + APPROX_NB, // This must be the last member } ApproxType; +extern const char* const approxNames[APPROX_NB]; typedef struct { @@ -116,7 +124,7 @@ typedef struct typedef struct { - /* Point hullArray[traceNb][traceNb][] + /* Point* hullArray[traceNb][traceNb][] * * A message comes from two traces. The lowest numbered trace is * considered to be the reference clock, CA. The other is CB. The @@ -161,4 +169,12 @@ typedef struct AnalysisGraphsDataCHull* graphsData; } AnalysisDataCHull; + +FactorsCHull** calculateAllFactors(struct _SyncState* const syncState); +void freeAllFactors(const unsigned int traceNb, FactorsCHull** const + allFactors); + +void calculateFactorsMiddle(FactorsCHull* const factors); +void destroyFactorsCHull(FactorsCHull* factorsCHull); + #endif