Fabcoin Core  0.16.2
P2P Digital Currency
Namespaces | Macros | Functions
Utils.cpp File Reference
#include "Utils.h"
#include <cstring>
#include <llvm/Support/Debug.h>
#include "BuildInfo.gen.h"
Include dependency graph for Utils.cpp:

Go to the source code of this file.

Namespaces

 dev
 Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Originally by RenĂ© Nyffenegger.
 
 dev::evmjit
 

Macros

#define rol(x, s)   (((x) << s) | ((x) >> (64 - s)))
 
#define REPEAT6(e)   e e e e e e
 
#define REPEAT24(e)   REPEAT6(e e e e)
 
#define REPEAT5(e)   e e e e e
 
#define FOR5(v, s, e)
 
#define _(S)   do { S } while (0)
 
#define FOR(i, ST, L, S)   _(for (size_t i = 0; i < L; i += ST) { S; })
 
#define mkapply_ds(NAME, S)
 
#define mkapply_sd(NAME, S)
 
#define P   keccakf
 
#define Plen   200
 
#define foldP(I, L, F)
 
#define defkeccak(bits)
 

Functions

std::ostream & dev::evmjit::getLogStream (char const *_channel)
 
void dev::evmjit::keccak (uint8_t const *_data, uint64_t _size, uint8_t *o_hash)
 

Macro Definition Documentation

#define _ (   S)    do { S } while (0)

Definition at line 109 of file Utils.cpp.

#define defkeccak (   bits)
Value:
static int keccak_##bits(uint8_t* out, size_t outlen, \
const uint8_t* in, size_t inlen) { \
if (outlen > (bits/8)) { \
return -1; \
} \
return hash(out, outlen, in, inlen, 200 - (bits / 4), 0x01); \
}
if(a.IndicesBefore(b, len, lenIndices))
Definition: equihash.cpp:243
#define foldP (   I,
  L,
  F 
)
Value:
while (L >= rate) { \
F(a, I, rate); \
P(a); \
I += rate; \
L -= rate; \
}
#define a(i)
#define F(x, y, z)
Definition: Hash.cpp:79
#define I(x, y, z)
Definition: Hash.cpp:82
#define P
#define FOR (   i,
  ST,
  L,
  S 
)    _(for (size_t i = 0; i < L; i += ST) { S; })

Definition at line 110 of file Utils.cpp.

#define FOR5 (   v,
  s,
  e 
)
Value:
v = 0; \
REPEAT5(e; v = decltype(v)(v + s);)
#define REPEAT5(e)
Definition: Utils.cpp:65
#define e(i)
Definition: sha.cpp:733

Definition at line 66 of file Utils.cpp.

#define mkapply_ds (   NAME,
  S 
)
Value:
static inline void NAME(uint8_t* dst, \
const uint8_t* src, \
size_t len) { \
FOR(i, 1, len, S); \
}
#define FOR(i, ST, L, S)
Definition: Utils.cpp:110
#define S(a)
Definition: mars.cpp:50

Definition at line 112 of file Utils.cpp.

#define mkapply_sd (   NAME,
  S 
)
Value:
static inline void NAME(const uint8_t* src, \
uint8_t* dst, \
size_t len) { \
FOR(i, 1, len, S); \
}
#define FOR(i, ST, L, S)
Definition: Utils.cpp:110
#define S(a)
Definition: mars.cpp:50

Definition at line 118 of file Utils.cpp.

#define P   keccakf
#define Plen   200
#define REPEAT24 (   e)    REPEAT6(e e e e)

Definition at line 64 of file Utils.cpp.

#define REPEAT5 (   e)    e e e e e

Definition at line 65 of file Utils.cpp.

#define REPEAT6 (   e)    e e e e e e

Definition at line 63 of file Utils.cpp.

#define rol (   x,
 
)    (((x) << s) | ((x) >> (64 - s)))

Definition at line 62 of file Utils.cpp.