In my search application there are globally variables defined outside any function that I would like to use the cilk reducers on.
Specifically I have code like this:
#include "search.h" static int total_users = 0; static int total_matches = 0;
These total_x variables are incremented throughout the application on different functions.
I tried adding the following for total_users and received the following error:
cilk::reducer_opadd<static int> total_users;
cilk plus error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
What am I doing wrong here?