Sync changes with proxy.
This commit is contained in:
parent
b9fec2fcc4
commit
ca149d2eed
22 changed files with 436 additions and 328 deletions
|
@ -47,16 +47,12 @@ constexpr const size_t CRYPTONIGHT_HEAVY_MEMORY = 4 * 1024 * 1024;
|
|||
constexpr const uint32_t CRYPTONIGHT_HEAVY_MASK = 0x3FFFF0;
|
||||
constexpr const uint32_t CRYPTONIGHT_HEAVY_ITER = 0x40000;
|
||||
|
||||
constexpr const size_t CRYPTONIGHT_IPBC_MEMORY = 1 * 1024 * 1024;
|
||||
constexpr const uint32_t CRYPTONIGHT_IPBC_MASK = 0xFFFF0;
|
||||
constexpr const uint32_t CRYPTONIGHT_IPBC_ITER = 0x40000;
|
||||
|
||||
|
||||
template<Algo ALGO> inline constexpr size_t cn_select_memory() { return 0; }
|
||||
template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT>() { return CRYPTONIGHT_MEMORY; }
|
||||
template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT_LITE>() { return CRYPTONIGHT_LITE_MEMORY; }
|
||||
template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT_HEAVY>() { return CRYPTONIGHT_HEAVY_MEMORY; }
|
||||
template<> inline constexpr size_t cn_select_memory<CRYPTONIGHT_IPBC>() { return CRYPTONIGHT_IPBC_MEMORY; }
|
||||
|
||||
|
||||
inline size_t cn_select_memory(Algo algorithm)
|
||||
{
|
||||
|
@ -71,9 +67,6 @@ inline size_t cn_select_memory(Algo algorithm)
|
|||
case CRYPTONIGHT_HEAVY:
|
||||
return CRYPTONIGHT_HEAVY_MEMORY;
|
||||
|
||||
case CRYPTONIGHT_IPBC:
|
||||
return CRYPTONIGHT_IPBC_MEMORY;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -86,7 +79,7 @@ template<Algo ALGO> inline constexpr uint32_t cn_select_mask() { retur
|
|||
template<> inline constexpr uint32_t cn_select_mask<CRYPTONIGHT>() { return CRYPTONIGHT_MASK; }
|
||||
template<> inline constexpr uint32_t cn_select_mask<CRYPTONIGHT_LITE>() { return CRYPTONIGHT_LITE_MASK; }
|
||||
template<> inline constexpr uint32_t cn_select_mask<CRYPTONIGHT_HEAVY>() { return CRYPTONIGHT_HEAVY_MASK; }
|
||||
template<> inline constexpr uint32_t cn_select_mask<CRYPTONIGHT_IPBC>() { return CRYPTONIGHT_IPBC_MASK; }
|
||||
|
||||
|
||||
inline uint32_t cn_select_mask(Algo algorithm)
|
||||
{
|
||||
|
@ -101,9 +94,6 @@ inline uint32_t cn_select_mask(Algo algorithm)
|
|||
case CRYPTONIGHT_HEAVY:
|
||||
return CRYPTONIGHT_HEAVY_MASK;
|
||||
|
||||
case CRYPTONIGHT_IPBC:
|
||||
return CRYPTONIGHT_IPBC_MASK;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -116,7 +106,7 @@ template<Algo ALGO> inline constexpr uint32_t cn_select_iter() { retur
|
|||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT>() { return CRYPTONIGHT_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT_LITE>() { return CRYPTONIGHT_LITE_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT_HEAVY>() { return CRYPTONIGHT_HEAVY_ITER; }
|
||||
template<> inline constexpr uint32_t cn_select_iter<CRYPTONIGHT_IPBC>() { return CRYPTONIGHT_IPBC_ITER; }
|
||||
|
||||
|
||||
inline uint32_t cn_select_iter(Algo algorithm)
|
||||
{
|
||||
|
@ -131,9 +121,6 @@ inline uint32_t cn_select_iter(Algo algorithm)
|
|||
case CRYPTONIGHT_HEAVY:
|
||||
return CRYPTONIGHT_HEAVY_ITER;
|
||||
|
||||
case CRYPTONIGHT_IPBC:
|
||||
return CRYPTONIGHT_IPBC_ITER;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue