Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <stdio.h>
#include "include/secp256k1.h"
#include "util.h"
#include "hash_impl.h"
#include "num_impl.h"
#include "field_impl.h"
#include "group_impl.h"
#include "scalar_impl.h"
#include "ecmult_impl.h"
#include "bench.h"
#include "secp256k1.c"
Go to the source code of this file.
Classes | |
struct | bench_data |
Macros | |
#define | POINTS 32768 |
#define | ITERS 10000 |
Functions | |
static int | bench_callback (secp256k1_scalar *sc, secp256k1_ge *ge, size_t idx, void *arg) |
static void | bench_ecmult (void *arg) |
static void | bench_ecmult_setup (void *arg) |
static void | bench_ecmult_teardown (void *arg) |
static void | generate_scalar (uint32_t num, secp256k1_scalar *scalar) |
static void | run_test (bench_data *data, size_t count, int includes_g) |
int | main (int argc, char **argv) |
Macro Definition Documentation
◆ ITERS
#define ITERS 10000 |
Definition at line 21 of file bench_ecmult.c.
Referenced by bench_ecmult(), bench_ecmult_teardown(), main(), and run_test().
◆ POINTS
#define POINTS 32768 |
Definition at line 20 of file bench_ecmult.c.
Referenced by bench_callback(), bench_ecmult(), bench_ecmult_setup(), main(), and run_test().
Function Documentation
◆ bench_callback()
|
static |
Definition at line 45 of file bench_ecmult.c.
References bench_data::includes_g, bench_data::offset1, bench_data::offset2, POINTS, bench_data::pubkeys, bench_data::scalars, and secp256k1_ge_const_g.
Referenced by bench_ecmult().
◆ bench_ecmult()
|
static |
Definition at line 58 of file bench_ecmult.c.
References bench_callback(), bench_data::count, count, bench_data::ctx, secp256k1_context_struct::ecmult_ctx, bench_data::ecmult_multi, bench_data::includes_g, ITERS, bench_data::offset1, bench_data::offset2, bench_data::output, POINTS, bench_data::scalars, and bench_data::scratch.
Referenced by run_test().
◆ bench_ecmult_setup()
|
static |
Definition at line 73 of file bench_ecmult.c.
References bench_data::count, bench_data::offset1, bench_data::offset2, and POINTS.
Referenced by run_test().
◆ bench_ecmult_teardown()
|
static |
Definition at line 79 of file bench_ecmult.c.
References CHECK, bench_data::count, bench_data::expected_output, ITERS, bench_data::output, secp256k1_gej_add_var(), and secp256k1_gej_is_infinity().
Referenced by run_test().
◆ generate_scalar()
|
static |
Definition at line 91 of file bench_ecmult.c.
References CHECK, secp256k1_scalar_set_b32(), secp256k1_sha256_finalize(), secp256k1_sha256_initialize(), and secp256k1_sha256_write().
Referenced by main().
◆ main()
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 136 of file bench_ecmult.c.
References bench_data::ctx, bench_data::ecmult_multi, bench_data::expected_output, generate_scalar(), have_flag(), ITERS, bench_data::output, POINTS, tinyformat::printf(), bench_data::pubkeys, run_test(), bench_data::scalars, bench_data::scratch, bench_data::seckeys, secp256k1_context_create(), secp256k1_context_destroy(), SECP256K1_CONTEXT_SIGN, SECP256K1_CONTEXT_VERIFY, secp256k1_ecmult_multi_var(), secp256k1_ecmult_pippenger_batch_single(), secp256k1_ecmult_strauss_batch_single(), secp256k1_ge_const_g, secp256k1_ge_set_all_gej_var(), secp256k1_gej_double_var(), secp256k1_gej_set_ge(), secp256k1_scalar_add(), secp256k1_scalar_set_int(), secp256k1_scratch_space_create(), secp256k1_scratch_space_destroy(), secp256k1_strauss_scratch_size(), and STRAUSS_SCRATCH_OBJECTS.
◆ run_test()
|
static |
Definition at line 107 of file bench_ecmult.c.
References bench_ecmult(), bench_ecmult_setup(), bench_ecmult_teardown(), bench_data::count, count, bench_data::ctx, secp256k1_context_struct::ecmult_ctx, bench_data::expected_output, bench_data::includes_g, ITERS, bench_data::offset1, bench_data::offset2, POINTS, run_benchmark(), bench_data::scalars, bench_data::seckeys, secp256k1_ecmult(), secp256k1_scalar_add(), SECP256K1_SCALAR_CONST, secp256k1_scalar_mul(), and secp256k1_scalar_negate().
Referenced by main().