<h3>Specific improvements</h3>
<ol>
+ <li> Fixed: Move the implementation of Subscriptor::(un)subscribe() to
+ the .cc file so that it is possible to link against the debug library
+ without specifying <code>-DDEBUG</code>
+ <br>
+ (Wolfgang Bangerth, 2013/12/13)
+ </li>
+
<li> Fixed: Since the introduction of ThreadLocalStorage in version 8.0, the
way in which FEValues objects visit cells in a parallel assembly loop is no
longer deterministic. Therefore, the detection of CellSimilarity that can
void serialize(Archive &ar, const unsigned int version);
private:
- /**
- * Register a subscriber for
- * debugging purposes. Called by
- * subscribe() in debug mode.
- */
- void do_subscribe(const char *id) const;
-
- /**
- * Deregister a subscriber for
- * debugging purposes. Called by
- * unsubscribe() in debug mode.
- */
- void do_unsubscribe(const char *id) const;
-
/**
* The data type used in
* #counter_map.
// documentation of this function
}
-// If we are in optimized mode, the subscription checking is turned
-// off. Therefore, we provide inline definitions of subscribe and
-// unsubscribe here. The definitions for debug mode are in
-// subscriptor.cc.
-
-#ifdef DEBUG
-
-inline void
-Subscriptor::subscribe(const char *id) const
-{
- do_subscribe(id);
-}
-
-
-inline void
-Subscriptor::unsubscribe(const char *id) const
-{
- do_unsubscribe(id);
-}
-
-#else
-
-inline void
-Subscriptor::subscribe(const char *) const
-{}
-
-
-inline void
-Subscriptor::unsubscribe(const char *) const
-{}
-
-#endif
DEAL_II_NAMESPACE_CLOSE
#endif
return *this;
}
-// These are the implementations for debug mode. The optimized
-// versions are inlined in the header file.
-void Subscriptor::do_subscribe (const char *id) const
+
+void
+Subscriptor::subscribe(const char *id) const
{
#ifdef DEBUG
if (object_info == 0)
Threads::Mutex::ScopedLock lock (subscription_lock);
++counter;
-#ifndef DEAL_II_WITH_THREADS
+# ifndef DEAL_II_WITH_THREADS
const char *const name = (id != 0) ? id : unknown_subscriber;
map_iterator it = counter_map.find(name);
else
it->second++;
-#endif
+# endif
+#else
+ (void)id;
#endif
}
-void Subscriptor::do_unsubscribe (const char *id) const
+void
+Subscriptor::unsubscribe(const char *id) const
{
#ifdef DEBUG
const char *name = (id != 0) ? id : unknown_subscriber;
Threads::Mutex::ScopedLock lock (subscription_lock);
--counter;
-#ifndef DEAL_II_WITH_THREADS
+# ifndef DEAL_II_WITH_THREADS
map_iterator it = counter_map.find(name);
AssertNothrow (it != counter_map.end(), ExcNoSubscriber(object_info->name(), name));
AssertNothrow (it->second > 0, ExcNoSubscriber(object_info->name(), name));
it->second--;
-#endif
+# endif
+#else
+ (void)id;
#endif
}
+
unsigned int Subscriptor::n_subscriptions () const
{
return counter;
}
+
void Subscriptor::list_subscribers () const
{
#ifndef DEAL_II_WITH_THREADS