PandA-2024.02
Data Structures | Macros | Functions | Variables
support.h File Reference
#include <inttypes.h>
#include <stdlib.h>
#include <mdpi/mdpi_user.h>
Include dependency graph for support.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  vc_t
 

Macros

#define SECTION_TERMINATED   -1
 
#define __STAC_EXPANDED(f_pfx, t, f_sfx)   f_pfx##t##f_sfx
 
#define STAC(f_pfx, t, f_sfx)   __STAC_EXPANDED(f_pfx, t, f_sfx)
 
#define MAX_ULP   1.0l
 
#define FLOAT_EXC_OVF   0
 
#define FLOAT_EXC_STD   1
 
#define FLOAT_EXC_SAT   2
 
#define FLOAT_RND_NONE   0
 
#define FLOAT_RND_NEVN   1
 
#define IEEE64_FRAC_BITS   52
 
#define IEEE64_EXP_BITS   11
 
#define IEEE64_EXP_BIAS   -1023
 
#define IEEE_RND   FLOAT_RND_NEVN
 
#define IEEE_EXC   FLOAT_EXC_STD
 
#define IEEE_ONE   1
 
#define IEEE_SUBNORM   1
 
#define IEEE_SIGN   -1
 
#define IEEE64_SPEC_ARGS   IEEE64_EXP_BITS, IEEE64_FRAC_BITS, IEEE64_EXP_BIAS, IEEE_RND, IEEE_EXC, IEEE_ONE, IEEE_SUBNORM, IEEE_SIGN
 
#define TEST_FRAC_BITS   IEEE64_FRAC_BITS
 
#define TEST_EXP_BITS   IEEE64_EXP_BITS
 
#define TEST_EXP_BIAS   IEEE64_EXP_BIAS
 
#define TEST_RND   IEEE_RND
 
#define TEST_EXC   IEEE_EXC
 
#define TEST_ONE   IEEE_ONE
 
#define TEST_SUBNORM   0
 
#define TEST_SIGN   IEEE_SIGN
 
#define TEST_SPEC_ARGS   TEST_EXP_BITS, TEST_FRAC_BITS, TEST_EXP_BIAS, TEST_RND, TEST_EXC, TEST_ONE, TEST_SUBNORM, TEST_SIGN
 
#define DATA_TYPE   double
 
#define __float_to_in(in)   in
 
#define __out_to_float(out)   out
 
#define __float_recast(in)   __out_to_float(__float_to_in(in))
 

Functions

char * readfile (int fd)
 
char * find_section_start (char *s, int n)
 
int parse_string (char *s, char *arr, int n)
 
int parse_uint8_t_array (char *s, uint8_t *arr, int n)
 
int parse_uint16_t_array (char *s, uint16_t *arr, int n)
 
int parse_uint32_t_array (char *s, uint32_t *arr, int n)
 
int parse_uint64_t_array (char *s, uint64_t *arr, int n)
 
int parse_int8_t_array (char *s, int8_t *arr, int n)
 
int parse_int16_t_array (char *s, int16_t *arr, int n)
 
int parse_int32_t_array (char *s, int32_t *arr, int n)
 
int parse_int64_t_array (char *s, int64_t *arr, int n)
 
int parse_float_array (char *s, float *arr, int n)
 
int parse_double_array (char *s, double *arr, int n)
 
int write_string (int fd, char *arr, int n)
 
int write_uint8_t_array (int fd, uint8_t *arr, int n)
 
int write_uint16_t_array (int fd, uint16_t *arr, int n)
 
int write_uint32_t_array (int fd, uint32_t *arr, int n)
 
int write_uint64_t_array (int fd, uint64_t *arr, int n)
 
int write_int8_t_array (int fd, int8_t *arr, int n)
 
int write_int16_t_array (int fd, int16_t *arr, int n)
 
int write_int32_t_array (int fd, int32_t *arr, int n)
 
int write_int64_t_array (int fd, int64_t *arr, int n)
 
int write_float_array (int fd, float *arr, int n)
 
int write_double_array (int fd, double *arr, int n)
 
int write_section_header (int fd)
 
void run_benchmark (void *vargs)
 
void input_to_data (int fd, void *vdata)
 
void data_to_input (int fd, void *vdata)
 
void output_to_data (int fd, void *vdata)
 
void data_to_output (int fd, void *vdata)
 
int check_data (void *vdata)
 

Variables

int INPUT_SIZE
 

Macro Definition Documentation

◆ __float_recast

#define __float_recast (   in)    __out_to_float(__float_to_in(in))

Definition at line 140 of file support.h.

Referenced by check_data().

◆ __float_to_in

#define __float_to_in (   in)    in

Definition at line 130 of file support.h.

Referenced by run_benchmark().

◆ __out_to_float

#define __out_to_float (   out)    out

Definition at line 131 of file support.h.

Referenced by run_benchmark().

◆ __STAC_EXPANDED

#define __STAC_EXPANDED (   f_pfx,
  t,
  f_sfx 
)    f_pfx##t##f_sfx

Definition at line 50 of file support.h.

◆ DATA_TYPE

#define DATA_TYPE   double

Definition at line 128 of file support.h.

◆ FLOAT_EXC_OVF

#define FLOAT_EXC_OVF   0

Definition at line 63 of file support.h.

◆ FLOAT_EXC_SAT

#define FLOAT_EXC_SAT   2

Definition at line 65 of file support.h.

◆ FLOAT_EXC_STD

#define FLOAT_EXC_STD   1

Definition at line 64 of file support.h.

◆ FLOAT_RND_NEVN

#define FLOAT_RND_NEVN   1

Definition at line 68 of file support.h.

◆ FLOAT_RND_NONE

#define FLOAT_RND_NONE   0

Definition at line 67 of file support.h.

◆ IEEE64_EXP_BIAS

#define IEEE64_EXP_BIAS   -1023

Definition at line 72 of file support.h.

◆ IEEE64_EXP_BITS

#define IEEE64_EXP_BITS   11

Definition at line 71 of file support.h.

◆ IEEE64_FRAC_BITS

#define IEEE64_FRAC_BITS   52

Definition at line 70 of file support.h.

◆ IEEE64_SPEC_ARGS

Definition at line 79 of file support.h.

◆ IEEE_EXC

#define IEEE_EXC   FLOAT_EXC_STD

Definition at line 74 of file support.h.

◆ IEEE_ONE

#define IEEE_ONE   1

Definition at line 75 of file support.h.

◆ IEEE_RND

#define IEEE_RND   FLOAT_RND_NEVN

Definition at line 73 of file support.h.

◆ IEEE_SIGN

#define IEEE_SIGN   -1

Definition at line 77 of file support.h.

◆ IEEE_SUBNORM

#define IEEE_SUBNORM   1

Definition at line 76 of file support.h.

◆ MAX_ULP

#define MAX_ULP   1.0l

Definition at line 60 of file support.h.

Referenced by check_data().

◆ SECTION_TERMINATED

#define SECTION_TERMINATED   -1

Definition at line 9 of file support.h.

◆ STAC

#define STAC (   f_pfx,
  t,
  f_sfx 
)    __STAC_EXPANDED(f_pfx, t, f_sfx)

Definition at line 51 of file support.h.

◆ TEST_EXC

#define TEST_EXC   IEEE_EXC

Definition at line 95 of file support.h.

◆ TEST_EXP_BIAS

#define TEST_EXP_BIAS   IEEE64_EXP_BIAS

Definition at line 89 of file support.h.

◆ TEST_EXP_BITS

#define TEST_EXP_BITS   IEEE64_EXP_BITS

Definition at line 86 of file support.h.

◆ TEST_FRAC_BITS

#define TEST_FRAC_BITS   IEEE64_FRAC_BITS

Definition at line 83 of file support.h.

◆ TEST_ONE

#define TEST_ONE   IEEE_ONE

Definition at line 98 of file support.h.

◆ TEST_RND

#define TEST_RND   IEEE_RND

Definition at line 92 of file support.h.

◆ TEST_SIGN

#define TEST_SIGN   IEEE_SIGN

Definition at line 104 of file support.h.

◆ TEST_SPEC_ARGS

Definition at line 106 of file support.h.

◆ TEST_SUBNORM

#define TEST_SUBNORM   0

Definition at line 101 of file support.h.

Function Documentation

◆ check_data()

int check_data ( void *  vdata)

◆ data_to_input()

void data_to_input ( int  fd,
void *  vdata 
)

Definition at line 34 of file local_support.c.

References bench_args_t::a, ALEN, bench_args_t::b, bench_args_t::biases1, bench_args_t::biases2, bench_args_t::biases3, BLEN, blockSide, bench_args_t::buf, bench_args_t::C, col_size, bench_args_t::cols, densityFactor, node_t_struct::edge_begin, node_t_struct::edge_end, bench_args_t::edges, bench_args_t::emission, f_size, FFT_SIZE, bench_args_t::filter, bench_args_t::img, bench_args_t::img_twid, bench_args_t::init, bench_args_t::input, input_dimension, bench_args_t::k, L, bench_args_t::m1, bench_args_t::m2, maxNeighbors, N, N_EDGES, N_NODES, N_OBS, bench_args_t::n_points, N_STATES, N_TOKENS, nAtoms, bench_args_t::NL, NNZ, bench_args_t::nodes, nodes, nodes_per_layer, bench_args_t::nzval, bench_args_t::obs, bench_args_t::orig, bench_args_t::pattern, PATTERN_SIZE, bench_args_t::position, bench_args_t::position_x, bench_args_t::position_y, bench_args_t::position_z, possible_outputs, bench_args_t::real, bench_args_t::real_twid, row_size, bench_args_t::rowDelimiters, bench_args_t::seqA, bench_args_t::seqB, SIZE, STAC, bench_args_t::starting_node, STRING_SIZE, TESTS_COUNT, bench_args_t::training_data, training_sets, bench_args_t::training_targets, bench_args_t::transition, TYPE, bench_args_t::val, bench_args_t::vec, bench_args_t::weights1, bench_args_t::weights2, bench_args_t::weights3, bench_args_t::work_x, bench_args_t::work_y, write_double_array(), write_int32_t_array(), write_section_header(), write_string(), write_uint64_t_array(), and write_uint8_t_array().

Referenced by main().

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

◆ data_to_output()

void data_to_output ( int  fd,
void *  vdata 
)

◆ find_section_start()

char* find_section_start ( char *  s,
int  n 
)

Definition at line 56 of file support.c.

Referenced by generate_test_TYPE_array(), input_to_data(), and output_to_data().

Here is the caller graph for this function:

◆ input_to_data()

void input_to_data ( int  fd,
void *  vdata 
)

Definition at line 18 of file local_support.c.

References bench_args_t::a, ALEN, bench_args_t::b, bench_args_t::biases1, bench_args_t::biases2, bench_args_t::biases3, BLEN, blockSide, bench_args_t::buf, bench_args_t::C, col_size, bench_args_t::cols, densityFactor, node_t_struct::edge_begin, node_t_struct::edge_end, bench_args_t::edges, bench_args_t::emission, f_size, FFT_SIZE, bench_args_t::filter, find_section_start(), bench_args_t::img, bench_args_t::img_twid, bench_args_t::init, bench_args_t::input, input_dimension, bench_args_t::k, L, bench_args_t::level, bench_args_t::m1, bench_args_t::m2, MAX_LEVEL, maxNeighbors, N, N_EDGES, N_NODES, N_OBS, bench_args_t::n_points, N_STATES, N_TOKENS, nAtoms, bench_args_t::NL, NNZ, bench_args_t::nodes, nodes, nodes_per_layer, bench_args_t::nzval, bench_args_t::obs, bench_args_t::orig, parse_double_array(), parse_int32_t_array(), parse_string(), parse_uint64_t_array(), parse_uint8_t_array(), bench_args_t::pattern, PATTERN_SIZE, bench_args_t::position, bench_args_t::position_x, bench_args_t::position_y, bench_args_t::position_z, possible_outputs, readfile(), bench_args_t::real, bench_args_t::real_twid, row_size, bench_args_t::rowDelimiters, bench_args_t::seqA, bench_args_t::seqB, SIZE, STAC, bench_args_t::starting_node, STRING_SIZE, TESTS_COUNT, bench_args_t::training_data, training_sets, bench_args_t::training_targets, bench_args_t::transition, TYPE, bench_args_t::val, bench_args_t::vec, bench_args_t::weights1, bench_args_t::weights2, bench_args_t::weights3, bench_args_t::work_x, and bench_args_t::work_y.

Referenced by main().

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

◆ output_to_data()

void output_to_data ( int  fd,
void *  vdata 
)

◆ parse_double_array()

int parse_double_array ( char *  s,
double *  arr,
int  n 
)

◆ parse_float_array()

int parse_float_array ( char *  s,
float *  arr,
int  n 
)

◆ parse_int16_t_array()

int parse_int16_t_array ( char *  s,
int16_t *  arr,
int  n 
)

◆ parse_int32_t_array()

int parse_int32_t_array ( char *  s,
int32_t *  arr,
int  n 
)

◆ parse_int64_t_array()

int parse_int64_t_array ( char *  s,
int64_t *  arr,
int  n 
)

◆ parse_int8_t_array()

int parse_int8_t_array ( char *  s,
int8_t *  arr,
int  n 
)

◆ parse_string()

int parse_string ( char *  s,
char *  arr,
int  n 
)

Definition at line 77 of file support.c.

References k, and NULL.

Referenced by input_to_data(), output_to_data(), and test_strings().

Here is the caller graph for this function:

◆ parse_uint16_t_array()

int parse_uint16_t_array ( char *  s,
uint16_t *  arr,
int  n 
)

◆ parse_uint32_t_array()

int parse_uint32_t_array ( char *  s,
uint32_t *  arr,
int  n 
)

◆ parse_uint64_t_array()

int parse_uint64_t_array ( char *  s,
uint64_t *  arr,
int  n 
)

◆ parse_uint8_t_array()

int parse_uint8_t_array ( char *  s,
uint8_t *  arr,
int  n 
)

◆ readfile()

char* readfile ( int  fd)

Definition at line 34 of file support.c.

References read().

Referenced by generate_test_TYPE_array(), input_to_data(), output_to_data(), and test_strings().

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

◆ run_benchmark()

void run_benchmark ( void *  vargs)

Definition at line 6 of file local_support.c.

References __float_to_in, __out_to_float, bench_args_t::a, aes256_encrypt_ecb(), bench_args_t::alignedA, bench_args_t::alignedB, test_panda::args, bench_args_t::b, backprop(), bbgemm(), bfs(), bench_args_t::biases1, bench_args_t::biases2, bench_args_t::biases3, bench_args_t::bucket, bench_args_t::buf, bench_args_t::c, bench_args_t::C, bench_args_t::cols, bench_args_t::ctx, vc_t::d, double_prec_addition(), double_prec_division(), double_prec_exp(), double_prec_multiplication(), double_prec_pow(), double_prec_sqrt(), double_prec_subtraction(), bench_args_t::edges, ellpack(), bench_args_t::emission, fft(), fft1D_512(), bench_args_t::filter, bench_args_t::force, bench_args_t::force_x, bench_args_t::force_y, bench_args_t::force_z, gemm(), bench_args_t::img, bench_args_t::img_twid, bench_args_t::init, bench_args_t::input, bench_args_t::k, kmp(), bench_args_t::kmpNext, bench_args_t::level, bench_args_t::level_counts, bench_args_t::M, bench_args_t::m1, bench_args_t::m2, md(), md_kernel(), ms_mergesort(), bench_args_t::n_matches, bench_args_t::n_points, needwun(), bench_args_t::NL, bench_args_t::nodes, bench_args_t::nzval, bench_args_t::obs, bench_args_t::orig, bench_args_t::out, bench_args_t::path, bench_args_t::pattern, bench_args_t::position, bench_args_t::position_x, bench_args_t::position_y, bench_args_t::position_z, bench_args_t::prod, bench_args_t::ptr, bench_args_t::real, bench_args_t::real_twid, bench_args_t::rowDelimiters, bench_args_t::seqA, bench_args_t::seqB, bench_args_t::sol, spmv(), ss_sort(), bench_args_t::starting_node, stencil(), stencil3d(), bench_args_t::sum, TESTS_COUNT, bench_args_t::training_data, bench_args_t::training_targets, bench_args_t::transition, vc_t::u, bench_args_t::val, bench_args_t::vec, viterbi(), bench_args_t::weights1, bench_args_t::weights2, bench_args_t::weights3, bench_args_t::work_x, and bench_args_t::work_y.

Referenced by main().

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

◆ write_double_array()

int write_double_array ( int  fd,
double *  arr,
int  n 
)

◆ write_float_array()

int write_float_array ( int  fd,
float *  arr,
int  n 
)

◆ write_int16_t_array()

int write_int16_t_array ( int  fd,
int16_t *  arr,
int  n 
)

◆ write_int32_t_array()

int write_int32_t_array ( int  fd,
int32_t *  arr,
int  n 
)

◆ write_int64_t_array()

int write_int64_t_array ( int  fd,
int64_t *  arr,
int  n 
)

◆ write_int8_t_array()

int write_int8_t_array ( int  fd,
int8_t *  arr,
int  n 
)

◆ write_section_header()

int write_section_header ( int  fd)

◆ write_string()

int write_string ( int  fd,
char *  arr,
int  n 
)

◆ write_uint16_t_array()

int write_uint16_t_array ( int  fd,
uint16_t *  arr,
int  n 
)

◆ write_uint32_t_array()

int write_uint32_t_array ( int  fd,
uint32_t *  arr,
int  n 
)

◆ write_uint64_t_array()

int write_uint64_t_array ( int  fd,
uint64_t *  arr,
int  n 
)

◆ write_uint8_t_array()

int write_uint8_t_array ( int  fd,
uint8_t *  arr,
int  n 
)

Variable Documentation

◆ INPUT_SIZE

int INPUT_SIZE

Definition at line 4 of file local_support.c.

Referenced by main().


Generated on Mon Feb 12 2024 13:03:10 for PandA-2024.02 by doxygen 1.8.13