Permalink
Browse files

adding third party X13 and Diamond Groestl code contributions.

  • Loading branch information...
1 parent 3b21069 commit d99b91ea6504924630a1b6b80c25ae1d7c14e631 @cbuchner1 committed Jun 15, 2014
Showing with 42,661 additions and 21 deletions.
  1. +21 −13 ccminer.vcxproj
  2. +19 −4 ccminer.vcxproj.filters
  3. +15 −3 cpu-miner.c
  4. +4 −0 miner.h
  5. +867 −0 sph/hamsi.c
  6. +39,648 −0 sph/hamsi_helper.c
  7. +321 −0 sph/sph_hamsi.h
  8. +7 −1 x11/cuda_x11_echo.cu
  9. +711 −0 x13/cuda_x13_fugue512.cu
  10. +764 −0 x13/cuda_x13_hamsi512.cu
  11. +284 −0 x13/x13.cu
View
@@ -245,6 +245,8 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<ClCompile Include="sph\shavite.c" />
<ClCompile Include="sph\simd.c" />
<ClCompile Include="sph\skein.c" />
+ <ClCompile Include="sph\hamsi.c" />
+ <ClCompile Include="sph\hamsi_helper.c" />
<ClCompile Include="util.c">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/TP %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/TP %(AdditionalOptions)</AdditionalOptions>
@@ -275,24 +277,18 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<ClInclude Include="sph\sph_bmw.h" />
<ClInclude Include="sph\sph_cubehash.h" />
<ClInclude Include="sph\sph_echo.h" />
- <ClInclude Include="sph\sph_fugue.h" />
<ClInclude Include="sph\sph_groestl.h" />
<ClInclude Include="sph\sph_jh.h" />
<ClInclude Include="sph\sph_keccak.h" />
<ClInclude Include="sph\sph_luffa.h" />
<ClInclude Include="sph\sph_shavite.h" />
<ClInclude Include="sph\sph_simd.h" />
<ClInclude Include="sph\sph_skein.h" />
+ <ClInclude Include="sph\sph_hamsi.h" />
<ClInclude Include="sph\sph_types.h" />
<ClInclude Include="uint256.h" />
</ItemGroup>
<ItemGroup>
- <CudaCompile Include="bitslice_transformations_quad.cu">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </CudaCompile>
<CudaCompile Include="cuda_fugue256.cu">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
@@ -317,12 +313,6 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
</CudaCompile>
- <CudaCompile Include="groestl_functions_quad.cu">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </CudaCompile>
<CudaCompile Include="heavy\cuda_blake512.cu">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
@@ -501,6 +491,24 @@ copy "$(CudaToolkitBinDir)\cudart*.dll" "$(OutDir)"</Command>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
</CudaCompile>
+ <CudaCompile Include="x13\cuda_x13_hamsi512.cu">
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ </CudaCompile>
+ <CudaCompile Include="x13\cuda_x13_fugue512.cu">
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ </CudaCompile>
+ <CudaCompile Include="x13\x13.cu">
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">-Xptxas "-abi=no -v" %(AdditionalOptions)</AdditionalOptions>
+ </CudaCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
@@ -55,6 +55,9 @@
<Filter Include="Source Files\CUDA\x11">
<UniqueIdentifier>{dd751f2d-bfd6-42c1-8f9b-cbe94e539353}</UniqueIdentifier>
</Filter>
+ <Filter Include="Source Files\CUDA\x13">
+ <UniqueIdentifier>{d67a2af7-4851-4d21-910e-87791bc8ee35}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="compat\jansson\dump.c">
@@ -144,6 +147,12 @@
<ClCompile Include="myriadgroestl.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="sph\hamsi.c">
+ <Filter>Source Files\sph</Filter>
+ </ClCompile>
+ <ClCompile Include="sph\hamsi_helper.c">
+ <Filter>Source Files\sph</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="compat.h">
@@ -242,6 +251,9 @@
<ClInclude Include="cuda_helper.h">
<Filter>Header Files\CUDA</Filter>
</ClInclude>
+ <ClInclude Include="sph\sph_hamsi.h">
+ <Filter>Header Files\sph</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<CudaCompile Include="cuda_fugue256.cu">
@@ -340,11 +352,14 @@
<CudaCompile Include="x11\simd_functions.cu">
<Filter>Source Files\CUDA\x11</Filter>
</CudaCompile>
- <CudaCompile Include="bitslice_transformations_quad.cu">
- <Filter>Source Files\CUDA</Filter>
+ <CudaCompile Include="x13\cuda_x13_fugue512.cu">
+ <Filter>Source Files\CUDA\x13</Filter>
</CudaCompile>
- <CudaCompile Include="groestl_functions_quad.cu">
- <Filter>Source Files\CUDA</Filter>
+ <CudaCompile Include="x13\cuda_x13_hamsi512.cu">
+ <Filter>Source Files\CUDA\x13</Filter>
+ </CudaCompile>
+ <CudaCompile Include="x13\x13.cu">
+ <Filter>Source Files\CUDA\x13</Filter>
</CudaCompile>
</ItemGroup>
</Project>
View
@@ -131,7 +131,9 @@ typedef enum {
ALGO_QUARK,
ALGO_ANIME,
ALGO_NIST5,
- ALGO_X11
+ ALGO_X11,
+ ALGO_X13,
+ ALGO_DMD_GR,
} sha256_algos;
static const char *algo_names[] = {
@@ -144,7 +146,9 @@ static const char *algo_names[] = {
"quark",
"anime",
"nist5",
- "x11"
+ "x11",
+ "x13",
+ "dmd-gr",
};
bool opt_debug = false;
@@ -217,6 +221,8 @@ Options:\n\
anime Animecoin hash\n\
nist5 NIST5 (TalkCoin) hash\n\
x11 X11 (DarkCoin) hash\n\
+ x13 X13 (MaruCoin) hash\n\
+ dmd-gr Diamond-Groestl hash\n\
-d, --devices takes a comma separated list of CUDA devices to use.\n\
Device IDs start counting from 0! Alternatively takes\n\
string names of your cards like gtx780ti or gt640#2\n\
@@ -766,7 +772,7 @@ static void stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
if (opt_algo == ALGO_JACKPOT)
diff_to_target(work->target, sctx->job.diff / (65536.0 * opt_difficulty));
- else if (opt_algo == ALGO_FUGUE256 || opt_algo == ALGO_GROESTL)
+ else if (opt_algo == ALGO_FUGUE256 || opt_algo == ALGO_GROESTL || opt_algo == ALGO_DMD_GR)
diff_to_target(work->target, sctx->job.diff / (256.0 * opt_difficulty));
else
diff_to_target(work->target, sctx->job.diff / opt_difficulty);
@@ -878,6 +884,7 @@ static void *miner_thread(void *userdata)
break;
case ALGO_GROESTL:
+ case ALGO_DMD_GR:
rc = scanhash_groestlcoin(thr_id, work.data, work.target,
max_nonce, &hashes_done);
break;
@@ -912,6 +919,11 @@ static void *miner_thread(void *userdata)
max_nonce, &hashes_done);
break;
+ case ALGO_X13:
+ rc = scanhash_x13(thr_id, work.data, work.target,
+ max_nonce, &hashes_done);
+ break;
+
default:
/* should never happen */
goto out;
View
@@ -239,6 +239,10 @@ extern int scanhash_x11(int thr_id, uint32_t *pdata,
const uint32_t *ptarget, uint32_t max_nonce,
unsigned long *hashes_done);
+extern int scanhash_x13(int thr_id, uint32_t *pdata,
+ const uint32_t *ptarget, uint32_t max_nonce,
+ unsigned long *hashes_done);
+
extern void fugue256_hash(unsigned char* output, const unsigned char* input, int len);
extern void heavycoin_hash(unsigned char* output, const unsigned char* input, int len);
extern void groestlcoin_hash(unsigned char* output, const unsigned char* input, int len);
Oops, something went wrong.

0 comments on commit d99b91e

Please sign in to comment.