graph
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions
impact_2019_tc.cu File Reference
#include "pangolin/triangle_counter/impact_2019_tc.hpp"
#include "pangolin/logger.hpp"
#include "pangolin/utilities.hpp"
#include "pangolin/algorithm/search.cuh"
#include "pangolin/reader/gc_tsv_reader.hpp"
#include <nvToolsExt.h>
#include <limits>
#include <cub/cub.cuh>
Include dependency graph for impact_2019_tc.cu:

Functions

static __global__ void kernel_tc (uint64_t *__restrict__ triangleCounts, const Int *const edgeSrc, const Int *const edgeDst, const Int *const nodes, const size_t edgeOffset, const size_t numEdges)
 
template<size_t BLOCK_DIM_X>
static __global__ void kernel_binary (uint64_t *__restrict__ edgeTriangleCounts, const Int *edgeSrc, const Int *edgeDst, const Int *rowStarts, const Int edgeOffset, const Int numEdges)
 

Function Documentation

◆ kernel_binary()

template<size_t BLOCK_DIM_X>
static __global__ void kernel_binary ( uint64_t *__restrict__  edgeTriangleCounts,
const Int edgeSrc,
const Int edgeDst,
const Int rowStarts,
const Int  edgeOffset,
const Int  numEdges 
)
static

Count triangles

Use one warp per edge to count triangles. Compare neighbor lists in parallel with a binary search of the longer list

Parameters
edgeTriangleCountsper-edge triangle count
edgeSrclist of edge sources
edgeDstlist of edge destinations
rowStartsoffset in edgeSrc/edgeDst where each row starts
edgeOffsetwhich edge this kernel should start at
numEdgeshow many edges to work on

◆ kernel_tc()

static __global__ void kernel_tc ( uint64_t *__restrict__  triangleCounts,
const Int *const  edgeSrc,
const Int *const  edgeDst,
const Int *const  nodes,
const size_t  edgeOffset,
const size_t  numEdges 
)
static

Count triangles

Use one thread per edge to count triangles. Compare sorted neighbor lists linearly.

Parameters
triangleCountsper-edge triangle counts
edgeSrcnode ids for edge srcs
edgeDstnode ids for edge dsts
nodessource node offsets in edgeDst
edgeOffsetwhere in the edge list this function should begin counting
numEdgeshow many edges to count triangles for