27 #ifndef XDP_ADD_DIFF_SET_H
28 #define XDP_ADD_DIFF_SET_H
30 #ifndef XDP_ADD_DSET_MSIZE
31 #define XDP_ADD_DSET_MSIZE 8
33 #ifndef XDP_ADD_DSET_NMATRIX
34 #define XDP_ADD_DSET_NMATRIX 8
36 #ifndef XDP_ADD_DSET_NMATRIX_ALL
37 #define XDP_ADD_DSET_NMATRIX_ALL 27
39 #ifndef XDP_ADD_DSET_NISTATES
40 #define XDP_ADD_DSET_NISTATES 4
59 #define STAR_VALUE 2 // indicates that the bit can be 0 or 1
60 #define XDP_ADD_DSET_NVALUES 3 // 0, 1, *
79 std::vector<WORD_T>* dc_set_all);
81 std::vector<WORD_T>* dc_set_all);
85 WORD_T da[2], WORD_T db[2]);
114 gsl_matrix* A[2][2][2]);
124 gsl_matrix* A[2][2][2],
136 const uint32_t word_size,
142 const uint32_t word_size,
147 void xdp_add_dset_print_set(
const diff_set_t da_set);
149 double xdp_add_dset_exper(gsl_matrix* A[2][2][2],
156 gsl_matrix* A[3][3][3], gsl_vector* B[
WORD_SIZE + 1], gsl_vector* C_in,
158 double* r_max,
double* p_max,
bool b_single_diff);
160 double rmax_xdp_add_dset(gsl_matrix* A[3][3][3],
164 double max_xdp_add_dset_exper(gsl_matrix* A[2][2][2],
169 double max_xdp_add_dset(
const diff_set_t da_set,
177 bool is_inset(uint32_t da,
diff_set_t da_set);
179 #endif // #ifndef XDP_ADD_DIFF_SET_H
void xdp_add_input_diff_to_output_dset(WORD_T da, WORD_T db, diff_set_t *dc_set)
Definition: xdp-add-diff-set.cc:87
void xdp_add_dset_gen_diff_hamming_limit(const diff_set_t dc_set, const uint32_t hw_limit, std::vector< WORD_T > *dc_set_all)
Definition: xdp-add-diff-set.cc:344
void xdp_add_dset_alloc_matrices(gsl_matrix *A[2][2][2])
Definition: xdp-add-diff-set.cc:458
void xdp_add_dset_gen_matrices_all(gsl_matrix *AA[3][3][3], gsl_matrix *A[2][2][2])
Definition: xdp-add-diff-set.cc:765
void xdp_add_input_dsets_to_input_diffs(const diff_set_t da_set, const diff_set_t db_set, WORD_T da[2], WORD_T db[2])
Definition: xdp-add-diff-set.cc:407
double xdp_add_dset(gsl_matrix *A[2][2][2], const uint32_t word_size, const diff_set_t da_set, const diff_set_t db_set, const diff_set_t dc_set)
Definition: xdp-add-diff-set.cc:1041
void xdp_add_dset_gen_diff_all(const diff_set_t dc_set, std::vector< WORD_T > *dc_set_all)
Definition: xdp-add-diff-set.cc:286
uint64_t xdp_add_dset_size(diff_set_t da_set)
Definition: xdp-add-diff-set.cc:56
#define WORD_SIZE
Definition: common.hh:119
void xdp_add_input_dset_to_output_dset_rec(gsl_matrix *AA[2][2][2], const diff_set_t da_set, const diff_set_t db_set, diff_set_t *dc_set_max)
Definition: xdp-add-diff-set.cc:267
void xdp_add_dset_init_states(const uint32_t pos, gsl_vector *C, const diff_set_t da_set, const diff_set_t db_set, const diff_set_t dc_set)
Definition: xdp-add-diff-set.cc:617
void xdp_add_dset_print_matrix(gsl_matrix *A)
Definition: xdp-add-diff-set.cc:578
void rmax_xdp_add_dset_i(const uint32_t k_init, const uint32_t k, const uint32_t n, double *r, double *p, diff_set_t *dc_set, gsl_matrix *A[3][3][3], gsl_vector *B[WORD_SIZE+1], gsl_vector *C_in, const diff_set_t da_set, const diff_set_t db_set, diff_set_t *dc_set_max, double *r_max, double *p_max, bool b_single_diff)
Definition: xdp-add-diff-set.cc:1205
void xdp_add_dset_free_matrices_all(gsl_matrix *A[3][3][3])
Definition: xdp-add-diff-set.cc:714
void xdp_add_dset_alloc_matrices_all(gsl_matrix *A[3][3][3])
Definition: xdp-add-diff-set.cc:697
double xdp_add_dset_all(gsl_matrix *AA[3][3][3], const uint32_t word_size, const diff_set_t da_set, const diff_set_t db_set, const diff_set_t dc_set)
Definition: xdp-add-diff-set.cc:1120
void xdp_add_input_dset_to_output_dset(gsl_matrix *AA[2][2][2], const diff_set_t da_set, const diff_set_t db_set, diff_set_t *dc_set)
Definition: xdp-add-diff-set.cc:141
void xdp_add_input_dset_to_output_dset_i(uint32_t i, gsl_matrix *AA[2][2][2], const diff_set_t da_set, const diff_set_t db_set, diff_set_t *dc_set_in, double *r_in, diff_set_t *dc_set_max, double *r_max)
Definition: xdp-add-diff-set.cc:203
void xdp_add_dset_gen_matrices(gsl_matrix *A[2][2][2])
Definition: xdp-add-diff-set.cc:500
uint32_t XDP_ADD_DSET_ISTATES[XDP_ADD_DSET_NISTATES]
Definition: xdp-add-diff-set.cc:48
void xdp_add_dset_print_matrices(gsl_matrix *A[2][2][2])
Definition: xdp-add-diff-set.cc:551
void xdp_add_dset_gen_matrix(const uint32_t i, gsl_matrix *M, gsl_matrix *A[2][2][2], const diff_set_t da_set, const diff_set_t db_set, const diff_set_t dc_set)
Definition: xdp-add-diff-set.cc:885
void xdp_add_dset_free_matrices(gsl_matrix *A[2][2][2])
Definition: xdp-add-diff-set.cc:478
WORD_T fixed
Definition: xdp-add-diff-set.hh:71
bool is_dset_equal(const diff_set_t da_set, const diff_set_t db_set)
Definition: xdp-add-diff-set.cc:68
Definition: xdp-add-diff-set.hh:68
void xdp_add_dset_print_matrices_all(gsl_matrix *A[3][3][3])
Definition: xdp-add-diff-set.cc:734