Commit c25310f215bc97a37944339d331b000ba806d505

Authored by Adam Disney
1 parent f48f2d38
Exists in master and in 1 other branch v2

Removed comments marking CARRY_FREE_GK additions.

include/gf_complete.h
... ... @@ -36,7 +36,7 @@
36 36 typedef enum {GF_MULT_DEFAULT,
37 37 GF_MULT_SHIFT,
38 38 GF_MULT_CARRY_FREE,
39   - GF_MULT_CARRY_FREE_GK, //ADAM
  39 + GF_MULT_CARRY_FREE_GK,
40 40 GF_MULT_GROUP,
41 41 GF_MULT_BYTWO_p,
42 42 GF_MULT_BYTWO_b,
... ...
src/gf.c
... ... @@ -286,7 +286,6 @@ int gf_error_check(int w, int mult_type, int region_type, int divide_type,
286 286 return 1;
287 287 }
288 288  
289   - //ADAM
290 289 if (mult_type == GF_MULT_CARRY_FREE_GK) {
291 290 if (w != 4 && w != 8 && w != 16 &&
292 291 w != 32 && w != 64 && w != 128) { _gf_errno = GF_E_CFM___W; return 0; }
... ...
src/gf_method.c
... ... @@ -47,7 +47,6 @@ int create_gf_from_argv(gf_t *gf, int w, int argc, char **argv, int starting)
47 47 } else if (strcmp(argv[starting], "CARRY_FREE") == 0) {
48 48 mult_type = GF_MULT_CARRY_FREE;
49 49 starting++;
50   - //ADAM
51 50 } else if (strcmp(argv[starting], "CARRY_FREE_GK") == 0) {
52 51 mult_type = GF_MULT_CARRY_FREE_GK;
53 52 starting++;
... ...
src/gf_w32.c
... ... @@ -399,7 +399,6 @@ uint32_t gf_w32_matrix (gf_t *gf, uint32_t b)
399 399 extra memory.
400 400 */
401 401  
402   -//ADAM
403 402 static
404 403 inline
405 404 gf_val_32_t
... ... @@ -435,7 +434,6 @@ gf_w32_cfmgk_multiply (gf_t *gf, gf_val_32_t a32, gf_val_32_t b32)
435 434 return rv;
436 435 }
437 436  
438   -//ADAM
439 437 #if defined(INTEL_SSE4_PCLMUL)
440 438  
441 439 static
... ... @@ -640,7 +638,6 @@ gf_w32_shift_multiply (gf_t *gf, uint32_t a32, uint32_t b32)
640 638 return product;
641 639 }
642 640  
643   -//ADAM
644 641 static
645 642 int gf_w32_cfmgk_init(gf_t *gf)
646 643 {
... ... @@ -654,11 +651,9 @@ int gf_w32_cfmgk_init(gf_t *gf)
654 651 gf->multiply.w32 = gf_w32_cfmgk_multiply;
655 652 gf->multiply_region.w32 = gf_w32_cfmgk_multiply_region_from_single;
656 653  
657   - //setup in the private section the q+ and g* ADAM
658 654 uint64_t *q_plus = (uint64_t *) h->private;
659 655 uint64_t *g_star = (uint64_t *) h->private + 1;
660 656  
661   - //q+
662 657 uint64_t tmp = h->prim_poly << 32;
663 658 *q_plus = 1ULL << 32;
664 659  
... ... @@ -670,7 +665,6 @@ int gf_w32_cfmgk_init(gf_t *gf)
670 665 tmp ^= h->prim_poly << (i-32);
671 666 }
672 667  
673   - //g*
674 668 *g_star = h->prim_poly & ((1ULL << 32) - 1);
675 669  
676 670 return 1;
... ... @@ -2778,7 +2772,6 @@ int gf_w32_scratch_size(int mult_type, int region_type, int divide_type, int arg
2778 2772 case GF_MULT_CARRY_FREE:
2779 2773 return sizeof(gf_internal_t);
2780 2774 break;
2781   - //ADAM
2782 2775 case GF_MULT_CARRY_FREE_GK:
2783 2776 return sizeof(gf_internal_t) + sizeof(uint64_t)*2;
2784 2777 break;
... ... @@ -2830,7 +2823,7 @@ int gf_w32_init(gf_t *gf)
2830 2823  
2831 2824 switch(h->mult_type) {
2832 2825 case GF_MULT_CARRY_FREE: if (gf_w32_cfm_init(gf) == 0) return 0; break;
2833   - case GF_MULT_CARRY_FREE_GK: if (gf_w32_cfmgk_init(gf) == 0) return 0; break; //ADAM
  2826 + case GF_MULT_CARRY_FREE_GK: if (gf_w32_cfmgk_init(gf) == 0) return 0; break;
2834 2827 case GF_MULT_SHIFT: if (gf_w32_shift_init(gf) == 0) return 0; break;
2835 2828 case GF_MULT_COMPOSITE: if (gf_w32_composite_init(gf) == 0) return 0; break;
2836 2829 case GF_MULT_DEFAULT:
... ...
tools/gf_methods.c
... ... @@ -20,7 +20,6 @@
20 20 #define BNMULTS (8)
21 21 static char *BMULTS[BNMULTS] = { "CARRY_FREE", "GROUP48",
22 22 "TABLE", "LOG", "SPLIT4", "SPLIT8", "SPLIT88", "COMPOSITE" };
23   -//ADAM
24 23 #define NMULTS (17)
25 24 static char *MULTS[NMULTS] = { "SHIFT", "CARRY_FREE", "CARRY_FREE_GK", "GROUP44", "GROUP48", "BYTWO_p", "BYTWO_b",
26 25 "TABLE", "LOG", "LOG_ZERO", "LOG_ZERO_EXT", "SPLIT2",
... ...