Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Did some stuff. Don't really know what.

  • Loading branch information...
commit 58f14835a6cf1809fc3106fc6efaa0418acbe598 1 parent 5707138
Geoffrey Irving authored
4 Makefile
@@ -4,8 +4,8 @@
4 4
5 5 CC = gcc
6 6 CILK = cilk
7   -CFLAGS = -O3 -funroll-loops -Winline -Wall
8   -CILKFLAGS = $(CFLAGS) -cilk-profile -cilk-critical-path
  7 +CFLAGS = -funroll-loops -Winline -Wall
  8 +CILKFLAGS = $(CFLAGS) #-cilk-profile -cilk-critical-path
9 9
10 10 ELIDE = -DNOCILK -x c
11 11
8 crunch.cilk
@@ -237,14 +237,6 @@ cilk c_res* crunch(c_res* s, int d, int a) {
237 237 if (s->rd > LOWDEPTH && (!s->da.t || s->rd >= s->da.d))
238 238 da_seta(&s->da, s->rd, *s->m-'0', s->r, s->r > a ? DV_LO : DV_HI);
239 239
240   -/* if (d > 397) {
241   - for (i=200;i>d;i--)
242   - putchar('*');
243   - printf(" d %d, s %d, o %d, a %d, r %d, m %s, rd %d, p ",d+1,s->p.s,s->o,a,s->r,s->m,s->rd);
244   - write_pq(stdout,s->p);
245   - }
246   -*/
247   -
248 240 return s;
249 241 }
250 242
4 endgame.c
@@ -85,8 +85,8 @@ void free_endgame() {
85 85 }
86 86
87 87 size_t eg_index(int t, position *p) {
88   - register int i,k;
89   - register size_t r;
  88 + int i,k;
  89 + size_t r;
90 90 if (p->s) {
91 91 r = 0;
92 92 k = p->a[PITS+1];
51 parallel.h
@@ -65,33 +65,30 @@ extern jobinfo *cj;
65 65 extern stackinfo p_stack[P_STACKDEPTH];
66 66 extern int p_head, p_tail;
67 67
68   -#define P_INIT() \
69   - do { \
70   - p_stack[p_tail].d = d; \
71   - p_stack[p_tail].a = a; \
72   - p_stack[p_tail].n = n; \
73   - p_stack[p_tail].s = s; \
74   - p_stack[p_tail].c = c; \
75   - p_stack[p_tail].o = o; \
76   - } while (0)
77   -
78   -#define P_PUSH() \
79   - do { \
80   - p_stack[p_tail].i = i; \
81   - p_tail++; \
82   - } while (0)
83   -
84   -#define P_POP() \
85   - do { \
86   - if (p_head > --p_tail) { \
87   - p_tail++; \
88   - if (cj->status = JOB_TAKEN) { \
89   - cj->s = *p_stack[p_tail].s; \
90   - cj->status = JOB_DONE; \
91   - } \
92   - return 0; \
93   - } \
94   - } while (0)
  68 +#define P_INIT() ({ \
  69 + p_stack[p_tail].d = d; \
  70 + p_stack[p_tail].a = a; \
  71 + p_stack[p_tail].n = n; \
  72 + p_stack[p_tail].s = s; \
  73 + p_stack[p_tail].c = c; \
  74 + p_stack[p_tail].o = o; \
  75 + })
  76 +
  77 +#define P_PUSH() ({ \
  78 + p_stack[p_tail].i = i; \
  79 + p_tail++; \
  80 + })
  81 +
  82 +#define P_POP() ({ \
  83 + if (p_head > --p_tail) { \
  84 + p_tail++; \
  85 + if (cj->status = JOB_TAKEN) { \
  86 + cj->s = *p_stack[p_tail].s; \
  87 + cj->status = JOB_DONE; \
  88 + } \
  89 + return 0; \
  90 + } \
  91 + })
95 92
96 93 inline void P_CHECK() {
97 94 int b = pvm_nrecv(-1,-1);
4 rules.c
@@ -12,9 +12,9 @@ void fill_pos(position *p, int n) {
12 12
13 13 /* excessively optimized kalah movement routine */
14 14
15   -int move(position *ps, register int i) {
  15 +int move(position *ps, int i) {
16 16 int s,t;
17   - register char *p,*sp,*ep;
  17 + char *p,*sp,*ep;
18 18 sp = ps->a;
19 19 if (ps->s) {
20 20 i += PITS+1;

0 comments on commit 58f1483

Please sign in to comment.
Something went wrong with that request. Please try again.