diff options
author | 2019-03-26 11:13:37 +1100 | |
---|---|---|
committer | 2019-03-26 11:13:37 +1100 | |
commit | 97b67170277437131adf6ed4d60139c172529e4f (patch) | |
tree | 7a5cbf608f191075f1612b1af15832c206a3fe2d /src/emu/video | |
parent | b380514764cf857469bae61c11143a19f79a74c5 (diff) |
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and
c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at
598cd5227223c3b04ca31f0dbc1981256d9ea3ff.
Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline. When things like this happen, it wastes
everyone's time. I really don't need this in a week when real work⢠is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
Diffstat (limited to 'src/emu/video')
-rw-r--r-- | src/emu/video/resnet.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/emu/video/resnet.h b/src/emu/video/resnet.h index e3f8ad78a68..acc62bece79 100644 --- a/src/emu/video/resnet.h +++ b/src/emu/video/resnet.h @@ -177,21 +177,12 @@ double compute_resistor_weights( int count_2, const int * resistances_2, double * weights_2, int pulldown_2, int pullup_2, int count_3, const int * resistances_3, double * weights_3, int pulldown_3, int pullup_3); -template <typename T, std::size_t N, typename... U> -constexpr int combine_weights(T const (&tab)[N], U... w) +template <typename T = int, typename U, std::size_t N, typename... V> +constexpr T combine_weights(U const (&tab)[N], V... w) { - return int(emu::detail::combine_weights<0U>(tab, w...) + 0.5); + return T(emu::detail::combine_weights<0U>(tab, w...) + 0.5); } -#define combine_8_weights(tab,w0,w1,w2,w3,w4,w5,w6,w7) (int(((tab)[0]*(w0) + (tab)[1]*(w1) + (tab)[2]*(w2) + (tab)[3]*(w3) + (tab)[4]*(w4) + (tab)[5]*(w5) + (tab)[6]*(w6) + (tab)[7]*(w7)) + 0.5)) -#define combine_7_weights(tab,w0,w1,w2,w3,w4,w5,w6) (int(((tab)[0]*(w0) + (tab)[1]*(w1) + (tab)[2]*(w2) + (tab)[3]*(w3) + (tab)[4]*(w4) + (tab)[5]*(w5) + (tab)[6]*(w6)) + 0.5)) -#define combine_6_weights(tab,w0,w1,w2,w3,w4,w5) (int(((tab)[0]*(w0) + (tab)[1]*(w1) + (tab)[2]*(w2) + (tab)[3]*(w3) + (tab)[4]*(w4) + (tab)[5]*(w5)) + 0.5)) -#define combine_5_weights(tab,w0,w1,w2,w3,w4) (int(((tab)[0]*(w0) + (tab)[1]*(w1) + (tab)[2]*(w2) + (tab)[3]*(w3) + (tab)[4]*(w4)) + 0.5)) -#define combine_4_weights(tab,w0,w1,w2,w3) (int(((tab)[0]*(w0) + (tab)[1]*(w1) + (tab)[2]*(w2) + (tab)[3]*(w3)) + 0.5)) -#define combine_3_weights(tab,w0,w1,w2) (int(((tab)[0]*(w0) + (tab)[1]*(w1) + (tab)[2]*(w2)) + 0.5)) -#define combine_2_weights(tab,w0,w1) (int(((tab)[0]*(w0) + (tab)[1]*(w1)) + 0.5)) -#define combine_1_weights(tab,w0) (int(((tab)[0]*(w0) + 0.5))) - /* this should be moved to one of the core files */ @@ -205,10 +196,10 @@ constexpr int combine_weights(T const (&tab)[N], U... w) /* for the open collector outputs PROMs */ double compute_resistor_net_outputs( - int minval, int maxval, double scaler, - int count_1, const int * resistances_1, double * outputs_1, int pulldown_1, int pullup_1, - int count_2, const int * resistances_2, double * outputs_2, int pulldown_2, int pullup_2, - int count_3, const int * resistances_3, double * outputs_3, int pulldown_3, int pullup_3 ); + int minval, int maxval, double scaler, + int count_1, const int * resistances_1, double * outputs_1, int pulldown_1, int pullup_1, + int count_2, const int * resistances_2, double * outputs_2, int pulldown_2, int pullup_2, + int count_3, const int * resistances_3, double * outputs_3, int pulldown_3, int pullup_3 ); |