|
|
@ -44,6 +44,7 @@ |
|
|
|
#include "algorithm/pascal.h" |
|
|
|
#include "algorithm/pascal.h" |
|
|
|
#include "algorithm/lbry.h" |
|
|
|
#include "algorithm/lbry.h" |
|
|
|
#include "algorithm/sibcoin.h" |
|
|
|
#include "algorithm/sibcoin.h" |
|
|
|
|
|
|
|
#include "algorithm/gostcoin.h" |
|
|
|
|
|
|
|
|
|
|
|
#include "compat.h" |
|
|
|
#include "compat.h" |
|
|
|
|
|
|
|
|
|
|
@ -80,7 +81,8 @@ const char *algorithm_type_str[] = { |
|
|
|
"Decred", |
|
|
|
"Decred", |
|
|
|
"Vanilla", |
|
|
|
"Vanilla", |
|
|
|
"Lbry", |
|
|
|
"Lbry", |
|
|
|
"Sibcoin" |
|
|
|
"Sibcoin", |
|
|
|
|
|
|
|
"Gostcoin" |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
void sha256(const unsigned char *message, unsigned int len, unsigned char *digest) |
|
|
|
void sha256(const unsigned char *message, unsigned int len, unsigned char *digest) |
|
|
@ -492,6 +494,25 @@ static cl_int queue_sibcoin_mod_kernel(struct __clState *clState, struct _dev_bl |
|
|
|
return status; |
|
|
|
return status; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static cl_int queue_gostcoin_mod_kernel(struct __clState *clState, struct _dev_blk_ctx *blk, __maybe_unused cl_uint threads) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
cl_kernel *kernel; |
|
|
|
|
|
|
|
unsigned int num; |
|
|
|
|
|
|
|
cl_ulong le_target; |
|
|
|
|
|
|
|
cl_int status = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
le_target = *(cl_ulong *)(blk->work->device_target + 24); |
|
|
|
|
|
|
|
flip80(clState->cldata, blk->work->data); |
|
|
|
|
|
|
|
status = clEnqueueWriteBuffer(clState->commandQueue, clState->CLbuffer0, true, 0, 80, clState->cldata, 0, NULL, NULL); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO:
|
|
|
|
|
|
|
|
num = 0; |
|
|
|
|
|
|
|
CL_NEXTKERNEL_SET_ARG(clState->padbuffer8); |
|
|
|
|
|
|
|
CL_SET_ARG(clState->outputBuffer); |
|
|
|
|
|
|
|
CL_SET_ARG(le_target); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return status; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static cl_int queue_bitblock_kernel(struct __clState *clState, struct _dev_blk_ctx *blk, __maybe_unused cl_uint threads) |
|
|
|
static cl_int queue_bitblock_kernel(struct __clState *clState, struct _dev_blk_ctx *blk, __maybe_unused cl_uint threads) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1230,6 +1251,8 @@ static algorithm_settings_t algos[] = { |
|
|
|
|
|
|
|
|
|
|
|
{ "pascal", ALGO_PASCAL, "", 1, 1, 1, 0, 0, 0xFF, 0xFFFFULL, 0x0000ffffUL, 0, 0, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, pascal_regenhash, pascal_midstate, NULL, queue_pascal_kernel, NULL, NULL }, |
|
|
|
{ "pascal", ALGO_PASCAL, "", 1, 1, 1, 0, 0, 0xFF, 0xFFFFULL, 0x0000ffffUL, 0, 0, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, pascal_regenhash, pascal_midstate, NULL, queue_pascal_kernel, NULL, NULL }, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ "gostcoin-mod", ALGO_GOSTCOIN, "", 1, 256, 256, 0, 0, 0xFF, 0xFFFFULL, 0x0000ffffUL, 2, 4 * 8 * 4194304, 0, gostcoin_regenhash, NULL, NULL, queue_gostcoin_mod_kernel, NULL, NULL }, |
|
|
|
|
|
|
|
|
|
|
|
// Terminator (do not remove)
|
|
|
|
// Terminator (do not remove)
|
|
|
|
{ NULL, ALGO_UNK, "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL } |
|
|
|
{ NULL, ALGO_UNK, "", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL } |
|
|
|
}; |
|
|
|
}; |
|
|
|