Skip to content

Commit

Permalink
bastion algo
Browse files Browse the repository at this point in the history
Signed-off-by: Tanguy Pruvot <[email protected]>
  • Loading branch information
tpruvot committed Mar 7, 2017
1 parent 1b7c2fc commit 3ede61b
Show file tree
Hide file tree
Showing 11 changed files with 484 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ ccminer_SOURCES = elist.h miner.h compat.h \
heavy/cuda_hefty1.cu heavy/cuda_hefty1.h \
heavy/cuda_keccak512.cu heavy/cuda_keccak512.h \
heavy/cuda_sha256.cu heavy/cuda_sha256.h \
heavy/bastion.cu heavy/cuda_bastion.cu \
fuguecoin.cpp Algo256/cuda_fugue256.cu sph/fugue.c uint256.h \
groestlcoin.cpp cuda_groestlcoin.cu cuda_groestlcoin.h \
myriadgroestl.cpp cuda_myriadgroestl.cu \
Expand Down
2 changes: 2 additions & 0 deletions algos.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ enum sha_algos {
ALGO_BLAKE,
ALGO_BLAKE2S,
ALGO_BMW,
ALGO_BASTION,
ALGO_C11,
ALGO_CRYPTOLIGHT,
ALGO_CRYPTONIGHT,
Expand Down Expand Up @@ -66,6 +67,7 @@ static const char *algo_names[] = {
"blake",
"blake2s",
"bmw",
"bastion",
"c11",
"cryptolight",
"cryptonight",
Expand Down
1 change: 1 addition & 0 deletions bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ void bench_free()
void algo_free_all(int thr_id)
{
// only initialized algos will be freed
free_bastion(thr_id);
free_blake256(thr_id);
free_blake2s(thr_id);
free_bmw(thr_id);
Expand Down
4 changes: 4 additions & 0 deletions ccminer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ static char const usage[] = "\
Usage: " PROGRAM_NAME " [OPTIONS]\n\
Options:\n\
-a, --algo=ALGO specify the hash algorithm to use\n\
bastion Hefty bastion\n\
blake Blake 256 (SFR)\n\
blake2s Blake2-S 256 (NEVA)\n\
blakecoin Fast Blake 256 (8 rounds)\n\
Expand Down Expand Up @@ -2196,6 +2197,9 @@ static void *miner_thread(void *userdata)
/* scan nonces for a proof-of-work hash */
switch (opt_algo) {

case ALGO_BASTION:
rc = scanhash_bastion(thr_id, &work, max_nonce, &hashes_done);
break;
case ALGO_BLAKECOIN:
rc = scanhash_blake256(thr_id, &work, max_nonce, &hashes_done, 8);
break;
Expand Down
2 changes: 2 additions & 0 deletions ccminer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@
</CudaCompile>
<CudaCompile Include="heavy\heavy.cu">
</CudaCompile>
<CudaCompile Include="heavy\bastion.cu" />
<CudaCompile Include="heavy\cuda_bastion.cu" />
<CudaCompile Include="JHA\cuda_jha_compactionTest.cu">
<AdditionalOptions Condition="'$(Configuration)'=='Release'">-Xptxas "-abi=yes" %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)'=='Debug'">-Xptxas "-abi=yes" %(AdditionalOptions)</AdditionalOptions>
Expand Down
6 changes: 6 additions & 0 deletions ccminer.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,12 @@
<CudaCompile Include="heavy\heavy.cu">
<Filter>Source Files\CUDA\heavy</Filter>
</CudaCompile>
<CudaCompile Include="heavy\bastion.cu">
<Filter>Source Files\CUDA\heavy</Filter>
</CudaCompile>
<CudaCompile Include="heavy\cuda_bastion.cu">
<Filter>Source Files\CUDA\heavy</Filter>
</CudaCompile>
<CudaCompile Include="quark\cuda_bmw512.cu">
<Filter>Source Files\CUDA\quark</Filter>
</CudaCompile>
Expand Down
Loading

0 comments on commit 3ede61b

Please sign in to comment.