mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-24 13:32:46 -05:00
Initial ASM wrapper.
This commit is contained in:
@@ -65,7 +65,8 @@ xmrig::CpuThread::cn_hash_fun xmrig::CpuThread::fn(Algo algorithm, AlgoVariant a
|
||||
{
|
||||
assert(variant >= VARIANT_0 && variant < VARIANT_MAX);
|
||||
|
||||
static const cn_hash_fun func_table[VARIANT_MAX * 10 * 3] = {
|
||||
constexpr const size_t count = VARIANT_MAX * 10 * 3;
|
||||
static const cn_hash_fun func_table[count + 2] = {
|
||||
cryptonight_single_hash<CRYPTONIGHT, false, VARIANT_0>,
|
||||
cryptonight_double_hash<CRYPTONIGHT, false, VARIANT_0>,
|
||||
cryptonight_single_hash<CRYPTONIGHT, true, VARIANT_0>,
|
||||
@@ -242,6 +243,8 @@ xmrig::CpuThread::cn_hash_fun xmrig::CpuThread::fn(Algo algorithm, AlgoVariant a
|
||||
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
|
||||
# endif
|
||||
cryptonight_single_hash_asm<CRYPTONIGHT, VARIANT_2, ASM_INTEL>,
|
||||
cryptonight_single_hash_asm<CRYPTONIGHT, VARIANT_2, ASM_RYZEN>
|
||||
};
|
||||
|
||||
const size_t index = VARIANT_MAX * 10 * algorithm + 10 * variant + av - 1;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __WORKER_H__
|
||||
#define __WORKER_H__
|
||||
#ifndef XMRIG_WORKER_H
|
||||
#define XMRIG_WORKER_H
|
||||
|
||||
|
||||
#include <atomic>
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "Mem.h"
|
||||
|
||||
|
||||
struct cryptonight_ctx;
|
||||
class Handle;
|
||||
|
||||
|
||||
@@ -67,4 +66,4 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
#endif /* __WORKER_H__ */
|
||||
#endif /* XMRIG_WORKER_H */
|
||||
|
||||
Reference in New Issue
Block a user