Monero
Loading...
Searching...
No Matches
intrin_portable.h File Reference
#include <cstdint>
#include "blake2/endian.h"
#include <stdexcept>
#include <cstdlib>
#include <cmath>
Include dependency graph for intrin_portable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  rx_vec_i128
union  rx_vec_f128

Macros

#define rx_sqrt   sqrt
#define rx_set_double_precision(x)
#define rx_aligned_alloc(a, b)
#define rx_aligned_free(a)
#define rx_prefetch_nta(x)
#define rx_prefetch_t0(x)
#define RANDOMX_DEFAULT_FENV
#define HAVE_AES   0

Functions

constexpr int32_t unsigned32ToSigned2sCompl (uint32_t x)
constexpr int64_t unsigned64ToSigned2sCompl (uint64_t x)
constexpr uint64_t signExtend2sCompl (uint32_t x)
FORCE_INLINE rx_vec_f128 rx_load_vec_f128 (const double *pd)
FORCE_INLINE void rx_store_vec_f128 (double *mem_addr, rx_vec_f128 a)
FORCE_INLINE rx_vec_f128 rx_swap_vec_f128 (rx_vec_f128 a)
FORCE_INLINE rx_vec_f128 rx_add_vec_f128 (rx_vec_f128 a, rx_vec_f128 b)
FORCE_INLINE rx_vec_f128 rx_sub_vec_f128 (rx_vec_f128 a, rx_vec_f128 b)
FORCE_INLINE rx_vec_f128 rx_mul_vec_f128 (rx_vec_f128 a, rx_vec_f128 b)
FORCE_INLINE rx_vec_f128 rx_div_vec_f128 (rx_vec_f128 a, rx_vec_f128 b)
FORCE_INLINE rx_vec_f128 rx_sqrt_vec_f128 (rx_vec_f128 a)
FORCE_INLINE rx_vec_i128 rx_set1_long_vec_i128 (uint64_t a)
FORCE_INLINE rx_vec_f128 rx_vec_i128_vec_f128 (rx_vec_i128 a)
FORCE_INLINE rx_vec_f128 rx_set_vec_f128 (uint64_t x1, uint64_t x0)
FORCE_INLINE rx_vec_f128 rx_set1_vec_f128 (uint64_t x)
FORCE_INLINE rx_vec_f128 rx_xor_vec_f128 (rx_vec_f128 a, rx_vec_f128 b)
FORCE_INLINE rx_vec_f128 rx_and_vec_f128 (rx_vec_f128 a, rx_vec_f128 b)
FORCE_INLINE rx_vec_f128 rx_or_vec_f128 (rx_vec_f128 a, rx_vec_f128 b)
FORCE_INLINE int rx_vec_i128_x (rx_vec_i128 a)
FORCE_INLINE int rx_vec_i128_y (rx_vec_i128 a)
FORCE_INLINE int rx_vec_i128_z (rx_vec_i128 a)
FORCE_INLINE int rx_vec_i128_w (rx_vec_i128 a)
FORCE_INLINE rx_vec_i128 rx_set_int_vec_i128 (int i3, int i2, int i1, int i0)
FORCE_INLINE rx_vec_i128 rx_xor_vec_i128 (rx_vec_i128 a, rx_vec_i128 b)
FORCE_INLINE rx_vec_i128 rx_load_vec_i128 (rx_vec_i128 const *p)
FORCE_INLINE void rx_store_vec_i128 (rx_vec_i128 *p, rx_vec_i128 b)
FORCE_INLINE rx_vec_f128 rx_cvt_packed_int_vec_f128 (const void *addr)
FORCE_INLINE rx_vec_i128 rx_aesenc_vec_i128 (rx_vec_i128 v, rx_vec_i128 rkey)
FORCE_INLINE rx_vec_i128 rx_aesdec_vec_i128 (rx_vec_i128 v, rx_vec_i128 rkey)
void rx_reset_float_state ()
void rx_set_rounding_mode (uint32_t mode)
uint32_t rx_get_rounding_mode ()
double loadDoublePortable (const void *addr)
uint64_t mulh (uint64_t, uint64_t)
int64_t smulh (int64_t, int64_t)
uint64_t rotl (uint64_t, unsigned int)
uint64_t rotr (uint64_t, unsigned int)

Variables

constexpr int RoundToNearest = 0
constexpr int RoundDown = 1
constexpr int RoundUp = 2
constexpr int RoundToZero = 3
static const char * platformError = "Platform doesn't support hardware AES"

Macro Definition Documentation

◆ HAVE_AES

#define HAVE_AES   0

◆ RANDOMX_DEFAULT_FENV

#define RANDOMX_DEFAULT_FENV

◆ rx_aligned_alloc

#define rx_aligned_alloc ( a,
b )
Value:
malloc(a)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition pointer.h:1124

◆ rx_aligned_free

#define rx_aligned_free ( a)
Value:
free(a)

◆ rx_prefetch_nta

#define rx_prefetch_nta ( x)

◆ rx_prefetch_t0

#define rx_prefetch_t0 ( x)

◆ rx_set_double_precision

#define rx_set_double_precision ( x)

◆ rx_sqrt

#define rx_sqrt   sqrt

Function Documentation

◆ loadDoublePortable()

double loadDoublePortable ( const void * addr)

◆ mulh()

uint64_t mulh ( uint64_t a,
uint64_t b )

◆ rotl()

