X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fkernel_worker.h;h=93ee62cbea4a8f211314809c894dc007e94a137e;hb=63e4509c569f16145ab861717baf865fc6d05af1;hp=63217b957f7f0a2d5ea4eaf4319d0f1a250c529d;hpb=5d466098ff30f0dece5d7e64e1b8b701aa088649;p=novacoin.git diff --git a/src/kernel_worker.h b/src/kernel_worker.h index 63217b9..93ee62c 100644 --- a/src/kernel_worker.h +++ b/src/kernel_worker.h @@ -1,5 +1,7 @@ -#ifndef BITCOIN_HERNELWORKER_H -#define BITCOIN_HERNELWORKER_H +#ifndef NOVACOIN_KERNELWORKER_H +#define NOVACOIN_KERNELWORKER_H + +#include class KernelWorker { @@ -8,24 +10,16 @@ public: { } KernelWorker(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, uint32_t nIntervalBegin, uint32_t nIntervalEnd); void Do(); - vector >& GetSolutions(); + std::vector >& GetSolutions(); private: -#ifdef USE_ASM -#ifdef __x86_64__ - // AVX2 CPUs: 8-way hashing. - void Do_8way(); -#endif - // SSE2, Neon: 4-way hashing. - void Do_4way(); -#endif // One way hashing. void Do_generic(); // Kernel solutions. std::vector > solutions; - // Kernel metadaya + // Kernel metadata. uint8_t *kernel; uint32_t nBits; uint32_t nInputTxTime; @@ -36,4 +30,7 @@ private: uint32_t nIntervalEnd; }; -#endif +// Scan given kernel for solutions +bool ScanKernelBackward(unsigned char *kernel, uint32_t nBits, uint32_t nInputTxTime, int64_t nValueIn, std::pair &SearchInterval, std::pair &solution); + +#endif // NOVACOIN_KERNELWORKER_H \ No newline at end of file