|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- /*!
- * \file
- * \brief Build configuration file.
- *
- * \author
- * Christos Choutouridis AEM:8997
- * <cchoutou@ece.auth.gr>
- */
-
- #ifndef CONFIG_H_
- #define CONFIG_H_
-
- #include <cstdint>
-
- /*
- * Versioning:
- * - RC1: Model version
- * - RC2: Parallel full sort
- * - RC3: Vanila
- * - RC3a: Exchange optimization
- * - RC3b: MPI Pipeline
- * - RC4: Include all version
- */
- static constexpr char version[] = "0.4";
-
- /*
- * Defines for different version of the exercise
- */
- #define BITONIC (1)
- #define BUBBLETONIC (2)
-
-
- // Fail-safe version selection
- #if !defined CODE_VERSION
- #define CODE_VERSION BITONIC
- #endif
-
- // Default Data size (in case -q <N> is not present)
- static constexpr size_t DEFAULT_DATA_SIZE = 1 << 16;
-
- // The maximum MPI size we support (in Nodes x Processes)
- static constexpr size_t MAX_MPI_SIZE = 1024UL;
-
- // The maximum pipeline size we support
- static constexpr size_t MAX_PIPELINE_SIZE = 64UL;
-
-
- /*!
- * Value type selection
- *
- * We support the following compiler types or the <cstdint> that translate to them:
- * char - unsigned char
- * short - unsigned short
- * int - unsigned int
- * long - unsigned long
- * long long - unsigned long long
- * float
- * double
- */
- using distValue_t = uint32_t;
-
- /*!
- * Session option for each invocation of the executable.
- *
- * @note
- * The values of the members are set from the command line.
- */
- struct config_t {
- size_t arraySize{DEFAULT_DATA_SIZE}; //!< The array size of the local data to sort.
- bool exchangeOpt{false}; //!< Flag to request the exchange optimization
- size_t pipeline{1UL}; //!< Pipeline stages (1 to disable)
- bool validation{false}; //!< Request a full validation at the end, performed by process rank 0.
- bool ndebug{false}; //!< Skips debug trap on DEBUG builds.
- size_t perf{1}; //!< Enable performance timing measurements and prints and repeat
- //!< the sorting <perf> times.
- bool verbose{false}; //!< Flag to enable verbose output to stdout.
- };
-
- /*
- * Exported data types
- */
- extern config_t config;
-
-
- #endif /* CONFIG_H_ */
|