4 int main(
int argc,
char **argv)
10 int sz = (argc > 1) ? atoi(argv[1]) : 1;
11 int run, nruns = (argc > 2) ? atoi(argv[2]) : 1;
12 int opt = (argc > 3)? atoi(argv[3]) : 0;
15 if (argc == 1) fprintf(stderr,
"%s nnodes nruns opt\n\topt = 0 for agfstnode/agnxtnode\n\topt = 1 for dtflatten/dtlink\n\topt = 2 for flat array\n",argv[0]);
17 for (i = 0; i < sz; i++) {
25 for (run = 0; run < nruns; run++) {
28 sum1 = sum1 +
AGSEQ(n);
30 if (sum != sum1) fprintf(stderr,
"error\n");
34 for (run = 0; run < nruns; run++) {
40 sum1 = sum1 +
AGSEQ(n);
42 if (sum != sum1) fprintf(stderr,
"error\n");
46 for (run = 0; run < nruns; run++) {
48 for (i = 0; i < sz; i++) {
50 sum1 = sum1 +
AGSEQ(n);
52 if (sum != sum1) fprintf(stderr,
"error\n");
CGRAPH_API Agnode_t * agnode(Agraph_t *g, char *name, int createflag)
CGRAPH_API Agraph_t * agopen(char *name, Agdesc_t desc, Agdisc_t *disc)
CDT_API Dtlink_t * dtflatten(Dt_t *)
CGRAPH_API Agdesc_t Agdirected
CGRAPH_API Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
CGRAPH_API Agnode_t * agfstnode(Agraph_t *g)
int main(int argc, char **argv)