Skip to content

Commit

Permalink
Merge branch 'qubit'
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot committed Sep 9, 2014
2 parents 474ee97 + 402e70f commit 80d6e09
Show file tree
Hide file tree
Showing 27 changed files with 1,032 additions and 149 deletions.
9 changes: 2 additions & 7 deletions JHA/jackpotcoin.cu
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ extern "C"
#include "sph/sph_groestl.h"
#include "sph/sph_jh.h"
#include "sph/sph_skein.h"
}

#include "miner.h"
#include "cuda_helper.h"
}

// aus cpu-miner.c
extern int device_map[8];

// Speicher für Input/Output der verketteten Hashfunktionen
static uint32_t *d_hash[8];

extern void jackpot_keccak512_cpu_init(int thr_id, int threads);
Expand All @@ -31,10 +30,6 @@ extern void quark_jh512_cpu_hash_64(int thr_id, int threads, uint32_t startNounc
extern void quark_skein512_cpu_init(int thr_id, int threads);
extern void quark_skein512_cpu_hash_64(int thr_id, int threads, uint32_t startNounce, uint32_t *d_nonceVector, uint32_t *d_hash, int order);

extern void cuda_check_cpu_init(int thr_id, int threads);
extern void cuda_check_cpu_setTarget(const void *ptarget);
extern uint32_t cuda_check_cpu_hash_64(int thr_id, int threads, uint32_t startNounce, uint32_t *d_nonceVector, uint32_t *d_inputHash, int order);

extern void jackpot_compactTest_cpu_init(int thr_id, int threads);
extern void jackpot_compactTest_cpu_hash_64(int thr_id, int threads, uint32_t startNounce, uint32_t *inpHashes, uint32_t *d_validNonceTable,
uint32_t *d_nonces1, size_t *nrm1,
Expand Down
11 changes: 7 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,22 @@ ccminer_SOURCES = elist.h miner.h compat.h \
groestlcoin.cpp cuda_groestlcoin.cu cuda_groestlcoin.h \
myriadgroestl.cpp cuda_myriadgroestl.cu \
JHA/jackpotcoin.cu JHA/cuda_jha_keccak512.cu \
JHA/cuda_jha_compactionTest.cu quark/cuda_checkhash.cu \
JHA/cuda_jha_compactionTest.cu cuda_checkhash.cu \
quark/cuda_jh512.cu quark/cuda_quark_blake512.cu quark/cuda_quark_groestl512.cu quark/cuda_skein512.cu \
quark/cuda_bmw512.cu quark/cuda_quark_keccak512.cu quark/quarkcoin.cu quark/animecoin.cu \
quark/cuda_quark_compactionTest.cu \
quark/cuda_bmw512.cu quark/cuda_quark_keccak512.cu \
quark/quarkcoin.cu quark/animecoin.cu \
quark/cuda_quark_compactionTest.cu \
cuda_nist5.cu blake32.cu pentablake.cu \
sph/bmw.c sph/blake.c sph/groestl.c sph/jh.c sph/keccak.c sph/skein.c \
sph/cubehash.c sph/echo.c sph/luffa.c sph/sha2.c sph/shavite.c sph/simd.c \
sph/hamsi.c sph/hamsi_helper.c sph/sph_hamsi.h \
sph/shabal.c sph/whirlpool.c sph/sha2big.c sph/haval.c \
qubit/qubit.cu qubit/qubit_luffa512.cu qubit/deep.cu qubit/doom.cu \
x11/x11.cu x11/fresh.cu x11/cuda_x11_luffa512.cu x11/cuda_x11_cubehash512.cu \
x11/cuda_x11_shavite512.cu x11/cuda_x11_simd512.cu x11/cuda_x11_echo.cu \
x13/x13.cu x13/cuda_x13_hamsi512.cu x13/cuda_x13_fugue512.cu \
x15/x14.cu x15/x15.cu x15/cuda_x14_shabal512.cu x15/cuda_x15_whirlpool.cu x15/whirlpool.cu \
x15/x14.cu x15/x15.cu x15/cuda_x14_shabal512.cu x15/cuda_x15_whirlpool.cu \
x15/whirlpool.cu \
x17/x17.cu x17/cuda_x17_haval512.cu x17/cuda_x17_sha512.cu


Expand Down
11 changes: 9 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

ccMiner release 1.4.2-tpruvot (Sep 09th 2014) - "Pentablake"
ccMiner release 1.4.3-tpruvot (Sep 11th 2014) - "DJM34 Algos"
---------------------------------------------------------------

***************************************************************
Expand Down Expand Up @@ -35,6 +35,7 @@ TalkCoin
DarkCoin and other X11 coins
NEOS blake (256 14-rounds)
BlakeCoin (256 8-rounds)
Deep, Doom, Goalcoin and Qubit
Pentablake (Blake 512 x5)

where some of these coins have a VERY NOTABLE nVidia advantage
Expand All @@ -56,12 +57,15 @@ its command line interface and options.
-a, --algo=ALGO specify the algorithm to use
heavy use to mine Heavycoin
mjollnir use to mine Mjollnircoin
deep use to mine Deepcoin
doom use to mine Doomcoin
fugue256 use to mine Fuguecoin
groestl use to mine Groestlcoin
dmd-gr use to mine Diamond-Groestl
myr-gr use to mine Myriad-Groest
jackpot use to mine Jackpotcoin
quark use to mine Quarkcoin
qubit use to mine Qubit Algo
anime use to mine Animecoin
blake use to mine NEOS (Blake 256)
blakecoin use to mine Old Blake 256
Expand Down Expand Up @@ -103,7 +107,7 @@ its command line interface and options.
--benchmark run in offline benchmark mode
--cputest debug hashes from cpu algorithms
-c, --config=FILE load a JSON-format configuration file
-C, --color display colored output in a linux Terminal
-K, --nocolor disable colored console output
-V, --version display version information and exit
-h, --help display this help text and exit

Expand Down Expand Up @@ -154,6 +158,9 @@ features.

>>> RELEASE HISTORY <<<

Sep 11th 2O14
add algos from djm34 (deep,doom,qubit)

Sep. 1st 2014 add X17, optimized x15 and whirl
add blake (256 variant)
color support on Windows,
Expand Down
10 changes: 10 additions & 0 deletions bitslice_transformations_quad.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#define __shfl(var, srcLane, width) (uint32_t)(var)
#endif

#ifdef __CUDA_ARCH__

__device__ __forceinline__
void to_bitslice_quad(uint32_t *input, uint32_t *output)
{
Expand Down Expand Up @@ -429,3 +431,11 @@ void from_bitslice_quad(uint32_t *input, uint32_t *output)
if (threadIdx.x % 4) output[i] = output[i+1] = 0;
}
}

#else

/* host "fake" functions */
#define from_bitslice_quad(st, out)
#define to_bitslice_quad(in, msg) in[0] = (uint32_t) in[0];

#endif /* device only code */
24 changes: 22 additions & 2 deletions ccminer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ copy "$(CudaToolkitBinDir)\cudart64*.dll" "$(OutDir)"</Command>
<AdditionalOptions Condition="'$(Configuration)'=='Debug'">%(AdditionalOptions)</AdditionalOptions>
<TargetMachinePlatform Condition="'$(Platform)'=='x64'">64</TargetMachinePlatform>
</CudaCompile>
<CudaCompile Include="quark\cuda_checkhash.cu">
<CudaCompile Include="cuda_checkhash.cu">
<CInterleavedPTX>false</CInterleavedPTX>
<AdditionalOptions Condition="'$(Configuration)'=='Release'">--ptxas-options=-O2 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)'=='Debug'">%(AdditionalOptions)</AdditionalOptions>
Expand Down Expand Up @@ -463,6 +463,26 @@ copy "$(CudaToolkitBinDir)\cudart64*.dll" "$(OutDir)"</Command>
<AdditionalOptions Condition="'$(Configuration)'=='Debug'">%(AdditionalOptions)</AdditionalOptions>
<TargetMachinePlatform Condition="'$(Platform)'=='x64'">64</TargetMachinePlatform>
</CudaCompile>
<CudaCompile Include="qubit\deep.cu">
<AdditionalOptions Condition="'$(Configuration)'=='Release'">--ptxas-options=-O2 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)'=='Debug'">%(AdditionalOptions)</AdditionalOptions>
<TargetMachinePlatform Condition="'$(Platform)'=='x64'">64</TargetMachinePlatform>
</CudaCompile>
<CudaCompile Include="qubit\doom.cu">
<AdditionalOptions Condition="'$(Configuration)'=='Release'">--ptxas-options=-O2 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)'=='Debug'">%(AdditionalOptions)</AdditionalOptions>
<TargetMachinePlatform Condition="'$(Platform)'=='x64'">64</TargetMachinePlatform>
</CudaCompile>
<CudaCompile Include="qubit\qubit.cu">
<AdditionalOptions Condition="'$(Configuration)'=='Release'">--ptxas-options=-O2 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)'=='Debug'">%(AdditionalOptions)</AdditionalOptions>
<TargetMachinePlatform Condition="'$(Platform)'=='x64'">64</TargetMachinePlatform>
</CudaCompile>
<CudaCompile Include="qubit\qubit_luffa512.cu">
<AdditionalOptions Condition="'$(Configuration)'=='Release'">--ptxas-options=-O2 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)'=='Debug'">%(AdditionalOptions)</AdditionalOptions>
<TargetMachinePlatform Condition="'$(Platform)'=='x64'">64</TargetMachinePlatform>
</CudaCompile>
<CudaCompile Include="x11\cuda_x11_aes.cu">
<ExcludedFromBuild>true</ExcludedFromBuild>
</CudaCompile>
Expand Down Expand Up @@ -570,4 +590,4 @@ copy "$(CudaToolkitBinDir)\cudart64*.dll" "$(OutDir)"</Command>
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 6.5.targets" />
</ImportGroup>
</Project>
</Project>
19 changes: 17 additions & 2 deletions ccminer.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
<Filter Include="Header Files\CUDA\heavy">
<UniqueIdentifier>{3281db48-f394-49ea-a1ef-6ebd09828d50}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\CUDA\qubit">
<UniqueIdentifier>{f3ed23a2-8ce7-41a5-b051-6da56047dc35}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\CUDA\x11">
<UniqueIdentifier>{dd751f2d-bfd6-42c1-8f9b-cbe94e539353}</UniqueIdentifier>
</Filter>
Expand Down Expand Up @@ -376,6 +379,18 @@
<CudaCompile Include="quark\quarkcoin.cu">
<Filter>Source Files\CUDA\quark</Filter>
</CudaCompile>
<CudaCompile Include="qubit\deep.cu">
<Filter>Source Files\CUDA\qubit</Filter>
</CudaCompile>
<CudaCompile Include="qubit\doom.cu">
<Filter>Source Files\CUDA\qubit</Filter>
</CudaCompile>
<CudaCompile Include="qubit\qubit.cu">
<Filter>Source Files\CUDA\qubit</Filter>
</CudaCompile>
<CudaCompile Include="qubit\qubit_luffa512.cu">
<Filter>Source Files\CUDA\qubit</Filter>
</CudaCompile>
<CudaCompile Include="cuda_nist5.cu">
<Filter>Source Files\CUDA</Filter>
</CudaCompile>
Expand Down Expand Up @@ -415,7 +430,7 @@
<CudaCompile Include="x13\x13.cu">
<Filter>Source Files\CUDA\x13</Filter>
</CudaCompile>
<CudaCompile Include="quark\cuda_checkhash.cu">
<CudaCompile Include="cuda_checkhash.cu">
<Filter>Source Files\CUDA</Filter>
</CudaCompile>
<CudaCompile Include="x15\x14.cu">
Expand Down Expand Up @@ -449,4 +464,4 @@
<Filter>Source Files\CUDA</Filter>
</CudaCompile>
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([ccminer], [2014.09.09])
AC_INIT([ccminer], [2014.09.11])

