Could anyone guide me please, why parallel is not working and it takes same time.
I haven't any experience with OpenMP, but this surely has to be one of the least parallelizable loops possible. You access the same object every iteration of the loop so every thread would be competing with every other thread for the same resource.
Hi, Thanks for valuable answers. I got answer for my problem, that is,
I'm developing in Visual studio 2012 and we need to change setting to support OpenMS in visual studio.
Right click on project - > Properties - > Configuration Properties - >C/C++ -> Language - > OpenMP Support -> Choose YES ( /openmp )