Optimizing OpenMP loops

When you write OpenMP parallel loops, it is easy to make OpenMP schedule assign iterations too often to threads often destroying…