1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-22 04:24:29 +00:00

blake: blakecoin variant now works

This commit is contained in:
Tanguy Pruvot 2014-09-06 01:21:30 +02:00
parent ecc86af102
commit 52ec8830b1
5 changed files with 9 additions and 7 deletions

View File

@ -62,6 +62,7 @@ its command line interface and options.
quark use to mine Quarkcoin
anime use to mine Animecoin
blake use to mine NEOS (Blake 256)
blakecoin use to mine Old Blake 256
nist5 use to mine TalkCoin
fresh use to mine Freshcoin
whirl use to mine Whirlcoin

View File

@ -191,7 +191,7 @@ void blake256_compress(uint32_t *h, const uint32_t *block, const uint32_t T0, in
}
__global__
void blake256_gpu_hash_80(uint32_t threads, uint32_t startNounce, uint32_t *resNounce, int blakerounds)
void blake256_gpu_hash_80(uint32_t threads, uint32_t startNounce, uint32_t *resNounce, const int blakerounds)
{
uint32_t thread = (blockDim.x * blockIdx.x + threadIdx.x);
if (thread < threads)
@ -232,7 +232,7 @@ void blake256_gpu_hash_80(uint32_t threads, uint32_t startNounce, uint32_t *resN
}
__host__
uint32_t blake256_cpu_hash_80(int thr_id, uint32_t threads, uint32_t startNounce, int blakerounds)
uint32_t blake256_cpu_hash_80(int thr_id, uint32_t threads, uint32_t startNounce, const int blakerounds)
{
const int threadsperblock = TPB;
uint32_t result = MAXU;

View File

@ -1,4 +1,4 @@
AC_INIT([ccminer], [2014.09.01])
AC_INIT([ccminer], [2014.09.06])
AC_PREREQ([2.59c])
AC_CANONICAL_SYSTEM

View File

@ -789,7 +789,7 @@ static void stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
if (opt_algo == ALGO_HEAVY || opt_algo == ALGO_MJOLLNIR)
heavycoin_hash(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
else
if (opt_algo == ALGO_FUGUE256 || opt_algo == ALGO_GROESTL || opt_algo == ALGO_WHC)
if (opt_algo == ALGO_FUGUE256 || opt_algo == ALGO_GROESTL || opt_algo == ALGO_WHC || opt_algo == ALGO_BLAKECOIN)
SHA256((unsigned char*)sctx->job.coinbase, sctx->job.coinbase_size, (unsigned char*)merkle_root);
else
sha256d(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
@ -964,6 +964,7 @@ static void *miner_thread(void *userdata)
max64 = 0x1fffLL;
break;
case ALGO_BLAKECOIN:
max64 = 0x3ffffffLL;
case ALGO_BLAKE:
/* based on the 750Ti hashrate (100kH) */
max64 = 0x3ffffffLL;
@ -1373,7 +1374,7 @@ out:
return NULL;
}
#define PROGRAM_VERSION "1.4"
#define PROGRAM_VERSION "1.4.1"
static void show_version_and_exit(void)
{
printf("%s v%s\n"

View File

@ -592,7 +592,6 @@ static const sph_u64 CB[16] = {
M6 = sph_dec32be_aligned(buf + 24); \
M7 = sph_dec32be_aligned(buf + 28); \
M8 = sph_dec32be_aligned(buf + 32); \
if (blake256_rounds == 14) { \
M9 = sph_dec32be_aligned(buf + 36); \
MA = sph_dec32be_aligned(buf + 40); \
MB = sph_dec32be_aligned(buf + 44); \
@ -600,7 +599,6 @@ static const sph_u64 CB[16] = {
MD = sph_dec32be_aligned(buf + 52); \
ME = sph_dec32be_aligned(buf + 56); \
MF = sph_dec32be_aligned(buf + 60); \
} \
ROUND_S(0); \
ROUND_S(1); \
ROUND_S(2); \
@ -609,12 +607,14 @@ static const sph_u64 CB[16] = {
ROUND_S(5); \
ROUND_S(6); \
ROUND_S(7); \
if (blake256_rounds == 14) { \
ROUND_S(8); \
ROUND_S(9); \
ROUND_S(0); \
ROUND_S(1); \
ROUND_S(2); \
ROUND_S(3); \
} \
H0 ^= S0 ^ V0 ^ V8; \
H1 ^= S1 ^ V1 ^ V9; \
H2 ^= S2 ^ V2 ^ VA; \