Bitcoin Core  22.99.0
P2P Digital Currency
Classes | Macros | Functions
bench_ecmult.c File Reference
#include <stdio.h>
#include "secp256k1.c"
#include "../include/secp256k1.h"
#include "util.h"
#include "hash_impl.h"
#include "field_impl.h"
#include "group_impl.h"
#include "scalar_impl.h"
#include "ecmult_impl.h"
#include "bench.h"
Include dependency graph for bench_ecmult.c:

Go to the source code of this file.

Classes

struct  bench_data
 

Macros

#define POINTS   32768
 

Functions

void help (char **argv)
 
static void hash_into_offset (bench_data *data, size_t x)
 
static void bench_ecmult_teardown_helper (bench_data *data, size_t *seckey_offset, size_t *scalar_offset, size_t *scalar_gen_offset, int iters)
 
static void bench_ecmult_setup (void *arg)
 
static void bench_ecmult_gen (void *arg, int iters)
 
static void bench_ecmult_gen_teardown (void *arg, int iters)
 
static void bench_ecmult_const (void *arg, int iters)
 
static void bench_ecmult_const_teardown (void *arg, int iters)
 
static void bench_ecmult_1 (void *arg, int iters)
 
static void bench_ecmult_1_teardown (void *arg, int iters)
 
static void bench_ecmult_1g (void *arg, int iters)
 
static void bench_ecmult_1g_teardown (void *arg, int iters)
 
static void bench_ecmult_2g (void *arg, int iters)
 
static void bench_ecmult_2g_teardown (void *arg, int iters)
 
static void run_ecmult_bench (bench_data *data, int iters)
 
static int bench_ecmult_multi_callback (secp256k1_scalar *sc, secp256k1_ge *ge, size_t idx, void *arg)
 
static void bench_ecmult_multi (void *arg, int iters)
 
static void bench_ecmult_multi_setup (void *arg)
 
static void bench_ecmult_multi_teardown (void *arg, int iters)
 
static void generate_scalar (uint32_t num, secp256k1_scalar *scalar)
 
static void run_ecmult_multi_bench (bench_data *data, size_t count, int includes_g, int num_iters)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ POINTS

#define POINTS   32768

Definition at line 19 of file bench_ecmult.c.

Function Documentation

◆ bench_ecmult_1()

static void bench_ecmult_1 ( void *  arg,
int  iters 
)
static

Definition at line 127 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_1_teardown()

static void bench_ecmult_1_teardown ( void *  arg,
int  iters 
)
static

Definition at line 136 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_1g()

static void bench_ecmult_1g ( void *  arg,
int  iters 
)
static

Definition at line 141 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_1g_teardown()

static void bench_ecmult_1g_teardown ( void *  arg,
int  iters 
)
static

Definition at line 152 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_2g()

static void bench_ecmult_2g ( void *  arg,
int  iters 
)
static

Definition at line 157 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_2g_teardown()

static void bench_ecmult_2g_teardown ( void *  arg,
int  iters 
)
static

Definition at line 166 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_const()

static void bench_ecmult_const ( void *  arg,
int  iters 
)
static

Definition at line 113 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_const_teardown()

static void bench_ecmult_const_teardown ( void *  arg,
int  iters 
)
static

Definition at line 122 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_gen()

static void bench_ecmult_gen ( void *  arg,
int  iters 
)
static

Definition at line 99 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_gen_teardown()

static void bench_ecmult_gen_teardown ( void *  arg,
int  iters 
)
static

Definition at line 108 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_multi()

static void bench_ecmult_multi ( void *  arg,
int  iters 
)
static

Definition at line 201 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_multi_callback()

static int bench_ecmult_multi_callback ( secp256k1_scalar sc,
secp256k1_ge ge,
size_t  idx,
void *  arg 
)
static

Definition at line 188 of file bench_ecmult.c.

Here is the caller graph for this function:

◆ bench_ecmult_multi_setup()

static void bench_ecmult_multi_setup ( void *  arg)
static

Definition at line 216 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_multi_teardown()

static void bench_ecmult_multi_teardown ( void *  arg,
int  iters 
)
static

Definition at line 221 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_setup()

static void bench_ecmult_setup ( void *  arg)
static

Definition at line 92 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bench_ecmult_teardown_helper()

static void bench_ecmult_teardown_helper ( bench_data data,
size_t *  seckey_offset,
size_t *  scalar_offset,
size_t *  scalar_gen_offset,
int  iters 
)
static

Definition at line 68 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generate_scalar()

static void generate_scalar ( uint32_t  num,
secp256k1_scalar scalar 
)
static

Definition at line 233 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hash_into_offset()

static void hash_into_offset ( bench_data data,
size_t  x 
)
static

Definition at line 61 of file bench_ecmult.c.

Here is the caller graph for this function:

◆ help()

void help ( char **  argv)

Definition at line 21 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 277 of file bench_ecmult.c.

Here is the call graph for this function:

◆ run_ecmult_bench()

static void run_ecmult_bench ( bench_data data,
int  iters 
)
static

Definition at line 171 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run_ecmult_multi_bench()

static void run_ecmult_multi_bench ( bench_data data,
size_t  count,
int  includes_g,
int  num_iters 
)
static

Definition at line 249 of file bench_ecmult.c.

Here is the call graph for this function:
Here is the caller graph for this function: