An extensible data structure for massive streaming graphs
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
stinger-traversal.h File Reference
#include "stinger-internal.h"

Macros

#define STINGER_FORALL_EDGES_OF_VTX_BEGIN(STINGER_, VTX_)
#define STINGER_FORALL_EDGES_OF_VTX_END()
#define STINGER_FORALL_EDGES_OF_TYPE_OF_VTX_BEGIN(STINGER_, TYPE_, VTX_)
#define STINGER_FORALL_EDGES_OF_TYPE_OF_VTX_END()
#define STINGER_PARALLEL_FORALL_EDGES_OF_VTX_BEGIN(STINGER_, VTX_)
#define STINGER_PARALLEL_FORALL_EDGES_OF_VTX_END()
#define STINGER_PARALLEL_FORALL_EDGES_OF_TYPE_OF_VTX_BEGIN(STINGER_, TYPE_, VTX_)
#define STINGER_PARALLEL_FORALL_EDGES_OF_TYPE_OF_VTX_END()
#define STINGER_FORALL_EDGES_BEGIN(STINGER_, TYPE_)
#define STINGER_FORALL_EDGES_END()
#define STINGER_PARALLEL_FORALL_EDGES_BEGIN(STINGER_, TYPE_)
#define STINGER_PARALLEL_FORALL_EDGES_END()
#define STINGER_READ_ONLY_FORALL_EDGES_OF_VTX_BEGIN(STINGER_, VTX_)
#define STINGER_READ_ONLY_FORALL_EDGES_OF_VTX_END()
#define STINGER_READ_ONLY_FORALL_EDGES_OF_TYPE_OF_VTX_BEGIN(STINGER_, TYPE_, VTX_)
#define STINGER_READ_ONLY_FORALL_EDGES_OF_TYPE_OF_VTX_END()
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_OF_VTX_BEGIN(STINGER_, VTX_)
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_OF_VTX_END()
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_OF_TYPE_OF_VTX_BEGIN(STINGER_, VTX_)
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_OF_TYPE_OF_VTX_END()
#define STINGER_READ_ONLY_FORALL_EDGES_BEGIN(STINGER_, TYPE_)
#define STINGER_READ_ONLY_FORALL_EDGES_END()
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_BEGIN(STINGER_, TYPE_)
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_END()
#define STINGER_EDGE_SOURCE   source__
#define STINGER_EDGE_TYPE   type__
#define STINGER_EDGE_DEST   current_edge__->neighbor
#define STINGER_EDGE_WEIGHT   current_edge__->weight
#define STINGER_EDGE_TIME_FIRST   current_edge__->timeFirst
#define STINGER_EDGE_TIME_RECENT   current_edge__->timeRecent
#define STINGER_RO_EDGE_SOURCE   source__
#define STINGER_RO_EDGE_TYPE   ebp__[ebp_k__].type
#define STINGER_RO_EDGE_DEST   local_current_edge__.neighbor
#define STINGER_RO_EDGE_WEIGHT   local_current_edge__.weight
#define STINGER_RO_EDGE_TIME_FIRST   local_current_edge__.timeFirst
#define STINGER_RO_EDGE_TIME_RECENT   local_current_edge__.timeRecent
#define OF_VERTICES(array, count)   vtx_filter = (array); vtx_filter_count = (count); filt_mask |= 0x1;
#define OF_EDGE_TYPES(array, count)   edge_type_filter = (array); edge_type_filter_count = (count); filt_mask |= 0x2;
#define OF_VERTEX_TYPES(array, count)   vtx_type_filter = (array); vtx_type_filter_count = (count); filt_mask |= 0x4;
#define MODIFIED_BEFORE(time)   modified_before = time; filt_mask |= 0x8;
#define MODIFIED_AFTER(time)   modified_after = time; filt_mask |= 0x8;
#define CREATED_BEFORE(time)   created_before = time; filt_mask |= 0x8;
#define CREATED_AFTER(time)   created_after = time; filt_mask |= 0x8;
#define STINGER_TRAVERSE_EDGES(stinger, filter, code)

Macro Definition Documentation

#define CREATED_AFTER (   time)    created_after = time; filt_mask |= 0x8;
#define CREATED_BEFORE (   time)    created_before = time; filt_mask |= 0x8;
#define MODIFIED_AFTER (   time)    modified_after = time; filt_mask |= 0x8;
#define MODIFIED_BEFORE (   time)    modified_before = time; filt_mask |= 0x8;
#define OF_EDGE_TYPES (   array,
  count 
)    edge_type_filter = (array); edge_type_filter_count = (count); filt_mask |= 0x2;
#define OF_VERTEX_TYPES (   array,
  count 
)    vtx_type_filter = (array); vtx_type_filter_count = (count); filt_mask |= 0x4;
#define OF_VERTICES (   array,
  count 
)    vtx_filter = (array); vtx_filter_count = (count); filt_mask |= 0x1;
#define STINGER_EDGE_SOURCE   source__
#define STINGER_EDGE_TIME_FIRST   current_edge__->timeFirst
#define STINGER_EDGE_TIME_RECENT   current_edge__->timeRecent
#define STINGER_EDGE_TYPE   type__
#define STINGER_EDGE_WEIGHT   current_edge__->weight
#define STINGER_FORALL_EDGES_BEGIN (   STINGER_,
  TYPE_ 
)
Value:
do { \
for(uint64_t p__ = 0; p__ < (STINGER_)->ETA[(TYPE_)].high; p__++) { \
struct stinger_eb * current_eb__ = ebpool + (STINGER_)->ETA[(TYPE_)].blocks[p__]; \
int64_t source__ = current_eb__->vertexID; \
int64_t type__ = current_eb__->etype; \
for(uint64_t i__ = 0; i__ < stinger_eb_high(current_eb__); i__++) { \
if(!stinger_eb_is_blank(current_eb__, i__)) { \
struct stinger_edge * current_edge__ = current_eb__->edges + i__;
#define STINGER_FORALL_EDGES_END ( )
Value:
} \
} \
} \
} while (0)
#define STINGER_FORALL_EDGES_OF_TYPE_OF_VTX_BEGIN (   STINGER_,
  TYPE_,
  VTX_ 
)
Value:
do { \
struct stinger_eb * current_eb__ = ebpool + (STINGER_)->LVA[(VTX_)].edges; \
while(current_eb__ != ebpool) { \
int64_t source__ = current_eb__->vertexID; \
int64_t type__ = current_eb__->etype; \
if(current_eb__->etype == TYPE_) { \
for(uint64_t i__ = 0; i__ < stinger_eb_high(current_eb__); i__++) { \
if(!stinger_eb_is_blank(current_eb__, i__)) { \
struct stinger_edge * current_edge__ = current_eb__->edges + i__;

Referenced by stinger_gather_typed_successors_serial().

#define STINGER_FORALL_EDGES_OF_TYPE_OF_VTX_END ( )
Value:
} \
} \
} \
current_eb__ = ebpool + (current_eb__->next); \
} \
} while (0)

Referenced by stinger_gather_typed_successors_serial().

#define STINGER_FORALL_EDGES_OF_VTX_BEGIN (   STINGER_,
  VTX_ 
)
Value:
do { \
struct stinger_eb * current_eb__ = ebpool + (STINGER_)->LVA[(VTX_)].edges; \
while(current_eb__ != ebpool) { \
int64_t source__ = current_eb__->vertexID; \
int64_t type__ = current_eb__->etype; \
for(uint64_t i__ = 0; i__ < stinger_eb_high(current_eb__); i__++) { \
if(!stinger_eb_is_blank(current_eb__, i__)) { \
struct stinger_edge * current_edge__ = current_eb__->edges + i__;
#define STINGER_FORALL_EDGES_OF_VTX_END ( )
Value:
} \
} \
current_eb__ = ebpool + (current_eb__->next); \
} \
} while (0)
#define STINGER_PARALLEL_FORALL_EDGES_BEGIN (   STINGER_,
  TYPE_ 
)
Value:
do { \
OMP("omp parallel for") \
MTA("mta assert parallel") \
for(uint64_t p__ = 0; p__ < (STINGER_)->ETA[(TYPE_)].high; p__++) { \
struct stinger_eb * current_eb__ = ebpool + (STINGER_)->ETA[(TYPE_)].blocks[p__]; \
int64_t source__ = current_eb__->vertexID; \
int64_t type__ = current_eb__->etype; \
for(uint64_t i__ = 0; i__ < stinger_eb_high(current_eb__); i__++) { \
if(!stinger_eb_is_blank(current_eb__, i__)) { \
struct stinger_edge * current_edge__ = current_eb__->edges + i__;

Referenced by stinger_gather_typed_predecessors().

#define STINGER_PARALLEL_FORALL_EDGES_END ( )
Value:
} \
} \
} \
} while (0)

Referenced by stinger_gather_typed_predecessors().

