From: Akshay S. <ak...@us...> - 2013-01-31 01:53:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "matlisp". The branch, tensor has been updated via 702e41559e7f9cc9d84d108e467a1ec132e6f50f (commit) from 13671606829449440d65e08dd7ec8b54560c8f23 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 702e41559e7f9cc9d84d108e467a1ec132e6f50f Author: Akshay Srinivasan <aks...@gm...> Date: Wed Jan 30 17:44:04 2013 -0800 Removed comments from mm.c. diff --git a/tests/mm.c b/tests/mm.c index d7a8bb3..4fa56c7 100644 --- a/tests/mm.c +++ b/tests/mm.c @@ -18,9 +18,6 @@ int main(int argc, char *argv[]){ a = calloc(n * n, sizeof(double)); b = calloc(n * n, sizeof(double)); c = calloc(n * n, sizeof(double));; - /* double a[] = {1, 2, 3, 4}, */ - /* b[] = {4, 5, 6, 7}, */ - /* c[] = {0, 0, 0, 0}; */ int i, j, k, l; printf("N: %d\n", n); @@ -35,38 +32,7 @@ int main(int argc, char *argv[]){ int of_a = 0, of_b = 0, of_c = 0; clock_t co, ci; - ci = clock(); - - /* for(i = 0; i < n; i++){ */ - /* for(j = 0; j < n; j++){ */ - /* tmp = 0.; */ - /* for(k = 0; k < n; k++){ */ - /* /\* if((of_c > n * n) || (of_c < 0) || \ *\/ */ - /* /\* (of_b > n * n) || (of_b < 0) || \ *\/ */ - /* /\* (of_a > n * n) || (of_a < 0)){ *\/ */ - /* /\* fprintf(stderr, "%d %d %d\n", i, j, k); *\/ */ - /* /\* fprintf(stderr, "of_a: %d\nof_b: %d\nof_c: %d\n", of_a, of_b, of_c); *\/ */ - /* /\* exit(2); *\/ */ - /* /\* } *\/ */ - /* tmp += a[of_a] * b[of_b]; */ - /* of_a += 1; // k */ - /* of_b += n; // k */ - /* } */ - /* c[of_c] += tmp; */ - /* of_b -= n * n; */ - /* of_a -= 1 * n; */ - /* // */ - /* of_c += 1; // j */ - /* of_b += 1; // j */ - /* } */ - /* of_c -= 1 * n; */ - /* // */ - /* of_c += n;//i j */ - /* of_a += n;//i k */ - /* of_b = 0;// k j */ - /* } */ - of_a = 0; of_b = 0; @@ -79,24 +45,12 @@ int main(int argc, char *argv[]){ of_c += 1; of_b += 1; } - /* for(l = 0; l < n * n; l++) */ - /* fprintf(stdout, "%lf\t", c[l]); */ - /* fprintf(stdout, "\n", c[l]); */ of_c -= n; of_a += 1; } of_c += n; of_b = 0; - } - - /* double err = 0.0; */ - /* for(i = 0; i < n * n; i++) */ - /* err += fabs(c[i]); */ - /* fprintf(stdout, "err: %lf\n", err); */ - - /* for(i = 0; i < n * n; i++) */ - /* fprintf(stdout, "%lf\n", c[i]); */ - + } co = clock(); //GCC is lazy! @@ -105,23 +59,5 @@ int main(int argc, char *argv[]){ fclose(fdump); fprintf(stdout, "Time: %lf\n", (double) (co - ci) / CLOCKS_PER_SEC); - /* FILE *out; */ - - /* out = fopen("a", "w"); */ - /* for(i = 0; i < n; i++){ */ - /* for(j = 0; j < n; j++) */ - /* fprintf(out, "%lf\t", a[n * i + j]); */ - /* fprintf(out, "\n"); */ - /* } */ - /* fclose(out); */ - - /* out = fopen("c", "w"); */ - /* for(i = 0; i < n; i++){ */ - /* for(j = 0; j < n; j++) */ - /* fprintf(out, "%lf\t", c[n * i + j]); */ - /* fprintf(out, "\n"); */ - /* } */ - /* fclose(out); */ - free(a); free(b); free(c); } ----------------------------------------------------------------------- Summary of changes: tests/mm.c | 66 +----------------------------------------------------------- 1 files changed, 1 insertions(+), 65 deletions(-) hooks/post-receive -- matlisp |