16 unsigned cas(
unsigned * addr,
unsigned old,
unsigned new)
32 unsigned ifa(
unsigned * addr,
unsigned val)
44 void kernel(
unsigned vertex,
unsigned *p_Qnext,
unsigned *Qnext_N,
unsigned *
map)
48 if ( cas ( &map[
edges[i]],0,1 ) == 0 ) {
49 p_Qnext[ifa( Qnext_N, 1 )] =
edges[i];
56 void kernel_wrapper(
unsigned int i,
unsigned * p_Q,
unsigned * p_Qnext,
unsigned * Qnext_N)
64 void parallel(
unsigned start,
unsigned end,
unsigned * p_Q,
unsigned * p_Qnext,
unsigned * Qnext_N)
67 #pragma omp parallel for 68 for (i = start; i < end; ++i)
69 kernel_wrapper(i, p_Q, p_Qnext, Qnext_N);
88 unsigned * p_Q = (
unsigned * ) Q;
89 unsigned * p_Qnext = (
unsigned * ) Qnext;
93 unsigned totExplored = 0;
98 parallel(0, Q_N, p_Q, p_Qnext, &Qnext_N);
__attribute__((noinline))
Convert the given fixedpt number to a decimal string.
unsigned map[NUM_VERTICES]
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
void kernel(unsigned vertex, unsigned *p_Qnext, unsigned *Qnext_N, unsigned *map)
unsigned offset[NUM_VERTICES+1]