// Statistic.h
// Function: sample statistic and acculative statistic
// Author: Qi Huaheng
// Create: 2010.08.35
// Copyright © 2010 - 2012 Qi Huaheng. All Rights Reserved
// Statistic.cpp
// Function: sample statistic and acculative statistic
// Author: Qi Huaheng
// Create: 2010.08.35
// Copyright © 2010 - 2012 Qi Huaheng. All Rights Reserved
//main.cpp
output:
----------------------------------
Single thread:
debug --- 131750 tick
release --- 44710 tick
OpenMP:
debug --- 42340 tick
release --- 10935
可见开启OpenMP后,性能提升了3倍多,哈哈哈,太棒了。
----------------------------------
P.S. 感觉改进一下程序的话,性能还可以有所提升!