AUTH's THMMY "Parallel and distributed systems" course assignments.
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.
 
 
 
 
 
 

75 lignes
2.0 KiB

  1. /*!
  2. * \file
  3. * \brief Build configuration file.
  4. *
  5. * \author
  6. * Christos Choutouridis AEM:8997
  7. * <cchoutou@ece.auth.gr>
  8. */
  9. #ifndef CONFIG_H_
  10. #define CONFIG_H_
  11. #include <cstdint>
  12. /*
  13. * Defines for different version of the exercise
  14. */
  15. #define BITONIC (1)
  16. #define BUBBLETONIC (2)
  17. // Fail-safe version selection
  18. #if !defined CODE_VERSION
  19. #define CODE_VERSION BITONIC
  20. #endif
  21. // Default Data size (in case -q <N> is not present)
  22. static constexpr size_t DEFAULT_DATA_SIZE = 1 << 16;
  23. // The maximum MPI size we support (in Nodes x Processes)
  24. static constexpr size_t MAX_MPI_SIZE = 1024UL;
  25. // The maximum pipeline size we support
  26. static constexpr size_t MAX_PIPELINE_SIZE = 64UL;
  27. /*!
  28. * Value type selection
  29. *
  30. * We support the following compiler types or the <cstdint> that translate to them:
  31. * char - unsigned char
  32. * short - unsigned short
  33. * int - unsigned int
  34. * long - unsigned long
  35. * long long - unsigned long long
  36. * float
  37. * double
  38. */
  39. using distValue_t = uint32_t;
  40. /*!
  41. * Session option for each invocation of the executable.
  42. *
  43. * @note
  44. * The values of the members are set from the command line.
  45. */
  46. struct config_t {
  47. size_t arraySize{DEFAULT_DATA_SIZE}; //!< The array size of the local data to sort.
  48. bool exchangeOpt{false}; //!< Flag to request the exchange optimization
  49. size_t pipeline{1UL}; //!< Pipeline stages (1 to disable)
  50. bool validation{false}; //!< Request a full validation at the end, performed by process rank 0.
  51. bool ndebug{false}; //!< Skips debug trap on DEBUG builds.
  52. size_t perf{1}; //!< Enable performance timing measurements and prints and repeat
  53. //!< the sorting <perf> times.
  54. bool verbose{false}; //!< Flag to enable verbose output to stdout.
  55. };
  56. /*
  57. * Exported data types
  58. */
  59. extern config_t config;
  60. #endif /* CONFIG_H_ */