John Elaine
John Elaine

Reputation: 389

CilkPlus: Vector of reducers that are not cache aligned

I am using Cilk and a custom reducer as described here: https://software.intel.com/en-us/node/522608. In their example, they use the reducer for append operation in a linked list.

Now, I want to create a vector of reducers (using std::vector); however, I get the following runtime error:

Reducer should be cache aligned. Please see comments following this assertion for explanation and fixes.

After looking at the comments (line 948 here: https://github.com/Nyks45/Toolchain/blob/master/lib/gcc/x86_64-unknown-linux-gnu/5.3.1/include/cilk/reducer.h) I realized that I need to use "new-style" reducers to work around this so that they are not necessarily cache-aligned. However, I cannot find any documentation/example of how I can create a "new-style" reducer.

How do I create a custom "new-style" reducer for the above linked-list example?

Upvotes: 1

Views: 107

Answers (0)

Related Questions