mirror of
https://git.wownero.com/wownero/RandomWOW.git
synced 2024-12-21 23:38:54 +00:00
p2pool mods
This commit is contained in:
parent
607bad48f3
commit
1ce107336d
@ -296,14 +296,14 @@ FORCE_INLINE __m128ll vrev(__m128i v){
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCE_INLINE rx_vec_i128 rx_aesenc_vec_i128(rx_vec_i128 v, rx_vec_i128 rkey) {
|
FORCE_INLINE rx_vec_i128 rx_aesenc_vec_i128(rx_vec_i128, rx_vec_i128) {
|
||||||
__m128ll _v = vrev(v);
|
__m128ll _v = vrev(v);
|
||||||
__m128ll _rkey = vrev(rkey);
|
__m128ll _rkey = vrev(rkey);
|
||||||
__m128ll result = vrev((__m128i)__builtin_crypto_vcipher(_v,_rkey));
|
__m128ll result = vrev((__m128i)__builtin_crypto_vcipher(_v,_rkey));
|
||||||
return (rx_vec_i128)result;
|
return (rx_vec_i128)result;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCE_INLINE rx_vec_i128 rx_aesdec_vec_i128(rx_vec_i128 v, rx_vec_i128 rkey) {
|
FORCE_INLINE rx_vec_i128 rx_aesdec_vec_i128(rx_vec_i128, rx_vec_i128) {
|
||||||
__m128ll _v = vrev(v);
|
__m128ll _v = vrev(v);
|
||||||
__m128ll zero = (__m128ll){0};
|
__m128ll zero = (__m128ll){0};
|
||||||
__m128ll out = vrev((__m128i)__builtin_crypto_vncipher(_v,zero));
|
__m128ll out = vrev((__m128i)__builtin_crypto_vncipher(_v,zero));
|
||||||
@ -722,11 +722,11 @@ static const char* platformError = "Platform doesn't support hardware AES";
|
|||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
FORCE_INLINE rx_vec_i128 rx_aesenc_vec_i128(rx_vec_i128 v, rx_vec_i128 rkey) {
|
FORCE_INLINE rx_vec_i128 rx_aesenc_vec_i128(rx_vec_i128, rx_vec_i128) {
|
||||||
throw std::runtime_error(platformError);
|
throw std::runtime_error(platformError);
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCE_INLINE rx_vec_i128 rx_aesdec_vec_i128(rx_vec_i128 v, rx_vec_i128 rkey) {
|
FORCE_INLINE rx_vec_i128 rx_aesdec_vec_i128(rx_vec_i128, rx_vec_i128) {
|
||||||
throw std::runtime_error(platformError);
|
throw std::runtime_error(platformError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,11 +50,15 @@ typedef enum {
|
|||||||
RANDOMX_FLAG_ARGON2_AVX2 = 64,
|
RANDOMX_FLAG_ARGON2_AVX2 = 64,
|
||||||
RANDOMX_FLAG_ARGON2 = 96
|
RANDOMX_FLAG_ARGON2 = 96
|
||||||
} randomx_flags;
|
} randomx_flags;
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
struct randomx_dataset;
|
||||||
|
struct randomx_cache;
|
||||||
|
class randomx_vm;
|
||||||
|
#else
|
||||||
typedef struct randomx_dataset randomx_dataset;
|
typedef struct randomx_dataset randomx_dataset;
|
||||||
typedef struct randomx_cache randomx_cache;
|
typedef struct randomx_cache randomx_cache;
|
||||||
typedef struct randomx_vm randomx_vm;
|
typedef struct randomx_vm randomx_vm;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
|
|
||||||
|
@ -28,6 +28,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(disable : 4324)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
#include "program.hpp"
|
#include "program.hpp"
|
||||||
@ -39,8 +43,8 @@ public:
|
|||||||
virtual void allocate() = 0;
|
virtual void allocate() = 0;
|
||||||
virtual void getFinalResult(void* out, size_t outSize) = 0;
|
virtual void getFinalResult(void* out, size_t outSize) = 0;
|
||||||
virtual void hashAndFill(void* out, size_t outSize, uint64_t *fill_state) = 0;
|
virtual void hashAndFill(void* out, size_t outSize, uint64_t *fill_state) = 0;
|
||||||
virtual void setDataset(randomx_dataset* dataset) { }
|
virtual void setDataset(randomx_dataset* /*dataset*/) { }
|
||||||
virtual void setCache(randomx_cache* cache) { }
|
virtual void setCache(randomx_cache* /*cache*/) { }
|
||||||
virtual void initScratchpad(void* seed) = 0;
|
virtual void initScratchpad(void* seed) = 0;
|
||||||
virtual void run(void* seed) = 0;
|
virtual void run(void* seed) = 0;
|
||||||
void resetRoundingMode();
|
void resetRoundingMode();
|
||||||
|
Loading…
Reference in New Issue
Block a user