I have this piece of code:
clang give this warning: implicit use of sequentially-consistent atomic may incur stronger memory barriers than necessary.Code:atomic_int Vector[2]; void Load(int *v) { v[0]=atomic_load(&Vector[0]); v[1]=atomic_load(&Vector[1]); } void Store(int *v) { atomic_store(&Vector[0],v[0]); atomic_store(&Vector[1],v[1]); }
How can this warning be solved?