1 /* SPDX-License-Identifier: GPL-2.0-or-later * 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* cpufreq-bench CPUFreq microbenchmark 2 /* cpufreq-bench CPUFreq microbenchmark 3 * 3 * 4 * Copyright (C) 2008 Christian Kornacker <ck 4 * Copyright (C) 2008 Christian Kornacker <ckornacker@suse.de> 5 */ 5 */ 6 6 7 /* load loop, this schould take about 1 to 2ms 7 /* load loop, this schould take about 1 to 2ms to complete */ 8 #define ROUNDS(x) {unsigned int rcnt; 8 #define ROUNDS(x) {unsigned int rcnt; \ 9 for (rcnt = 0; rcnt < x*1000; 9 for (rcnt = 0; rcnt < x*1000; rcnt++) { \ 10 (void)(((int)(pow(rcnt 10 (void)(((int)(pow(rcnt, rcnt) * \ 11 sqrt(rcn 11 sqrt(rcnt*7230970)) ^ 7230716) ^ \ 12 (int)ata 12 (int)atan2(rcnt, rcnt)); \ 13 } } 13 } } \ 14 14 15 15 16 void start_benchmark(struct config *config); 16 void start_benchmark(struct config *config); 17 17
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.