diff options
author | 2019-11-08 23:52:14 +0100 | |
---|---|---|
committer | 2019-11-08 23:52:14 +0100 | |
commit | 88f702b416ba9eb930e6c1e932124d5f24b1a24c (patch) | |
tree | 955f3047b79156d7b2bbab55fcbd4fbc94661f1d /src/lib/netlist/plib/pconfig.h | |
parent | 731c4fe52073a7a7561bf04559e9f0b3b791388d (diff) |
netlist: code maintenance and bug fixes. (nw)
- comment style migration continues.
- Fixed a two bugs in the truthtable ignore inputs code
- refactored the truthtable code a bit for better readability.
- updated netlist specific gitignore.
Diffstat (limited to 'src/lib/netlist/plib/pconfig.h')
-rw-r--r-- | src/lib/netlist/plib/pconfig.h | 117 |
1 files changed, 66 insertions, 51 deletions
diff --git a/src/lib/netlist/plib/pconfig.h b/src/lib/netlist/plib/pconfig.h index 58a9387c51c..bb954eefa48 100644 --- a/src/lib/netlist/plib/pconfig.h +++ b/src/lib/netlist/plib/pconfig.h @@ -1,102 +1,117 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * pconfig.h - * - */ #ifndef PCONFIG_H_ #define PCONFIG_H_ -/* - * Define this for more accurate measurements if you processor supports - * RDTSCP. - */ +/// +/// \file pconfig.h +/// + +/// \brief More accurate measurements if you processor supports RDTSCP. +/// #ifndef PHAS_RDTSCP #define PHAS_RDTSCP (0) #endif -/* - * Define this to use accurate timing measurements. Only works - * if PHAS_RDTSCP == 1 - */ +/// \brief Use accurate timing measurements. +/// +/// Only works if \ref PHAS_RDTSCP == 1 +/// #ifndef PUSE_ACCURATE_STATS #define PUSE_ACCURATE_STATS (0) #endif -/* - * Set this to one if you want to use 128 bit int for ptime. - * This is about 5% slower on a kaby lake processor. - */ - +/// \brief System supports INT128 +/// +/// Set this to one if you want to use 128 bit int for ptime. +/// This is about 5% slower on a kaby lake processor. +/// #ifndef PHAS_INT128 #define PHAS_INT128 (0) #endif -/*! Add support for the __float128 floating point type. - * - * - */ - +/// \brief Add support for the __float128 floating point type. +/// #ifndef PUSE_FLOAT128 #define PUSE_FLOAT128 (0) #endif -/* - * OpenMP adds about 10% to 20% performance for analog - * netlists like kidniki. - */ - +/// \brief Compile with support for OPENMP +/// +/// OpenMP adds about 10% to 20% performance for analog netlists. +/// #ifndef PUSE_OPENMP #define PUSE_OPENMP (0) #endif -/* - * Set this to one if you want to use aligned storage optimizations. - */ - +/// \brief Use aligned optimizations. +/// +/// Set this to one if you want to use aligned storage optimizations. +/// #ifndef PUSE_ALIGNED_OPTIMIZATIONS #define PUSE_ALIGNED_OPTIMIZATIONS (0) #endif +/// \brief Use aligned allocations. +/// +/// Set this to one if you want to use aligned storage optimizations. +/// +/// Defaults to \ref PUSE_ALIGNED_OPTIMIZATIONS. +/// #define PUSE_ALIGNED_ALLOCATION (PUSE_ALIGNED_OPTIMIZATIONS) + +/// \brief Use aligned hints. +/// +/// Some compilers support special functions to mark a pointer as being +/// aligned. Set this to one if you want to use these functions. +/// +/// Defaults to \ref PUSE_ALIGNED_OPTIMIZATIONS. +/// #define PUSE_ALIGNED_HINTS (PUSE_ALIGNED_OPTIMIZATIONS) -/* - * Standard alignment macros - */ +/// \brief Number of bytes for cache line alignment +/// #define PALIGN_CACHELINE (64) + +/// \brief Number of bytes for vector alignment +/// #define PALIGN_VECTOROPT (64) #define PALIGNAS_CACHELINE() PALIGNAS(PALIGN_CACHELINE) #define PALIGNAS_VECTOROPT() PALIGNAS(PALIGN_VECTOROPT) -/* Breaks mame build on windows due to -Wattribute - * FIXME: no error on cross-compile - need further checks */ +// Breaks mame build on windows due to -Wattribute +// FIXME: no error on cross-compile - need further checks #if defined(_WIN32) && defined(__GNUC__) #define PALIGNAS(x) #else #define PALIGNAS(x) alignas(x) #endif -/*============================================================ - * Check for CPP Version - * - * C++11: __cplusplus is 201103L. - * C++14: __cplusplus is 201402L. - * c++17/c++1z__cplusplus is 201703L. - * - * VS2015 returns 199711L here. This is the bug filed in - * 2012 which obviously never was picked up by MS: - * https://connect.microsoft.com/VisualStudio/feedback/details/763051/a-value-of-predefined-macro-cplusplus-is-still-199711l - * - * - *============================================================*/ - +/// \brief nvcc build flag. +/// +/// Set this to 1 if you are building with NVIDIA nvcc +/// #ifndef NVCCBUILD #define NVCCBUILD (0) #endif +// ============================================================ +// Check for CPP Version +// +// C++11: __cplusplus is 201103L. +// C++14: __cplusplus is 201402L. +// c++17/c++1z__cplusplus is 201703L. +// +// VS2015 returns 199711L here. This is the bug filed in +// 2012 which obviously never was picked up by MS: +// https://connect.microsoft.com/VisualStudio/feedback/details/763051/a-value-of-predefined-macro-cplusplus-is-still-199711l +// +// +//============================================================ + + #if NVCCBUILD #define C14CONSTEXPR #else @@ -150,4 +165,4 @@ typedef __int128_t INT128; #endif -#endif /* PCONFIG_H_ */ +#endif // PCONFIG_H_ |