After finding the best path to the reference node, factors should
be converted in this path recursively.

Signed-off-by: Masoume Jabbarifar <[email protected]>
---
 lttv/lttv/sync/factor_reduction_accuracy.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lttv/lttv/sync/factor_reduction_accuracy.c 
b/lttv/lttv/sync/factor_reduction_accuracy.c
index a63dae7..ffb2d95 100644
--- a/lttv/lttv/sync/factor_reduction_accuracy.c
+++ b/lttv/lttv/sync/factor_reduction_accuracy.c
@@ -415,8 +415,14 @@ static void getFactors(AllFactors* const allFactors, 
unsigned int** const
        unsigned int reference;
        PairFactors** const pairFactors= allFactors->pairFactors;
 
-       reference= references[traceNum];
-
+       if (traceNum == references[traceNum])
+       {
+               reference= traceNum;
+       }
+       else
+       {
+               reference= predecessors[references[traceNum]][traceNum];
+       }
        if (reference == traceNum)
        {
                factors->offset= 0.;
-- 
1.6.0.4


_______________________________________________
ltt-dev mailing list
[email protected]
http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev

Reply via email to