Monero
Macros | Functions
benchmark.cpp File Reference
#include "tests/benchmark.h"
#include <boost/fusion/adapted/std_tuple.hpp>
#include <boost/fusion/algorithm/iteration/fold.hpp>
#include <boost/preprocessor/seq/enum.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/seq/seq.hpp>
#include <boost/preprocessor/seq.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <boost/spirit/include/karma_char.hpp>
#include <boost/spirit/include/karma_format.hpp>
#include <boost/spirit/include/karma_repeat.hpp>
#include <boost/spirit/include/karma_right_alignment.hpp>
#include <boost/spirit/include/karma_sequence.hpp>
#include <boost/spirit/include/karma_string.hpp>
#include <boost/spirit/include/karma_uint.hpp>
#include <boost/spirit/include/qi_char.hpp>
#include <boost/spirit/include/qi_list.hpp>
#include <boost/spirit/include/qi_parse.hpp>
#include <boost/spirit/include/qi_uint.hpp>
#include <chrono>
#include <cstring>
#include <functional>
#include <iostream>
#include <stdexcept>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
#include "crypto/crypto.h"
#include "cryptonote_basic/cryptonote_basic.h"
#include "monero/crypto/amd64-64-24k.h"
#include "monero/crypto/amd64-51-30k.h"
Include dependency graph for benchmark.cpp:

Macros

#define CHECK(...)
 
#define FORWARD_FUNCTION(func)
 Define function that forwards arguments to crypto::func. More...
 
#define CRYPTO_FUNCTION(library, func)   BOOST_PP_CAT(BOOST_PP_CAT(monero_crypto_, library), func)
 
#define CRYPTO_BENCHMARK(r, _, library)
 

Functions

int main (int argc, char **argv)
 

Macro Definition Documentation

◆ CHECK

#define CHECK (   ...)
Value:
if(!( __VA_ARGS__ )) \
throw std::runtime_error{ \
"TEST FAILED (line " \
BOOST_PP_STRINGIZE( __LINE__ ) \
"): " \
BOOST_PP_STRINGIZE( __VA_ARGS__ ) \
}

◆ CRYPTO_BENCHMARK

#define CRYPTO_BENCHMARK (   r,
  _,
  library 
)
Value:
struct library \
{ \
static constexpr const char* name() noexcept { return BOOST_PP_STRINGIZE(library); } \
{ \
return CRYPTO_FUNCTION(library, _generate_key_derivation) (out.data, tx_pub.data, view_sec.data) == 0; \
} \
{ \
return CRYPTO_FUNCTION(library, _generate_subaddress_public_key) (out.data, spend_pub.data, scalar.data) == 0; \
} \
};
void derivation_to_scalar(const key_derivation &derivation, size_t output_index, ec_scalar &res)
Definition: crypto.h:239
POD_CLASS key_derivation
Definition: crypto.h:88
#define CRYPTO_FUNCTION(library, func)
Definition: benchmark.cpp:83
epee::mlocked< tools::scrubbed< ec_scalar > > secret_key
Definition: crypto.h:72
Definition: d.py:1
bool generate_key_derivation(const public_key &key1, const secret_key &key2, key_derivation &derivation)
Definition: crypto.h:232
POD_CLASS ec_scalar
Definition: crypto.h:59
bool derive_subaddress_public_key(const public_key &out_key, const key_derivation &derivation, std::size_t output_index, public_key &result)
Definition: crypto.h:246
POD_CLASS public_key
Definition: crypto.h:61
const char * name
Definition: options.c:30

◆ CRYPTO_FUNCTION

#define CRYPTO_FUNCTION (   library,
  func 
)    BOOST_PP_CAT(BOOST_PP_CAT(monero_crypto_, library), func)

◆ FORWARD_FUNCTION

#define FORWARD_FUNCTION (   func)
Value:
template<typename... T> \
static bool func (T&&... args) \
{ \
return ::crypto:: func (std::forward<T>(args)...); \
}
const uint32_t T[512]
Definition: groestl_tables.h:36
args
Definition: build_protob.py:10

Define function that forwards arguments to crypto::func.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)