1
/* This software was developed by Bruce Hendrickson and Robert Leland *
2
* at Sandia National Laboratories under US Department of Energy *
3
* contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */
7
#include "refine_map.h"
10
struct refine_edata *find_edge_cube(node, dim, edata, nsets_tot)
11
int node; /* processor node */
12
int dim; /* direction of edge from node */
13
struct refine_edata *edata; /* data structure for edge preferences */
14
int nsets_tot; /* total number of processors */
16
struct refine_edata *eguy; /* returned pointer to edge info */
17
int index; /* computed index into edata */
19
/* Squeeze out bit dim from node number. */
20
index = node ^ ((node >> dim) << dim);
21
index ^= ((node >> (dim+1)) << dim);
22
index += dim* nsets_tot/2;
24
eguy = &(edata[index]);