Fabcoin Core  0.16.2
P2P Digital Currency
Macros
vmac.cpp File Reference
#include "pch.h"
#include "config.h"
#include "vmac.h"
#include "cpu.h"
#include "argnames.h"
#include "secblock.h"
Include dependency graph for vmac.cpp:

Go to the source code of this file.

Macros

#define VMAC_BOOL_WORD128   0
 
#define MUL32(a, b)   ((word64)((word32)(a)) * (word32)(b))
 
#define VMAC_BOOL_32BIT   1
 
#define DeclareNH(a)   word64 a##0=0, a##1=0, a##2=0
 
#define MUL64(rh, rl, i1, i2)
 
#define AccumulateNH(a, b, c)
 
#define ADD128(rh, rl, ih, il)
 
#define INNER_LOOP_ITERATION(j)
 
#define a0   (((word32 *)(polyS+i*4))[2+NativeByteOrder::ToEnum()])
 
#define a1   (*(((word32 *)(polyS+i*4))+3-NativeByteOrder::ToEnum()))
 
#define a2   (((word32 *)(polyS+i*4))[0+NativeByteOrder::ToEnum()])
 
#define a3   (*(((word32 *)(polyS+i*4))+1-NativeByteOrder::ToEnum()))
 
#define aHi   ((polyS+i*4)[0])
 
#define k0   (((word32 *)(polyS+i*4+2))[2+NativeByteOrder::ToEnum()])
 
#define k1   (*(((word32 *)(polyS+i*4+2))+3-NativeByteOrder::ToEnum()))
 
#define k2   (((word32 *)(polyS+i*4+2))[0+NativeByteOrder::ToEnum()])
 
#define k3   (*(((word32 *)(polyS+i*4+2))+1-NativeByteOrder::ToEnum()))
 
#define kHi   ((polyS+i*4+2)[0])
 

Macro Definition Documentation

#define a0   (((word32 *)(polyS+i*4))[2+NativeByteOrder::ToEnum()])
#define a1   (*(((word32 *)(polyS+i*4))+3-NativeByteOrder::ToEnum()))
#define a2   (((word32 *)(polyS+i*4))[0+NativeByteOrder::ToEnum()])
#define a3   (*(((word32 *)(polyS+i*4))+1-NativeByteOrder::ToEnum()))
#define AccumulateNH (   a,
  b,
  c 
)
Value:
{\
word64 p = MUL32(b, c);\
a##1 += word32((p)>>32);\
a##0 += word32(p);\
p = MUL32((b)>>32, c);\
a##2 += word32((p)>>32);\
a##1 += word32(p);\
p = MUL32((b)>>32, (c)>>32);\
a##2 += p;\
p = MUL32(b, (c)>>32);\
a##1 += word32(p);\
a##2 += word32(p>>32);}
#define c(i)
#define MUL32(a, b)
Definition: vmac.cpp:491
#define a(i)
unsigned long long word64
Definition: config.h:240
#define b(i, j)
unsigned int word32
Definition: config.h:231

Definition at line 518 of file vmac.cpp.

#define ADD128 (   rh,
  rl,
  ih,
  il 
)
Value:
{ word64 _il = (il); \
(rl) += (_il); \
(rh) += (ih) + ((rl) < (_il)); \
}
unsigned long long word64
Definition: config.h:240

Definition at line 536 of file vmac.cpp.

#define aHi   ((polyS+i*4)[0])
#define DeclareNH (   a)    word64 a##0=0, a##1=0, a##2=0

Definition at line 508 of file vmac.cpp.

#define INNER_LOOP_ITERATION (   j)
Value:
{\
AccumulateNH(nhA, d0+nhK[i+2*j+0], d1+nhK[i+2*j+1]);\
if (T_128BitTag)\
AccumulateNH(nhB, d0+nhK[i+2*j+2], d1+nhK[i+2*j+3]);\
}
if(a.IndicesBefore(b, len, lenIndices))
Definition: equihash.cpp:243
byte order is little-endian
Definition: cryptlib.h:126
T ConditionalByteReverse(ByteOrder order, T value)
Reverses bytes in a value depending upon endianness.
Definition: misc.h:1807
unsigned long long word64
Definition: config.h:240
#define AccumulateNH(a, b, c)
Definition: vmac.cpp:518
uint8_t const * data
Definition: sha3.h:19
#define k0   (((word32 *)(polyS+i*4+2))[2+NativeByteOrder::ToEnum()])
#define k1   (*(((word32 *)(polyS+i*4+2))+3-NativeByteOrder::ToEnum()))
#define k2   (((word32 *)(polyS+i*4+2))[0+NativeByteOrder::ToEnum()])
#define k3   (*(((word32 *)(polyS+i*4+2))+1-NativeByteOrder::ToEnum()))
#define kHi   ((polyS+i*4+2)[0])
#define MUL32 (   a,
  b 
)    ((word64)((word32)(a)) * (word32)(b))

Definition at line 491 of file vmac.cpp.

#define MUL64 (   rh,
  rl,
  i1,
  i2 
)
Value:
{ word64 _i1 = (i1), _i2 = (i2); \
word64 m1= MUL32(_i1,_i2>>32); \
word64 m2= MUL32(_i1>>32,_i2); \
rh = MUL32(_i1>>32,_i2>>32); \
rl = MUL32(_i1,_i2); \
ADD128(rh,rl,(m1 >> 32),(m1 << 32)); \
ADD128(rh,rl,(m2 >> 32),(m2 << 32)); \
}
#define MUL32(a, b)
Definition: vmac.cpp:491
unsigned long long word64
Definition: config.h:240
#define ADD128(rh, rl, ih, il)
Definition: vmac.cpp:536

Definition at line 509 of file vmac.cpp.

#define VMAC_BOOL_32BIT   1

Definition at line 507 of file vmac.cpp.

#define VMAC_BOOL_WORD128   0

Definition at line 32 of file vmac.cpp.