summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/ppmf.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/plib/ppmf.h')
-rw-r--r--src/lib/netlist/plib/ppmf.h74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/lib/netlist/plib/ppmf.h b/src/lib/netlist/plib/ppmf.h
index 5875aeb0a13..bbbe95ded05 100644
--- a/src/lib/netlist/plib/ppmf.h
+++ b/src/lib/netlist/plib/ppmf.h
@@ -1,45 +1,44 @@
// license:GPL-2.0+
// copyright-holders:Couriersud
-/*
- * ppmf.h
- *
- */
#ifndef PPMF_H_
#define PPMF_H_
+///
+/// \file ppmf.h
+///
+///
+/// PMF_TYPE_GNUC_PMF
+/// Use standard pointer to member function syntax C++11
+///
+/// PMF_TYPE_GNUC_PMF_CONV
+/// Use gnu extension and convert the pmf to a function pointer.
+/// This is not standard compliant and needs
+/// -Wno-pmf-conversions to compile.
+///
+/// PMF_TYPE_INTERNAL
+/// Use the same approach as MAME for deriving the function pointer.
+/// This is compiler-dependent as well
+///
+/// Benchmarks for ./nltool -c run -f src/mame/machine/nl_pong.cpp -t 10 -n pong_fast
+///
+/// PMF_TYPE_INTERNAL: 215% 215%
+/// PMF_TYPE_GNUC_PMF: 163% 196%
+/// PMF_TYPE_GNUC_PMF_CONV: 215% 215%
+/// PMF_TYPE_VIRTUAL: 213% 209%
+///
+/// The whole exercise was done to avoid virtual calls. In prior versions of
+/// netlist, the INTERNAL and GNUC_PMF_CONV approach provided significant improvement.
+/// Since than, "hot" was removed from functions declared as virtual.
+/// This may explain that the recent benchmarks show no difference at all.
+///
+
#include "pconfig.h"
#include <cstdint> // uintptr_t
#include <utility>
-/*
- *
- * PMF_TYPE_GNUC_PMF
- * Use standard pointer to member function syntax C++11
- *
- * PMF_TYPE_GNUC_PMF_CONV
- * Use gnu extension and convert the pmf to a function pointer.
- * This is not standard compliant and needs
- * -Wno-pmf-conversions to compile.
- *
- * PMF_TYPE_INTERNAL
- * Use the same approach as MAME for deriving the function pointer.
- * This is compiler-dependent as well
- *
- * Benchmarks for ./nltool -c run -f src/mame/machine/nl_pong.cpp -t 10 -n pong_fast
- *
- * PMF_TYPE_INTERNAL: 215% 215%
- * PMF_TYPE_GNUC_PMF: 163% 196%
- * PMF_TYPE_GNUC_PMF_CONV: 215% 215%
- * PMF_TYPE_VIRTUAL: 213% 209%
- *
- * The whole exercise was done to avoid virtual calls. In prior versions of
- * netlist, the INTERNAL and GNUC_PMF_CONV approach provided significant improvement.
- * Since than, "hot" was removed from functions declared as virtual.
- * This may explain that the recent benchmarks show no difference at all.
- *
- */
+
//============================================================
// Macro magic
@@ -52,7 +51,7 @@
#define PPMF_TYPE_INTERNAL 2
#if defined(__GNUC__)
- /* does not work in versions over 4.7.x of 32bit MINGW */
+ // does not work in versions over 4.7.x of 32bit MINGW
#if defined(__MINGW32__) && !defined(__x86_64) && defined(__i386__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
#define PHAS_PMF_INTERNAL 0
#elif defined(__MINGW32__) && !defined(__x86_64) && defined(__i386__)
@@ -98,12 +97,13 @@
#endif
namespace plib {
-/*
- * The following class was derived from the MAME delegate.h code.
- * It derives a pointer to a member function.
- */
#if (PHAS_PMF_INTERNAL > 0)
+ ///
+ /// \brief Used to derive a pointer to a member function.
+ ///
+ /// The following class was derived from the MAME delegate.h code.
+ ///
class mfp
{
public:
@@ -325,4 +325,4 @@ namespace plib {
} // namespace plib
-#endif /* PPMF_H_ */
+#endif // PPMF_H_