Monero
Loading...
Searching...
No Matches
variant4_random_math.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  V4_Instruction

Macros

#define FORCEINLINE   inline
#define UNREACHABLE_CODE
#define V4_EXEC(i)
#define V4_EXEC_10(j)

Typedefs

typedef uint32_t v4_reg

Enumerations

enum  V4_Settings {
  TOTAL_LATENCY = 15 * 3 , NUM_INSTRUCTIONS_MIN = 60 , NUM_INSTRUCTIONS_MAX = 70 , ALU_COUNT_MUL = 1 ,
  ALU_COUNT = 3
}
enum  V4_InstructionList {
  MUL , ADD , SUB , ROR ,
  ROL , XOR , RET , V4_INSTRUCTION_COUNT = RET
}
enum  V4_InstructionDefinition { V4_OPCODE_BITS = 3 , V4_DST_INDEX_BITS = 2 , V4_SRC_INDEX_BITS = 3 }

Functions

static FORCEINLINE void v4_random_math (const struct V4_Instruction *code, v4_reg *r)
static FORCEINLINE void check_data (size_t *data_index, const size_t bytes_needed, int8_t *data, const size_t data_size)
static int v4_random_math_init (struct V4_Instruction *code, const uint64_t height)

Macro Definition Documentation

◆ FORCEINLINE

#define FORCEINLINE   inline

◆ UNREACHABLE_CODE

#define UNREACHABLE_CODE

◆ V4_EXEC

#define V4_EXEC ( i)

◆ V4_EXEC_10

#define V4_EXEC_10 ( j)
Value:
V4_EXEC(j + 0) \
V4_EXEC(j + 1) \
V4_EXEC(j + 2) \
V4_EXEC(j + 3) \
V4_EXEC(j + 4) \
V4_EXEC(j + 5) \
V4_EXEC(j + 6) \
V4_EXEC(j + 7) \
V4_EXEC(j + 8) \
V4_EXEC(j + 9)
#define V4_EXEC(i)

Typedef Documentation

◆ v4_reg

typedef uint32_t v4_reg

Enumeration Type Documentation

◆ V4_InstructionDefinition

Enumerator
V4_OPCODE_BITS 
V4_DST_INDEX_BITS 
V4_SRC_INDEX_BITS 

◆ V4_InstructionList

Enumerator
MUL 
ADD 
SUB 
ROR 
ROL 
XOR 
RET 
V4_INSTRUCTION_COUNT 

◆ V4_Settings

Enumerator
TOTAL_LATENCY 
NUM_INSTRUCTIONS_MIN 
NUM_INSTRUCTIONS_MAX 
ALU_COUNT_MUL 
ALU_COUNT 

Function Documentation

◆ check_data()

FORCEINLINE void check_data ( size_t * data_index,
const size_t bytes_needed,
int8_t * data,
const size_t data_size )
static

◆ v4_random_math()

FORCEINLINE void v4_random_math ( const struct V4_Instruction * code,
v4_reg * r )
static

◆ v4_random_math_init()

int v4_random_math_init ( struct V4_Instruction * code,
const uint64_t height )
inlinestatic