[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8561 - gnuradio/branches/developers/eb/gcell-wip/gcel
From: |
eb |
Subject: |
[Commit-gnuradio] r8561 - gnuradio/branches/developers/eb/gcell-wip/gcell/src/lib/runtime/spu |
Date: |
Fri, 6 Jun 2008 20:43:08 -0600 (MDT) |
Author: eb
Date: 2008-06-06 20:43:04 -0600 (Fri, 06 Jun 2008)
New Revision: 8561
Modified:
gnuradio/branches/developers/eb/gcell-wip/gcell/src/lib/runtime/spu/gc_main.c
Log:
work-in-progress: added random component to backoff.
Modified:
gnuradio/branches/developers/eb/gcell-wip/gcell/src/lib/runtime/spu/gc_main.c
===================================================================
---
gnuradio/branches/developers/eb/gcell-wip/gcell/src/lib/runtime/spu/gc_main.c
2008-06-07 00:45:43 UTC (rev 8560)
+++
gnuradio/branches/developers/eb/gcell-wip/gcell/src/lib/runtime/spu/gc_main.c
2008-06-07 02:43:04 UTC (rev 8561)
@@ -196,6 +196,8 @@
backoff = _backoff_start;
}
+#if 0
+
static void
backoff_delay(void)
{
@@ -205,6 +207,25 @@
backoff = ((backoff << 1) + 1) & _backoff_cap;
}
+#else
+
+#define RANDOM_WEIGHT 0.2
+
+static void
+backoff_delay(void)
+{
+ gc_cdelay(backoff);
+
+ backoff = ((backoff << 1) + 1);
+ if (backoff > _backoff_cap)
+ backoff = _backoff_cap;
+
+ float r = (RANDOM_WEIGHT * (2.0 * (gc_uniform_deviate() - 0.5)));
+ backoff = backoff * (1.0 + r);
+}
+
+#endif
+
// ------------------------------------------------------------------------
static inline unsigned int
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8561 - gnuradio/branches/developers/eb/gcell-wip/gcell/src/lib/runtime/spu,
eb <=