I'm facing one problem in c++.

Suppose we have `vector<SomeClass> v` and we want to add all the elements of `v` using multithreading. (the size of `v` is `N`.)
We have a overload of `+=` operator in `SomeClass` but that is not atomic-compatible.

```
SomeClass sum; // init by "zero" but not exactly a single (int)
#pragma omp parallel for
for (int i=0; i<N; ++i) {
   #pragma omp critical
   {
      sum += v[i];
   }
}

```

My experiment shows that the running time of this code is similar to the one with single thread.
I think this is due to the `critcial` section where only one thread is allowed to evaluate addition at a time. (I canoot take advantage of multithread).
Alternative would be use of `atomic` or (`reduction`), but they are not available because `+=` is not for atomic variables.

In this case, what can we do?
Should I quit to use multithread here?
Thank you very much.