Implementation of different algorithms in OpenMP