Program Listing for File ParallelGraph.h

↰ Return to documentation for file (ADS/parallel/ParallelGraph.h)

/*--------------------------------------------------------------------------*/
/*-------------------------- File ParallelGraph.h --------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef __ADS_ParallelGraph
 #define __ADS_ParallelGraph
                      /* self-identification: #endif constant */

/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/

#include "ADS/Contract.h"
#include "ADS/concurrent/ConcurrentUnionFind.h"
#include "ADS/graph/StaticGraph.h"
#include "ADS/parallel/Executor.h"

#include <algorithm>
#include <atomic>
#include <cstddef>
#include <cstdint>
#include <vector>

/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/

namespace ADS {

template< Executor E , class W >
[[nodiscard]] std::vector< int > bfsDistances( E & ex ,
                                               const StaticGraph< W > & g ,
                                               int s ,
                                               const StaticGraph< W > * gt =
                                                nullptr );

template< Executor E , class W >
[[nodiscard]] std::vector< int > connectedComponents(
                                 E & ex , const StaticGraph< W > & g );

/*--------------------------------------------------------------------------*/

}  // end( namespace ADS )

/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/

#include "ADS/parallel/impl/ParallelGraph.tpp"

/*--------------------------------------------------------------------------*/

#endif  /* ParallelGraph.h included */

/*--------------------------------------------------------------------------*/
/*------------------------ End File ParallelGraph.h ------------------------*/
/*--------------------------------------------------------------------------*/