#define STINGER_PARALLEL_FORALL_EDGES_OF_TYPE_OF_VTX_BEGIN (   STINGER_,
  TYPE_,
  VTX_ 
)
Value:
do { \
struct stinger_eb * current_eb__ = ebpool + (STINGER_)->LVA[(VTX_)].edges; \
while(current_eb__ != ebpool) { \
int64_t source__ = current_eb__->vertexID; \
int64_t type__ = current_eb__->etype; \
if(current_eb__->etype == TYPE_) { \
OMP("omp parallel for") \
MTA("mta assert parallel") \
for(uint64_t i__ = 0; i__ < stinger_eb_high(current_eb__); i__++) { \
if(!stinger_eb_is_blank(current_eb__, i__)) { \
struct stinger_edge * current_edge__ = current_eb__->edges + i__;

Referenced by stinger_edge_timestamp_first(), stinger_edge_timestamp_recent(), stinger_edge_touch(), stinger_edgeweight(), stinger_gather_typed_successors(), stinger_has_typed_successor(), and stinger_set_edgeweight().

#define STINGER_PARALLEL_FORALL_EDGES_OF_TYPE_OF_VTX_END ( )
#define STINGER_PARALLEL_FORALL_EDGES_OF_VTX_BEGIN (   STINGER_,
  VTX_ 
)
Value:
do { \
struct stinger_eb * current_eb__ = ebpool + (STINGER_)->LVA[(VTX_)].edges; \
while(current_eb__ != ebpool) { \
int64_t source__ = current_eb__->vertexID; \
int64_t type__ = current_eb__->etype; \
OMP("omp parallel for") \
MTA("mta assert parallel") \
for(uint64_t i__ = 0; i__ < stinger_eb_high(current_eb__); i__++) { \
if(!stinger_eb_is_blank(current_eb__, i__)) { \
struct stinger_edge * current_edge__ = current_eb__->edges + i__;

Referenced by stinger_gather_successors().

#define STINGER_PARALLEL_FORALL_EDGES_OF_VTX_END ( )
Value:
} \
} \
current_eb__ = ebpool + (current_eb__->next); \
} \
} while (0)

Referenced by stinger_gather_successors().

#define STINGER_READ_ONLY_FORALL_EDGES_BEGIN (   STINGER_,
  TYPE_ 
)
Value:
do { \
struct stinger_eb * restrict ebp__ = ebpool; \
const struct stinger * restrict S__ = (STINGER_); \
const int64_t etype__ = (TYPE_); \
for(uint64_t p__ = 0; p__ < S__->ETA[(TYPE_)].high; p__++) { \
int64_t ebp_k__ = S__->ETA[(TYPE_)].blocks[p__]; \
const int64_t source__ = ebp__[ebp_k__].vertexID; \
const int64_t type__ = ebp__[ebp_k__].etype; \
for(uint64_t i__ = 0; i__ < ebp__[ebp_k__].high; i__++) { \
if(!stinger_eb_is_blank(&ebp__[ebp_k__], i__)) { \
constt struct stinger_edge local_current_edge__ = current_eb__->edges[i__]; \
if(local_current_edge__.neighbor >= 0) {
#define STINGER_READ_ONLY_FORALL_EDGES_END ( )
Value:
} \
} \
} \
} \
} while (0)
#define STINGER_READ_ONLY_FORALL_EDGES_OF_TYPE_OF_VTX_BEGIN (   STINGER_,
  TYPE_,
  VTX_ 
)
Value:
do { \
struct stinger_eb * restrict ebp__ = ebpool; \
const int64_t source__ = (VTX_); \
const int64_t etype__ = (TYPE_); \
int64_t ebp_k__ = (STINGER_)->LVA[source__].edges; \
while(ebp_k__ && ebp__[ebp_k__].etype != etype__) \
ebp_k__ = ebp__[ebp_k__].next; \
while(ebp_k__ && ebp__[ebp_k__].etype == etype__) { \
if (ebp__[ebp_k__].etype == etype__) { \
MTA("mta assert parallel") \
for(uint64_t i__ = 0; i__ < ebp__[ebp_k__].high; i__++) { \
if(!stinger_eb_is_blank(&ebp__[ebp_k__], i__)) { \
const struct stinger_edge local_current_edge__ = ebp__[ebp_k__].edges[i__]; \
if(local_current_edge__.neighbor >= 0) {
#define STINGER_READ_ONLY_FORALL_EDGES_OF_TYPE_OF_VTX_END ( )
Value:
} \
} \
} \
ebp_k__ = ebp__[ebp_k__].next; \
} \
} \
} while (0)
#define STINGER_READ_ONLY_FORALL_EDGES_OF_VTX_BEGIN (   STINGER_,
  VTX_ 
)
Value:
do { \
struct stinger_eb * restrict ebp__ = ebpool; \
const int64_t source__ = (VTX_); \
int64_t ebp_k__ = (STINGER_)->LVA[source__].edges; \
while(ebp_k__) { \
MTA("mta assert parallel") \
for(uint64_t i__ = 0; i__ < ebp__[ebp_k__].high; i__++) { \
if(!stinger_eb_is_blank(&ebp__[ebp_k__], i__)) { \
const struct stinger_edge local_current_edge__ = ebp__[ebp_k__].edges[i__]; \
if(local_current_edge__.neighbor >= 0) {
#define STINGER_READ_ONLY_FORALL_EDGES_OF_VTX_END ( )
Value:
} \
} \
} \
ebp_k__ = ebp__[ebp_k__].next; \
} \
} while (0)
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_BEGIN (   STINGER_,
  TYPE_ 
)
Value:
do { \
OMP("omp parallel") { \
struct stinger_eb * restrict ebp__ = ebpool; \
const struct stinger * restrict S__ = (STINGER_); \
const int64_t etype__ = (TYPE_); \
OMP("omp single") { \
for(uint64_t p__ = 0; p__ < S__->ETA[(TYPE_)].high; p__++) { \
int64_t ebp_k__ = S__->ETA[(TYPE_)].blocks[p__]; \
const int64_t source__ = ebp__[ebp_k__].vertexID; \
const int64_t type__ = ebp__[ebp_k__].etype; \
OMP("omp task untied firstprivate(ebp_k__)") \
for(uint64_t i__ = 0; i__ < ebp__[ebp_k__].high; i__++) { \
if(!stinger_eb_is_blank(&ebp__[ebp_k__], i__)) { \
constt struct stinger_edge local_current_edge__ = current_eb__->edges[i__]; \
if(local_current_edge__.neighbor >= 0) {
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_END ( )
Value:
} \
} \
} \
} \
OMP("omp taskwait"); \
} \
} \
} while (0)
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_OF_TYPE_OF_VTX_BEGIN (   STINGER_,
  VTX_ 
)
Value:
do { \
OMP("omp parallel") { \
struct stinger_eb * restrict ebp__ = ebpool; \
const int64_t source__ = (VTX_); \
const int64_t etype__ = (TYPE_); \
OMP("omp single") { \
int64_t ebp_k__ = (STINGER_)->LVA[source__].edges; \
while(ebp_k__ && ebp__[ebp_k__].etype != etype__) \
ebp_k__ = ebp__[ebp_k__].next; \
while(ebp_k__ && ebp__[ebp_k__].etype == etype__) { \
OMP("omp task untied firstprivate(ebp_k__)") \
MTA("mta assert parallel") \
for(uint64_t i__ = 0; i__ < ebp__[ebp_k__].high; i__++) { \
if(!stinger_eb_is_blank(&ebp__[ebp_k__], i__)) { \
const struct stinger_edge local_current_edge__ = ebp__[ebp_k__].edges[i__]; \
if(local_current_edge__.neighbor >= 0) {
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_OF_TYPE_OF_VTX_END ( )
Value:
} \
} \
} \
ebp_k__ = ebp__[ebp_k__].next; \
} \
} \
} OMP("omp taskwait"); \
} while (0)
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_OF_VTX_BEGIN (   STINGER_,
  VTX_ 
)
Value:
do { \
OMP("omp parallel") { \
struct stinger_eb * restrict ebp__ = ebpool; \
const int64_t source__ = (VTX_); \
OMP("omp single") { \
int64_t ebp_k__ = (STINGER_)->LVA[source__].edges; \
while(ebp_k__) { \
OMP("omp task untied firstprivate(ebp_k__)") \
MTA("mta assert parallel") \
for(uint64_t i__ = 0; i__ < ebp__[ebp_k__].high; i__++) { \
if(!stinger_eb_is_blank(&ebp__[ebp_k__], i__)) { \
const struct stinger_edge local_current_edge__ = ebp__[ebp_k__].edges[i__]; \
if(local_current_edge__.neighbor >= 0) {
#define STINGER_READ_ONLY_PARALLEL_FORALL_EDGES_OF_VTX_END ( )
Value:
} \
} \
} \
ebp_k__ = ebp__[ebp_k__].next; \
} \
} \
} OMP("omp taskwait"); \
} while (0)
#define STINGER_RO_EDGE_DEST   local_current_edge__.neighbor
#define STINGER_RO_EDGE_SOURCE   source__
#define STINGER_RO_EDGE_TIME_FIRST   local_current_edge__.timeFirst
#define STINGER_RO_EDGE_TIME_RECENT   local_current_edge__.timeRecent
#define STINGER_RO_EDGE_TYPE   ebp__[ebp_k__].type
#define STINGER_RO_EDGE_WEIGHT   local_current_edge__.weight
#define STINGER_TRAVERSE_EDGES (   stinger,
  filter,
  code 
)

 

comments powered by Disqus