Added hugepages support for Argon2.
This commit is contained in:
parent
77eb474b29
commit
b1db0803cf
4 changed files with 41 additions and 7 deletions
|
@ -27,23 +27,21 @@
|
|||
|
||||
|
||||
#include "3rdparty/argon2.h"
|
||||
#include "crypto/cn/CryptoNight.h"
|
||||
#include "crypto/common/Algorithm.h"
|
||||
|
||||
|
||||
struct cryptonight_ctx;
|
||||
|
||||
|
||||
namespace xmrig { namespace argon2 {
|
||||
|
||||
|
||||
template<Algorithm::Id ALGO>
|
||||
inline void single_hash(const uint8_t *__restrict__ input, size_t size, uint8_t *__restrict__ output, cryptonight_ctx **__restrict__, uint64_t)
|
||||
inline void single_hash(const uint8_t *__restrict__ input, size_t size, uint8_t *__restrict__ output, cryptonight_ctx **__restrict__ ctx, uint64_t)
|
||||
{
|
||||
if (ALGO == Algorithm::AR2_CHUKWA) {
|
||||
argon2id_hash_raw(3, 512, 1, input, size, input, 16, output, 32);
|
||||
argon2id_hash_raw_ex(3, 512, 1, input, size, input, 16, output, 32, ctx[0]->memory);
|
||||
}
|
||||
else if (ALGO == Algorithm::AR2_WRKZ) {
|
||||
argon2id_hash_raw(4, 256, 1, input, size, input, 16, output, 32);
|
||||
argon2id_hash_raw_ex(4, 256, 1, input, size, input, 16, output, 32, ctx[0]->memory);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue