Polly 20.0.0git
Functions | Variables
imtimer.c File Reference
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <getopt.h>
#include <unistd.h>
#include "imath.h"

Go to the source code of this file.

Functions

double clocks_to_seconds (clock_t start, clock_t end)
 
double get_multiply_time (int nt, int prec)
 
double get_exptmod_time (int nt, int prec)
 
mp_int alloc_values (int nt, int prec)
 
void randomize_values (mp_int values, int nt, int prec)
 
void release_values (mp_int values, int nt)
 
void mp_int_random (mp_int z, int prec)
 
int main (int argc, char *argv[])
 

Variables

const int g_mul_factor = 1000
 

Function Documentation

◆ alloc_values()

mp_int alloc_values ( int  nt,
int  prec 
)

Definition at line 134 of file imtimer.c.

References mp_int_clear, mp_int_init_size, and MP_OK.

Referenced by get_exptmod_time(), and get_multiply_time().

◆ clocks_to_seconds()

double clocks_to_seconds ( clock_t  start,
clock_t  end 
)

Definition at line 130 of file imtimer.c.

Referenced by get_exptmod_time(), and get_multiply_time().

◆ get_exptmod_time()

double get_exptmod_time ( int  nt,
int  prec 
)

Definition at line 181 of file imtimer.c.

References alloc_values(), clocks_to_seconds(), mp_int_exptmod, randomize_values(), and release_values().

Referenced by main().

◆ get_multiply_time()

double get_multiply_time ( int  nt,
int  prec 
)

Definition at line 164 of file imtimer.c.

References alloc_values(), clocks_to_seconds(), mp_int_mul, randomize_values(), and release_values().

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ mp_int_random()

void mp_int_random ( mp_int  z,
int  prec 
)

Definition at line 199 of file imtimer.c.

References mpz_t::digits, MP_ALLOC(), and mpz_t::used.

Referenced by randomize_values().

◆ randomize_values()

void randomize_values ( mp_int  values,
int  nt,
int  prec 
)

Definition at line 150 of file imtimer.c.

References mp_int_random().

Referenced by get_exptmod_time(), and get_multiply_time().

◆ release_values()

void release_values ( mp_int  values,
int  nt 
)

Definition at line 156 of file imtimer.c.

References mp_int_clear.

Referenced by get_exptmod_time(), and get_multiply_time().

Variable Documentation

◆ g_mul_factor

const int g_mul_factor = 1000

Definition at line 46 of file imtimer.c.