diff options
author | crupest <crupest@outlook.com> | 2021-06-11 11:34:16 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-11 11:34:16 +0800 |
commit | 0c1d400a5f3a93a245e579bbfa7aa251077eff26 (patch) | |
tree | ff21f2bf5ab8afe72581f128ce609b4d601417a3 | |
parent | 09b9435d38fa845e2feca8e7c5530674d253bb30 (diff) | |
download | life-0c1d400a5f3a93a245e579bbfa7aa251077eff26.tar.gz life-0c1d400a5f3a93a245e579bbfa7aa251077eff26.tar.bz2 life-0c1d400a5f3a93a245e579bbfa7aa251077eff26.zip |
...
-rw-r--r-- | operating-system-experiment/ParallelCalculationDemo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/operating-system-experiment/ParallelCalculationDemo.cpp b/operating-system-experiment/ParallelCalculationDemo.cpp index 31ff2bf..7340da8 100644 --- a/operating-system-experiment/ParallelCalculationDemo.cpp +++ b/operating-system-experiment/ParallelCalculationDemo.cpp @@ -41,7 +41,7 @@ int main(int argc, char **argv) { if (i == thread_number - 1) { threads[i] = cru::Thread([&ps, start] { long long sum = 0; - for (long long j = start; j <= 1e9; j++) { + for (long long j = start; j <= N; j++) { sum += j; } ps = sum; |