Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

ATTN: An AppCore Bug-Fix Is Ready...

Chris_M__Thomasson
New Contributor I
288 Views

Here is some information on the bug that was fixed:

http://groups.google.com/group/comp.programming.threads/browse_frm/thread/cf4a952ff5af7d
(read all...)

In addition to fixing the eventcount signaling logic wrt the
single-producer/consumer queue, I have added the following functions:

ac_eventcount_algo1.h
____________________________________________________
ac_eventcount_algo1_signal_naked(...);
ac_eventcount_algo1_signal_fence(...);
#define ac_eventcount_algo1_signal
ac_eventcount_algo1_signal_fence
____________________________________________________


ac_queue_spsc.h
____________________________________________________
ac_queue_spsc_getec(...);
ac_queue_spsc_push_nosig(...);
____________________________________________________

You can use the functions above to take advantage of amortization wrt the #StoreLoad memory barrier that needs to be executed before the 'ac_eventcount_algo1_signal_naked(...)' gets called.


One simple example... Build batches of nodes and push pointers to the batches into the queue using 'ac_queue_spsc_push_nosig(...)'. Once your done with that you can do something like this for the final signal, and memory barrier:
____________________________________________________
/* try and build multiple batches of work */

/* push pointers to the batches into a set of
queues using 'ac_queue_spsc_push_nosig(...)' */

/* call ac_mb_fence() */

/* finally, signal each queues eventcount using */
ac_eventcount_algo1_signal_naked(
ac_queue_spsc_getec(...)
)
____________________________________________________

This makes improvement on AppCore queuing API; what do you think?

--
Chris M. Thomasson
http://appcore.home.comcast.net

0 Kudos
0 Replies
Reply