AUTH's THMMY "Parallel and distributed systems" course assignments.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

70 Zeilen
1.7 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
  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. struct config_t {
  44. size_t arraySize{DEFAULT_DATA_SIZE}; //!< The array size of the local data to sort.
  45. size_t pipeline{1UL}; //!< Pipeline stages
  46. bool validation{false}; //!< Request a full validation at the end, performed by process rank 0.
  47. bool ndebug{false}; //!< Skips debug trap on DEBUG builds.
  48. bool perf{false}; //!< Enable performance timing measurements and prints.
  49. bool verbose{false}; //!< Flag to enable verbose output to stdout.
  50. };
  51. /*
  52. * Exported data types
  53. */
  54. extern config_t config;
  55. #endif /* CONFIG_H_ */