diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-11-17 09:11:01 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-11-17 09:11:01 +0000 |
commit | 7d9057a6ca6f591851ee5c6e8d74e3833aae3903 (patch) | |
tree | 7577f9b16008a7ceb6158eb836909f1fa636dbc8 /benchmarks/polybench-syn/linear-algebra/solvers/durbin.c | |
parent | 6aa7ea660f19e7bde920b5b22c1c0c93f1be2fd7 (diff) | |
parent | 38b249970456a55f0a69ff28070887367e113205 (diff) | |
download | vericert-7d9057a6ca6f591851ee5c6e8d74e3833aae3903.tar.gz vericert-7d9057a6ca6f591851ee5c6e8d74e3833aae3903.zip |
Merge branch 'dev-experiments'
Diffstat (limited to 'benchmarks/polybench-syn/linear-algebra/solvers/durbin.c')
-rw-r--r-- | benchmarks/polybench-syn/linear-algebra/solvers/durbin.c | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c b/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c index 5c853a7..b51adca 100644 --- a/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c +++ b/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c @@ -52,45 +52,6 @@ int sdivider(int N, int D) { } } -unsigned int divider(unsigned int x, unsigned int y) -{ - unsigned int r0, q0, y0, y1; - - r0 = x; - q0 = 0; - y0 = y; - y1 = y; - do - { - y1 = 2 * y1; - } while (y1 <= x); - do - { - y1 = y1 / 2; - q0 = 2 * q0; - if (r0 >= y1) - { - r0 = r0 - y1; - q0 = q0 + 1; - } - } while ((int)y1 != (int)y0); - return q0; -} - -int sdivider(int N, int D) { - if (D < 0) { - if (N < 0) - return divider(-N, -D); - else - return -divider(N, -D); - } else { - if (N < 0) - return -divider(-N, D); - else - return divider(N, D); - } -} - #define plus(i) i = i + ONE /* Include polybench common header. */ static @@ -118,11 +79,11 @@ int print_array(int n, int res = 0; for (i = 0; i < n; plus(i)) { - res += y[i]; + res ^= y[i]; } #ifndef SYNTHESIS - printf("finished = %u\n", res); + printf("finished: %u\n", res); #endif return res; |