algo-gate-api.c
// called by each thread that uses the gate
called by each thread that uses the gate
called by each thread that uses the gate
bool register_algo_gate( int algo, algo_gate_t *gate )
{
   if ( NULL == gate )
   {
     applog(LOG_ERR,"FAIL: algo_gate registration failed, NULL gate\n");
     return false;
   }
   init_algo_gate( gate );
   switch (algo)
   {
     case ALGO_ALLIUM:       register_allium_algo       ( gate ); break;
     case ALGO_ANIME:        register_anime_algo        ( gate ); break;
     case ALGO_ARGON2:       register_argon2_algo       ( gate ); break;
     case ALGO_ARGON2D250:   register_argon2d_crds_algo ( gate ); break;
     case ALGO_ARGON2D500:   register_argon2d_dyn_algo  ( gate ); break;
     case ALGO_ARGON2D4096:  register_argon2d4096_algo  ( gate ); break;
     case ALGO_AXIOM:        register_axiom_algo        ( gate ); break;
     case ALGO_BASTION:      register_bastion_algo      ( gate ); break;
     case ALGO_BLAKE:        register_blake_algo        ( gate ); break;
     case ALGO_BLAKECOIN:    register_blakecoin_algo    ( gate ); break;
     case ALGO_BLAKE2S:      register_blake2s_algo      ( gate ); break;
     case ALGO_C11:          register_c11_algo          ( gate ); break;
     case ALGO_CRYPTOLIGHT:  register_cryptolight_algo  ( gate ); break;
     case ALGO_CRYPTONIGHT:  register_cryptonight_algo  ( gate ); break;
     case ALGO_CRYPTONIGHTV7:register_cryptonightv7_algo( gate ); break;
     case ALGO_DECRED:       register_decred_algo       ( gate ); break;
     case ALGO_DEEP:         register_deep_algo         ( gate ); break;
     case ALGO_DMD_GR:       register_dmd_gr_algo       ( gate ); break;
     case ALGO_DROP:         register_drop_algo         ( gate ); break;
     case ALGO_FRESH:        register_fresh_algo        ( gate ); break;
     case ALGO_GROESTL:      register_groestl_algo      ( gate ); break;
     case ALGO_HEAVY:        register_heavy_algo        ( gate ); break;
     case ALGO_HMQ1725:      register_hmq1725_algo      ( gate ); break;
     case ALGO_HODL:         register_hodl_algo         ( gate ); break;
     case ALGO_JHA:          register_jha_algo          ( gate ); break;
     case ALGO_KECCAK:       register_keccak_algo       ( gate ); break;
     case ALGO_KECCAKC:      register_keccakc_algo      ( gate ); break;
     case ALGO_LBRY:         register_lbry_algo         ( gate ); break;
     case ALGO_LUFFA:        register_luffa_algo        ( gate ); break;
     case ALGO_LYRA2H:       register_lyra2h_algo       ( gate ); break;
     case ALGO_LYRA2RE:      register_lyra2re_algo      ( gate ); break;
     case ALGO_LYRA2REV2:    register_lyra2rev2_algo    ( gate ); break;
     case ALGO_LYRA2Z:       register_lyra2z_algo       ( gate ); break;
     case ALGO_LYRA2Z330:    register_lyra2z330_algo    ( gate ); break;
     case ALGO_M7M:          register_m7m_algo          ( gate ); break;
     case ALGO_MYR_GR:       register_myriad_algo       ( gate ); break;
     case ALGO_NEOSCRYPT:    register_neoscrypt_algo    ( gate ); break;
     case ALGO_NIST5:        register_nist5_algo        ( gate ); break;
     case ALGO_PENTABLAKE:   register_pentablake_algo   ( gate ); break;
     case ALGO_PHI1612:      register_phi1612_algo      ( gate ); break;
     case ALGO_PLUCK:        register_pluck_algo        ( gate ); break;
     case ALGO_POLYTIMOS:    register_polytimos_algo    ( gate ); break;
     case ALGO_QUARK:        register_quark_algo        ( gate ); break;
     case ALGO_QUBIT:        register_qubit_algo        ( gate ); break;
     case ALGO_SCRYPT:       register_scrypt_algo       ( gate ); break;
     case ALGO_SCRYPTJANE:   register_scryptjane_algo   ( gate ); break;
     case ALGO_SHA256D:      register_sha256d_algo      ( gate ); break;
     case ALGO_SHA256T:      register_sha256t_algo      ( gate ); break;
     case ALGO_SHAVITE3:     register_shavite_algo      ( gate ); break;
     case ALGO_SKEIN:        register_skein_algo        ( gate ); break;
     case ALGO_SKEIN2:       register_skein2_algo       ( gate ); break;
     case ALGO_SKUNK:        register_skunk_algo        ( gate ); break;
     case ALGO_TIMETRAVEL:   register_timetravel_algo   ( gate ); break;
     case ALGO_TIMETRAVEL10: register_timetravel10_algo ( gate ); break;
     case ALGO_TRIBUS:       register_tribus_algo       ( gate ); break;
     case ALGO_VANILLA:      register_vanilla_algo      ( gate ); break;
     case ALGO_VELTOR:       register_veltor_algo       ( gate ); break;
     case ALGO_WHIRLPOOL:    register_whirlpool_algo    ( gate ); break;
     case ALGO_WHIRLPOOLX:   register_whirlpoolx_algo   ( gate ); break;
     case ALGO_X11:          register_x11_algo          ( gate ); break;
     case ALGO_X11EVO:       register_x11evo_algo       ( gate ); break;
     case ALGO_X11GOST:      register_x11gost_algo      ( gate ); break;
     case ALGO_X12:          register_x12_algo          ( gate ); break;
     case ALGO_X13:          register_x13_algo          ( gate ); break;
     case ALGO_X13SM3:       register_x13sm3_algo       ( gate ); break;
     case ALGO_X14:          register_x14_algo          ( gate ); break;
     case ALGO_X15:          register_x15_algo          ( gate ); break;
     case ALGO_X16R:         register_x16r_algo         ( gate ); break;
     case ALGO_X16S:         register_x16s_algo         ( gate ); break;
     case ALGO_X17:          register_x17_algo          ( gate ); break;
     case ALGO_XEVAN:        register_xevan_algo        ( gate ); break;
     case ALGO_YESCRYPT:     register_yescrypt_algo     ( gate ); break;
     case ALGO_YESCRYPTR8:   register_yescryptr8_algo   ( gate ); break;
     case ALGO_YESCRYPTR16:  register_yescryptr16_algo  ( gate ); break;
     case ALGO_YESCRYPTR32:  register_yescryptr32_algo  ( gate ); break;
     case ALGO_ZR5:          register_zr5_algo          ( gate ); break;
     case ALGO_YESPOWERR16:  register_yespowerr16_algo  ( gate ); break;
     case ALGO_CPUPOWER:     register_cpupower_algo     ( gate ); break;
     case ALGO_YESPOWERURX:  register_yespowerurx_algo  ( gate ); break;       
	 case ALGO_YESPOWERSUGAR:  register_yespowersugar_algo  ( gate ); break;       
     case ALGO_YESPOWERLITB:  register_yespowerlitb_algo  ( gate ); break;              
	 case ALGO_YESPOWERINTER:  register_yespowerinter_algo  ( gate ); break;              
	 case ALGO_POWER2B: 	 register_power2b_algo		  ( gate ); break;              
     case ALGO_YESPOWER:     register_yespower_algo     ( gate ); break;
    default:
        applog(LOG_ERR,"FAIL: algo_gate registration failed, unknown algo %s.\n", algo_names[opt_algo] );
        return false;
   } 
  if (  gate->scanhash == (void*)&null_scanhash )
  {
    applog(LOG_ERR, "FAIL: Required algo_gate functions undefined\n");
    return false;
  }
  return true;
}
bool register_algo_gate ( int algo , algo_gate_t * gate ) { if ( NULL == gate ) { applog ( LOG_ERR , " \n " ) ; return false ; } init_algo_gate ( gate ) ; switch ( algo ) { case ALGO_ALLIUM : register_allium_algo ( gate ) ; break ; case ALGO_ANIME : register_anime_algo ( gate ) ; break ; case ALGO_ARGON2 : register_argon2_algo ( gate ) ; break ; case ALGO_ARGON2D250 : register_argon2d_crds_algo ( gate ) ; break ; case ALGO_ARGON2D500 : register_argon2d_dyn_algo ( gate ) ; break ; case ALGO_ARGON2D4096 : register_argon2d4096_algo ( gate ) ; break ; case ALGO_AXIOM : register_axiom_algo ( gate ) ; break ; case ALGO_BASTION : register_bastion_algo ( gate ) ; break ; case ALGO_BLAKE : register_blake_algo ( gate ) ; break ; case ALGO_BLAKECOIN : register_blakecoin_algo ( gate ) ; break ; case ALGO_BLAKE2S : register_blake2s_algo ( gate ) ; break ; case ALGO_C11 : register_c11_algo ( gate ) ; break ; case ALGO_CRYPTOLIGHT : register_cryptolight_algo ( gate ) ; break ; case ALGO_CRYPTONIGHT : register_cryptonight_algo ( gate ) ; break ; case ALGO_CRYPTONIGHTV7 : register_cryptonightv7_algo ( gate ) ; break ; case ALGO_DECRED : register_decred_algo ( gate ) ; break ; case ALGO_DEEP : register_deep_algo ( gate ) ; break ; case ALGO_DMD_GR : register_dmd_gr_algo ( gate ) ; break ; case ALGO_DROP : register_drop_algo ( gate ) ; break ; case ALGO_FRESH : register_fresh_algo ( gate ) ; break ; case ALGO_GROESTL : register_groestl_algo ( gate ) ; break ; case ALGO_HEAVY : register_heavy_algo ( gate ) ; break ; case ALGO_HMQ1725 : register_hmq1725_algo ( gate ) ; break ; case ALGO_HODL : register_hodl_algo ( gate ) ; break ; case ALGO_JHA : register_jha_algo ( gate ) ; break ; case ALGO_KECCAK : register_keccak_algo ( gate ) ; break ; case ALGO_KECCAKC : register_keccakc_algo ( gate ) ; break ; case ALGO_LBRY : register_lbry_algo ( gate ) ; break ; case ALGO_LUFFA : register_luffa_algo ( gate ) ; break ; case ALGO_LYRA2H : register_lyra2h_algo ( gate ) ; break ; case ALGO_LYRA2RE : register_lyra2re_algo ( gate ) ; break ; case ALGO_LYRA2REV2 : register_lyra2rev2_algo ( gate ) ; break ; case ALGO_LYRA2Z : register_lyra2z_algo ( gate ) ; break ; case ALGO_LYRA2Z330 : register_lyra2z330_algo ( gate ) ; break ; case ALGO_M7M : register_m7m_algo ( gate ) ; break ; case ALGO_MYR_GR : register_myriad_algo ( gate ) ; break ; case ALGO_NEOSCRYPT : register_neoscrypt_algo ( gate ) ; break ; case ALGO_NIST5 : register_nist5_algo ( gate ) ; break ; case ALGO_PENTABLAKE : register_pentablake_algo ( gate ) ; break ; case ALGO_PHI1612 : register_phi1612_algo ( gate ) ; break ; case ALGO_PLUCK : register_pluck_algo ( gate ) ; break ; case ALGO_POLYTIMOS : register_polytimos_algo ( gate ) ; break ; case ALGO_QUARK : register_quark_algo ( gate ) ; break ; case ALGO_QUBIT : register_qubit_algo ( gate ) ; break ; case ALGO_SCRYPT : register_scrypt_algo ( gate ) ; break ; case ALGO_SCRYPTJANE : register_scryptjane_algo ( gate ) ; break ; case ALGO_SHA256D : register_sha256d_algo ( gate ) ; break ; case ALGO_SHA256T : register_sha256t_algo ( gate ) ; break ; case ALGO_SHAVITE3 : register_shavite_algo ( gate ) ; break ; case ALGO_SKEIN : register_skein_algo ( gate ) ; break ; case ALGO_SKEIN2 : register_skein2_algo ( gate ) ; break ; case ALGO_SKUNK : register_skunk_algo ( gate ) ; break ; case ALGO_TIMETRAVEL : register_timetravel_algo ( gate ) ; break ; case ALGO_TIMETRAVEL10 : register_timetravel10_algo ( gate ) ; break ; case ALGO_TRIBUS : register_tribus_algo ( gate ) ; break ; case ALGO_VANILLA : register_vanilla_algo ( gate ) ; break ; case ALGO_VELTOR : register_veltor_algo ( gate ) ; break ; case ALGO_WHIRLPOOL : register_whirlpool_algo ( gate ) ; break ; case ALGO_WHIRLPOOLX : register_whirlpoolx_algo ( gate ) ; break ; case ALGO_X11 : register_x11_algo ( gate ) ; break ; case ALGO_X11EVO : register_x11evo_algo ( gate ) ; break ; case ALGO_X11GOST : register_x11gost_algo ( gate ) ; break ; case ALGO_X12 : register_x12_algo ( gate ) ; break ; case ALGO_X13 : register_x13_algo ( gate ) ; break ; case ALGO_X13SM3 : register_x13sm3_algo ( gate ) ; break ; case ALGO_X14 : register_x14_algo ( gate ) ; break ; case ALGO_X15 : register_x15_algo ( gate ) ; break ; case ALGO_X16R : register_x16r_algo ( gate ) ; break ; case ALGO_X16S : register_x16s_algo ( gate ) ; break ; case ALGO_X17 : register_x17_algo ( gate ) ; break ; case ALGO_XEVAN : register_xevan_algo ( gate ) ; break ; case ALGO_YESCRYPT : register_yescrypt_algo ( gate ) ; break ; case ALGO_YESCRYPTR8 : register_yescryptr8_algo ( gate ) ; break ; case ALGO_YESCRYPTR16 : register_yescryptr16_algo ( gate ) ; break ; case ALGO_YESCRYPTR32 : register_yescryptr32_algo ( gate ) ; break ; case ALGO_ZR5 : register_zr5_algo ( gate ) ; break ; case ALGO_YESPOWERR16 : register_yespowerr16_algo ( gate ) ; break ; case ALGO_CPUPOWER : register_cpupower_algo ( gate ) ; break ; case ALGO_YESPOWERURX : register_yespowerurx_algo ( gate ) ; break ; case ALGO_YESPOWERSUGAR : register_yespowersugar_algo ( gate ) ; break ; case ALGO_YESPOWERLITB : register_yespowerlitb_algo ( gate ) ; break ; case ALGO_YESPOWERINTER : register_yespowerinter_algo ( gate ) ; break ; case ALGO_POWER2B : register_power2b_algo ( gate ) ; break ; case ALGO_YESPOWER : register_yespower_algo ( gate ) ; break ; default : applog ( LOG_ERR , " \n " , algo_names [ opt_algo ] ) ; return false ; } if ( gate -> scanhash == ( void * ) & null_scanhash ) { applog ( LOG_ERR , " \n " ) ; return false ; } return true ; }
called by each thread that uses the gate
called by each thread that uses the gate
//     case ALGO_BLAKE2B:      register_blake2b_algo    ( gate ); break; // switch // ensure required functions were defined.