Monero
Loading...
Searching...
No Matches
instruction_weights.hpp
Go to the documentation of this file.
1/*
2Copyright (c) 2018-2019, tevador <tevador@gmail.com>
3
4All rights reserved.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8 * Redistributions of source code must retain the above copyright
9 notice, this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright
11 notice, this list of conditions and the following disclaimer in the
12 documentation and/or other materials provided with the distribution.
13 * Neither the name of the copyright holder nor the
14 names of its contributors may be used to endorse or promote products
15 derived from this software without specific prior written permission.
16
17THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27*/
28
29#pragma once
30
31#define REP0(x)
32#define REP1(x) x,
33#define REP2(x) REP1(x) x,
34#define REP3(x) REP2(x) x,
35#define REP4(x) REP3(x) x,
36#define REP5(x) REP4(x) x,
37#define REP6(x) REP5(x) x,
38#define REP7(x) REP6(x) x,
39#define REP8(x) REP7(x) x,
40#define REP9(x) REP8(x) x,
41#define REP10(x) REP9(x) x,
42#define REP11(x) REP10(x) x,
43#define REP12(x) REP11(x) x,
44#define REP13(x) REP12(x) x,
45#define REP14(x) REP13(x) x,
46#define REP15(x) REP14(x) x,
47#define REP16(x) REP15(x) x,
48#define REP17(x) REP16(x) x,
49#define REP18(x) REP17(x) x,
50#define REP19(x) REP18(x) x,
51#define REP20(x) REP19(x) x,
52#define REP21(x) REP20(x) x,
53#define REP22(x) REP21(x) x,
54#define REP23(x) REP22(x) x,
55#define REP24(x) REP23(x) x,
56#define REP25(x) REP24(x) x,
57#define REP26(x) REP25(x) x,
58#define REP27(x) REP26(x) x,
59#define REP28(x) REP27(x) x,
60#define REP29(x) REP28(x) x,
61#define REP30(x) REP29(x) x,
62#define REP31(x) REP30(x) x,
63#define REP32(x) REP31(x) x,
64#define REP33(x) REP32(x) x,
65#define REP40(x) REP32(x) REP8(x)
66#define REP64(x) REP32(x) REP32(x)
67#define REP128(x) REP32(x) REP32(x) REP32(x) REP32(x)
68#define REP232(x) REP128(x) REP40(x) REP40(x) REP24(x)
69#define REP256(x) REP128(x) REP128(x)
70#define REPNX(x,N) REP##N(x)
71#define REPN(x,N) REPNX(x,N)
72#define NUM(x) x
73#define WT(x) NUM(RANDOMX_FREQ_##x)