AC_PREREQ([2.59c])
AC_CANONICAL_SYSTEM
Expand Down
39 changes: 33 additions & 6 deletions cpu-miner.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ typedef enum {
ALGO_ANIME,
ALGO_BLAKE,
ALGO_BLAKECOIN,
ALGO_DEEP,
ALGO_DOOM,
ALGO_FRESH,
ALGO_FUGUE256, /* Fugue256 */
ALGO_GROESTL,
Expand All @@ -139,6 +141,7 @@ typedef enum {
ALGO_NIST5,
ALGO_PENTABLAKE,
ALGO_QUARK,
ALGO_QUBIT,
ALGO_WHC,
ALGO_X11,
ALGO_X13,
Expand All @@ -152,6 +155,8 @@ static const char *algo_names[] = {
"anime",
"blake",
"blakecoin",
"deep",
"doom",
"fresh",
"fugue256",
"groestl",
Expand All @@ -162,6 +167,7 @@ static const char *algo_names[] = {
"nist5",
"penta",
"quark",
"qubit",
"whirl",
"x11",
"x13",
Expand Down Expand Up @@ -235,6 +241,8 @@ Options:\n\
anime Animecoin hash\n\
blake Blake 256 (like NEOS blake)\n\
blakecoin Old Blake 256 (8 rounds)\n\
deep Deepcoin hash\n\
doom Doomcoin hash\n\
fresh Freshcoin hash (shavite 80)\n\
fugue256 Fuguecoin hash\n\
groestl Groestlcoin hash\n\
Expand All @@ -245,6 +253,7 @@ Options:\n\
nist5 NIST5 (TalkCoin) hash\n\
penta Pentablake hash (5x Blake 512)\n\
quark Quark hash\n\
qubit Qubit hash\n\
whirl Whirlcoin (old whirlpool)\n\
x11 X11 (DarkCoin) hash\n\
x13 X13 (MaruCoin) hash\n\
Expand Down Expand Up @@ -275,7 +284,7 @@ Options:\n\
--no-longpoll disable X-Long-Polling support\n\
--no-stratum disable X-Stratum support\n\
-q, --quiet disable per-thread hashmeter output\n\
-C, --color enable colored output\n\
-K, --nocolor disable colored output\n\
-D, --debug enable debug output\n\
-P, --protocol-dump verbose dump of protocol-level activities\n"
#ifdef HAVE_SYSLOG_H
Expand All @@ -301,7 +310,7 @@ static char const short_options[] =
#ifdef HAVE_SYSLOG_H
"S"
#endif
"a:c:CDhp:Px:qr:R:s:t:T:o:u:O:Vd:f:mv:";
"a:c:CKDhp:Px:qr:R:s:t:T:o:u:O:Vd:f:mv:";

static struct option const options[] = {
{ "algo", 1, NULL, 'a' },
Expand All @@ -312,7 +321,7 @@ static struct option const options[] = {
{ "cputest", 0, NULL, 1006 },
{ "cert", 1, NULL, 1001 },
{ "config", 1, NULL, 'c' },
{ "color", 0, NULL, 'C' },
{ "nocolor", 0, NULL, 'K' },
{ "debug", 0, NULL, 'D' },
{ "help", 0, NULL, 'h' },
{ "no-longpoll", 0, NULL, 1003 },
Expand Down Expand Up @@ -1083,6 +1092,16 @@ static void *miner_thread(void *userdata)
max_nonce, &hashes_done, 0, MNR_BLKHDR_SZ);
break;

case ALGO_DEEP:
rc = scanhash_deep(thr_id, work.data, work.target,
max_nonce, &hashes_done);
break;

case ALGO_DOOM:
rc = scanhash_doom(thr_id, work.data, work.target,
max_nonce, &hashes_done);
break;

case ALGO_FUGUE256:
rc = scanhash_fugue256(thr_id, work.data, work.target,
max_nonce, &hashes_done);
Expand All @@ -1109,6 +1128,11 @@ static void *miner_thread(void *userdata)
max_nonce, &hashes_done);
break;

case ALGO_QUBIT:
rc = scanhash_qubit(thr_id, work.data, work.target,
max_nonce, &hashes_done);
break;

case ALGO_ANIME:
rc = scanhash_anime(thr_id, work.data, work.target,
max_nonce, &hashes_done);
Expand Down Expand Up @@ -1427,7 +1451,7 @@ static void *stratum_thread(void *userdata)
return NULL;
}

#define PROGRAM_VERSION "1.4.2"
#define PROGRAM_VERSION "1.4.3"
static void show_version_and_exit(void)
{
printf("%s v%s\n"
Expand Down Expand Up @@ -1489,8 +1513,12 @@ static void parse_arg (int key, char *arg)
break;
}
case 'C':
/* color for compat */
use_colors = true;
break;
case 'K':
use_colors = false;
break;
case 'D':
opt_debug = true;
break;
Expand Down Expand Up @@ -1801,8 +1829,7 @@ int main(int argc, char *argv[])
#endif
printf("\t based on pooler-cpuminer 2.3.2 (c) 2010 Jeff Garzik, 2012 pooler\n");
printf("\t and HVC extension from http://hvc.1gh.com/" "\n\n");
printf("\tCuda additions Copyright 2014 Christian Buchner, Christian H.\n");
printf("\t BTC donation address: 16hJF5mceSojnTD3ZTUDqdRhDyPJzoRakM\n");
printf("\tCuda additions Copyright 2014 Christian Buchner, Christian H.\n\n");
printf("\tInclude some of djm34 additions, cleaned by Tanguy Pruvot\n");
printf("\t BTC donation address: 1AJdfCpLWPNoAMDfHF1wD5y8VgKSSTHxPo\n\n");

Expand Down
6 changes: 3 additions & 3 deletions cpuminer-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
#define PACKAGE_NAME "ccminer"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "ccminer 2014.09.06"
#define PACKAGE_STRING "ccminer 2014.09.11"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "ccminer"
Expand All @@ -165,7 +165,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "2014.09.06"
#define PACKAGE_VERSION "2014.09.11"

/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
Expand All @@ -188,7 +188,7 @@
#define USE_XOP 1

/* Version number of package */
#define VERSION "2014.09.06"
#define VERSION "2014.09.11"

/* Define curl_free() as free() if our version of curl lacks curl_free. */
/* #undef curl_free */
Expand Down
Loading

0 comments on commit 80d6e09

Please sign in to comment.