Software Archive
Read-only legacy content
17060 Discussions

Array of Reducers - Possible in C?

Detector
Beginner
290 Views

I was wondering if it is possible to create an array of reducers in C?

I already read the documentation, but they use always only one reducer. However, how do I use Cilk reducers for an array with int or double values? Can you give  me a short example?

Thanks in advance.

0 Kudos
1 Reply
Jim_S_Intel
Employee
290 Views

Some of the more recent posts on the forum have discussed array reducers in C++.  I don't know how easy it would be to do that in C though.
The simplest solution for creating an array reducer in C might be to creating a wrapper for a C++ library that is callable from C code?
Unfortunately, depending on the size of your array, having an array of reducers may not necessarily give you good performance.
Cheers,

Jim

0 Kudos
Reply