Используйте предложение reduction ( в MSDN ).
reduction
int* input = (int*) malloc (sizeof(int)*snum); int sum = 0; int i; for(i=0;i