From 2c7ceca3e58543c36098fd46de711d9cd80a4d12 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 11 Jun 2021 11:34:16 +0800 Subject: import(life): ... --- works/life/operating-system-experiment/ParallelCalculationDemo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'works/life') diff --git a/works/life/operating-system-experiment/ParallelCalculationDemo.cpp b/works/life/operating-system-experiment/ParallelCalculationDemo.cpp index 31ff2bf..7340da8 100644 --- a/works/life/operating-system-experiment/ParallelCalculationDemo.cpp +++ b/works/life/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; -- cgit v1.2.3