Permalink
Browse files

Did some stuff. Don't really know what.

  • Loading branch information...
1 parent 5707138 commit 58f14835a6cf1809fc3106fc6efaa0418acbe598 @girving committed Jun 2, 2003
Showing with 30 additions and 41 deletions.
  1. +2 −2 Makefile
  2. +0 −8 crunch.cilk
  3. +2 −2 endgame.c
  4. +24 −27 parallel.h
  5. +2 −2 rules.c
View
4 Makefile
@@ -4,8 +4,8 @@
CC = gcc
CILK = cilk
-CFLAGS = -O3 -funroll-loops -Winline -Wall
-CILKFLAGS = $(CFLAGS) -cilk-profile -cilk-critical-path
+CFLAGS = -funroll-loops -Winline -Wall
+CILKFLAGS = $(CFLAGS) #-cilk-profile -cilk-critical-path
ELIDE = -DNOCILK -x c
View
8 crunch.cilk
@@ -237,14 +237,6 @@ cilk c_res* crunch(c_res* s, int d, int a) {
if (s->rd > LOWDEPTH && (!s->da.t || s->rd >= s->da.d))
da_seta(&s->da, s->rd, *s->m-'0', s->r, s->r > a ? DV_LO : DV_HI);
-/* if (d > 397) {
- for (i=200;i>d;i--)
- putchar('*');
- 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);
- write_pq(stdout,s->p);
- }
-*/
-
return s;
}
View
4 endgame.c
@@ -85,8 +85,8 @@ void free_endgame() {
}
size_t eg_index(int t, position *p) {
- register int i,k;
- register size_t r;
+ int i,k;
+ size_t r;
if (p->s) {
r = 0;
k = p->a[PITS+1];
View
51 parallel.h
@@ -65,33 +65,30 @@ extern jobinfo *cj;
extern stackinfo p_stack[P_STACKDEPTH];
extern int p_head, p_tail;
-#define P_INIT() \
- do { \
- p_stack[p_tail].d = d; \
- p_stack[p_tail].a = a; \
- p_stack[p_tail].n = n; \
- p_stack[p_tail].s = s; \
- p_stack[p_tail].c = c; \
- p_stack[p_tail].o = o; \
- } while (0)
-
-#define P_PUSH() \
- do { \
- p_stack[p_tail].i = i; \
- p_tail++; \
- } while (0)
-
-#define P_POP() \
- do { \
- if (p_head > --p_tail) { \
- p_tail++; \
- if (cj->status = JOB_TAKEN) { \
- cj->s = *p_stack[p_tail].s; \
- cj->status = JOB_DONE; \
- } \
- return 0; \
- } \
- } while (0)
+#define P_INIT() ({ \
+ p_stack[p_tail].d = d; \
+ p_stack[p_tail].a = a; \
+ p_stack[p_tail].n = n; \
+ p_stack[p_tail].s = s; \
+ p_stack[p_tail].c = c; \
+ p_stack[p_tail].o = o; \
+ })
+
+#define P_PUSH() ({ \
+ p_stack[p_tail].i = i; \
+ p_tail++; \
+ })
+
+#define P_POP() ({ \
+ if (p_head > --p_tail) { \
+ p_tail++; \
+ if (cj->status = JOB_TAKEN) { \
+ cj->s = *p_stack[p_tail].s; \
+ cj->status = JOB_DONE; \
+ } \
+ return 0; \
+ } \
+ })
inline void P_CHECK() {
int b = pvm_nrecv(-1,-1);
View
4 rules.c
@@ -12,9 +12,9 @@ void fill_pos(position *p, int n) {
/* excessively optimized kalah movement routine */
-int move(position *ps, register int i) {
+int move(position *ps, int i) {
int s,t;
- register char *p,*sp,*ep;
+ char *p,*sp,*ep;
sp = ps->a;
if (ps->s) {
i += PITS+1;

0 comments on commit 58f1483

Please sign in to comment.