diff options
Diffstat (limited to 'src/emu/netlist/nl_config.h')
-rw-r--r-- | src/emu/netlist/nl_config.h | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/src/emu/netlist/nl_config.h b/src/emu/netlist/nl_config.h index f0c9d3e82dc..4d93e669f5f 100644 --- a/src/emu/netlist/nl_config.h +++ b/src/emu/netlist/nl_config.h @@ -28,6 +28,8 @@ #define USE_DEACTIVE_DEVICE (0) +#define USE_OPENMP (0) + // Use nano-second resolution - Sufficient for now #define NETLIST_INTERNAL_RES (U64(1000000000)) //#define NETLIST_INTERNAL_RES (U64(1000000000000)) @@ -55,14 +57,31 @@ typedef UINT8 netlist_sig_t; #endif //============================================================ -// MACROS +// General Macros //============================================================ +#define HAS_OPENMP ( _OPENMP >= 200805 ) + // prevent implicit copying #define NETLIST_PREVENT_COPYING(_name) \ private: \ _name(const _name &); \ _name &operator=(const _name &); + +#if defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) +#if !defined(__ppc__) && !defined (__PPC__) && !defined(__ppc64__) && !defined(__PPC64__) +#define ATTR_ALIGN __attribute__ ((aligned(128))) +#else +#define ATTR_ALIGN +#endif +#else +#define ATTR_ALIGN +#endif + +//============================================================ +// Performance tracking +//============================================================ + #if NL_KEEP_STATISTICS #define add_to_stat(v,x) do { v += (x); } while (0) #define inc_stat(v) add_to_stat(v, 1) @@ -75,6 +94,11 @@ typedef UINT8 netlist_sig_t; #define end_timing(v) do { } while (0) #endif + +//============================================================ +// Performance tracking +//============================================================ + // Compiling without mame ? #ifndef ATTR_HOT @@ -86,15 +110,14 @@ typedef UINT8 netlist_sig_t; #define ATTR_COLD #endif -#if defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) -#if !defined(__ppc__) && !defined (__PPC__) && !defined(__ppc64__) && !defined(__PPC64__) -#define ATTR_ALIGN __attribute__ ((aligned(128))) -#else -#define ATTR_ALIGN +//============================================================ +// WARNINGS +//============================================================ + +#if (USE_OPENMP) +#if (!HAS_OPEN_MP) +#warning To use openmp compile and link with "-fopenmp" #endif -#else -#define ATTR_ALIGN #endif - #endif /* NLCONFIG_H_ */ |