A triangle counting assignment for A.U.TH Parallel and distributed systems class.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

48 lignes
877 B

  1. /*!
  2. * \file v3.h
  3. * \brief v3 part of the exercise header file.
  4. *
  5. * \author
  6. * Christos Choutouridis AEM:8997
  7. * <cchoutou@ece.auth.gr>
  8. */
  9. #ifndef V3_H_
  10. #define V3_H_
  11. #include <iostream>
  12. #include <mutex>
  13. #include <impl.hpp>
  14. #if defined CILK
  15. #include <cilk/cilk.h>
  16. #include <cilk/cilk_api.h>
  17. #include <cilk/reducer_opadd.h>
  18. #elif defined OMP
  19. #include <omp.h>
  20. #elif defined THREADS
  21. #include <thread>
  22. #else
  23. #endif
  24. namespace v3 {
  25. //! Select a data representation suited for V3.
  26. using matrix = SpMat<int, int>;
  27. using index_t = typename matrix::indexType; //!< syntactic sugar alias for index type
  28. using value_t = typename matrix::dataType; //!< syntactic sugar alias for value type
  29. /*
  30. * Common api for all the versions
  31. */
  32. int nworkers();
  33. std::vector<value_t> triang_v(matrix& A);
  34. value_t triang_count (std::vector<value_t>& c);
  35. };
  36. #endif /* V3_H_ */