# Thread Local Summation: Using an Atomic Variable with Sequential Consistency

This lesson explains the solution for calculating the sum of a vector problem using an atomic variable with sequential consistency in C++.

## We'll cover the following

### Using an Atomic Variable with Sequential Consistency

Let’s replace the non-atomic global summation variable `sum`

with an atomic.

Get hands-on with 1400+ tech skills courses.