From: masoume.jabbarifar@polymtl.ca (masoume.jabbarifar@polymtl.ca)
Subject: [ltt-dev] [PATCH] Fix passing factors in recursive function
Date: Tue, 14 Sep 2010 16:12:25 -0400 [thread overview]
Message-ID: <1284495145-3483-1-git-send-email-masoume.jabbarifar@polymtl.ca> (raw)
From: Masoume Jabbarifar <masoume.jabbarifar@polymtl.ca>
---
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
next reply other threads:[~2010-09-14 20:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-14 20:12 masoume.jabbarifar [this message]
2010-09-14 20:20 ` Mathieu Desnoyers
2010-09-14 20:52 Masoume Jabbarifar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1284495145-3483-1-git-send-email-masoume.jabbarifar@polymtl.ca \
--to=masoume.jabbarifar@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox