1: static char Sccsid[] = "ag.c @(#)ag.c 1.2 10/1/82 Berkeley ";
2: #include "apl.h"
3:
4: ex_diot()
5: {
6: register struct item *p, *q, *r;
7: int i, j;
8:
9: p = fetch2();
10: q = sp[-2];
11: r = newdat(DA, q->rank, q->size);
12: copy(IN, q->dim, r->dim, q->rank);
13: for(i=0; i<q->size; i++) {
14: datum = getdat(q);
15: p->index = 0;
16: for(j=0; j<p->size; j++)
17: if(fuzz(getdat(p), datum) == 0)
18: break;
19: datum = j + thread.iorg;
20: putdat(r, datum);
21: }
22: pop();
23: pop();
24: *sp++ = r;
25: }
26:
27: ex_eps()
28: {
29: register struct item *p, *q, *r;
30: int i, j;
31: data d;
32:
33: p = fetch2();
34: q = sp[-2];
35: r = newdat(DA, p->rank, p->size);
36: copy(IN, p->dim, r->dim, p->rank);
37: for(i=0; i<p->size; i++) {
38: datum = getdat(p);
39: d = zero;
40: q->index = 0;
41: for(j=0; j<q->size; j++)
42: if(fuzz(getdat(q), datum) == 0) {
43: d = one;
44: break;
45: }
46: putdat(r, d);
47: }
48: pop();
49: pop();
50: *sp++ = r;
51: }
Defined functions
Defined variables
Sccsid
defined in line
1;
never used