A triangle counting assignment for A.U.TH Parallel and distributed systems class.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

49 linhas
895 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 <atomic>
  14. #include <impl.hpp>
  15. #if defined CILK
  16. #include <cilk/cilk.h>
  17. #include <cilk/cilk_api.h>
  18. #include <cilk/reducer_opadd.h>
  19. #elif defined OMP
  20. #include <omp.h>
  21. #elif defined THREADS
  22. #include <thread>
  23. #else
  24. #endif
  25. namespace v3 {
  26. //! Select a data representation suited for V3.
  27. using matrix = SpMat<int, int>;
  28. using index_t = typename matrix::indexType; //!< syntactic sugar alias for index type
  29. using value_t = typename matrix::dataType; //!< syntactic sugar alias for value type
  30. /*
  31. * Common api for all the versions
  32. */
  33. int nworkers();
  34. std::vector<value_t> triang_v(matrix& A);
  35. value_t triang_count (std::vector<value_t>& c);
  36. };
  37. #endif /* V3_H_ */