uint64_t rotl ( uint64_t a,
unsigned int b )

◆ rotr()

uint64_t rotr ( uint64_t a,
unsigned int b )

◆ rx_add_vec_f128()

FORCE_INLINE rx_vec_f128 rx_add_vec_f128 ( rx_vec_f128 a,
rx_vec_f128 b )

◆ rx_aesdec_vec_i128()

FORCE_INLINE rx_vec_i128 rx_aesdec_vec_i128 ( rx_vec_i128 v,
rx_vec_i128 rkey )

◆ rx_aesenc_vec_i128()

FORCE_INLINE rx_vec_i128 rx_aesenc_vec_i128 ( rx_vec_i128 v,
rx_vec_i128 rkey )

◆ rx_and_vec_f128()

FORCE_INLINE rx_vec_f128 rx_and_vec_f128 ( rx_vec_f128 a,
rx_vec_f128 b )

◆ rx_cvt_packed_int_vec_f128()

FORCE_INLINE rx_vec_f128 rx_cvt_packed_int_vec_f128 ( const void * addr)

◆ rx_div_vec_f128()

FORCE_INLINE rx_vec_f128 rx_div_vec_f128 ( rx_vec_f128 a,
rx_vec_f128 b )

◆ rx_get_rounding_mode()

uint32_t rx_get_rounding_mode ( )

◆ rx_load_vec_f128()

FORCE_INLINE rx_vec_f128 rx_load_vec_f128 ( const double * pd)

◆ rx_load_vec_i128()

FORCE_INLINE rx_vec_i128 rx_load_vec_i128 ( rx_vec_i128 const * p)

◆ rx_mul_vec_f128()

FORCE_INLINE rx_vec_f128 rx_mul_vec_f128 ( rx_vec_f128 a,
rx_vec_f128 b )

◆ rx_or_vec_f128()

FORCE_INLINE rx_vec_f128 rx_or_vec_f128 ( rx_vec_f128 a,
rx_vec_f128 b )

◆ rx_reset_float_state()

void rx_reset_float_state ( )

◆ rx_set1_long_vec_i128()

FORCE_INLINE rx_vec_i128 rx_set1_long_vec_i128 ( uint64_t a)

◆ rx_set1_vec_f128()

FORCE_INLINE rx_vec_f128 rx_set1_vec_f128 ( uint64_t x)

◆ rx_set_int_vec_i128()

FORCE_INLINE rx_vec_i128 rx_set_int_vec_i128 ( int i3,
int i2,
int i1,
int i0 )

◆ rx_set_rounding_mode()

void rx_set_rounding_mode ( uint32_t mode)

◆ rx_set_vec_f128()

FORCE_INLINE rx_vec_f128 rx_set_vec_f128 ( uint64_t x1,
uint64_t x0 )

◆ rx_sqrt_vec_f128()

FORCE_INLINE rx_vec_f128 rx_sqrt_vec_f128 ( rx_vec_f128 a)

◆ rx_store_vec_f128()

FORCE_INLINE void rx_store_vec_f128 ( double * mem_addr,
rx_vec_f128 a )

◆ rx_store_vec_i128()

FORCE_INLINE void rx_store_vec_i128 ( rx_vec_i128 * p,
rx_vec_i128 b )

◆ rx_sub_vec_f128()

FORCE_INLINE rx_vec_f128 rx_sub_vec_f128 ( rx_vec_f128 a,
rx_vec_f128 b )

◆ rx_swap_vec_f128()

FORCE_INLINE rx_vec_f128 rx_swap_vec_f128 ( rx_vec_f128 a)

◆ rx_vec_i128_vec_f128()

FORCE_INLINE rx_vec_f128 rx_vec_i128_vec_f128 ( rx_vec_i128 a)

◆ rx_vec_i128_w()

FORCE_INLINE int rx_vec_i128_w ( rx_vec_i128 a)

◆ rx_vec_i128_x()

FORCE_INLINE int rx_vec_i128_x ( rx_vec_i128 a)

◆ rx_vec_i128_y()

FORCE_INLINE int rx_vec_i128_y ( rx_vec_i128 a)

◆ rx_vec_i128_z()

FORCE_INLINE int rx_vec_i128_z ( rx_vec_i128 a)

◆ rx_xor_vec_f128()

FORCE_INLINE rx_vec_f128 rx_xor_vec_f128 ( rx_vec_f128 a,
rx_vec_f128 b )

◆ rx_xor_vec_i128()

FORCE_INLINE rx_vec_i128 rx_xor_vec_i128 ( rx_vec_i128 a,
rx_vec_i128 b )

◆ signExtend2sCompl()

uint64_t signExtend2sCompl ( uint32_t x)
constexpr

◆ smulh()

int64_t smulh ( int64_t a,
int64_t b )

◆ unsigned32ToSigned2sCompl()

int32_t unsigned32ToSigned2sCompl ( uint32_t x)
constexpr

◆ unsigned64ToSigned2sCompl()

int64_t unsigned64ToSigned2sCompl ( uint64_t x)
constexpr

Variable Documentation

◆ platformError

const char* platformError = "Platform doesn't support hardware AES"
static

◆ RoundDown

int RoundDown = 1
constexpr

◆ RoundToNearest

int RoundToNearest = 0
constexpr

◆ RoundToZero

int RoundToZero = 3
constexpr

◆ RoundUp

int RoundUp = 2
constexpr