mirror of
https://github.com/GOSTSec/ccminer
synced 2025-08-26 13:51:51 +00:00
groestl: tabs to space + arch check
This commit is contained in:
parent
74e94fa1ec
commit
be478bd725
@ -4,9 +4,9 @@
|
|||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
|
||||||
#include "cuda_helper.h"
|
#include "cuda_helper.h"
|
||||||
#include <host_defines.h>
|
|
||||||
|
|
||||||
// globaler Speicher für alle HeftyHashes aller Threads
|
#include "miner.h"
|
||||||
|
|
||||||
__constant__ uint32_t pTarget[8]; // Single GPU
|
__constant__ uint32_t pTarget[8]; // Single GPU
|
||||||
__constant__ uint32_t groestlcoin_gpu_msg[32];
|
__constant__ uint32_t groestlcoin_gpu_msg[32];
|
||||||
|
|
||||||
@ -96,13 +96,15 @@ void groestlcoin_gpu_hash_quad(uint32_t threads, uint32_t startNounce, uint32_t
|
|||||||
__host__
|
__host__
|
||||||
void groestlcoin_cpu_init(int thr_id, uint32_t threads)
|
void groestlcoin_cpu_init(int thr_id, uint32_t threads)
|
||||||
{
|
{
|
||||||
|
// to check if the binary supports SM3+
|
||||||
|
cuda_get_arch(thr_id);
|
||||||
|
|
||||||
cudaMalloc(&d_resultNonce[thr_id], sizeof(uint32_t));
|
cudaMalloc(&d_resultNonce[thr_id], sizeof(uint32_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
__host__
|
__host__
|
||||||
void groestlcoin_cpu_setBlock(int thr_id, void *data, void *pTargetIn)
|
void groestlcoin_cpu_setBlock(int thr_id, void *data, void *pTargetIn)
|
||||||
{
|
{
|
||||||
// Nachricht expandieren und setzen
|
|
||||||
uint32_t msgBlock[32];
|
uint32_t msgBlock[32];
|
||||||
|
|
||||||
memset(msgBlock, 0, sizeof(uint32_t) * 32);
|
memset(msgBlock, 0, sizeof(uint32_t) * 32);
|
||||||
@ -143,9 +145,10 @@ void groestlcoin_cpu_hash(int thr_id, uint32_t threads, uint32_t startNounce, vo
|
|||||||
// Größe des dynamischen Shared Memory Bereichs
|
// Größe des dynamischen Shared Memory Bereichs
|
||||||
size_t shared_size = 0;
|
size_t shared_size = 0;
|
||||||
|
|
||||||
if (device_sm[device_map[thr_id]] < 300) {
|
int dev_id = device_map[thr_id];
|
||||||
|
if (device_sm[dev_id] < 300 || cuda_arch[dev_id] < 300) {
|
||||||
printf("Sorry, This algo is not supported by this GPU arch (SM 3.0 required)");
|
printf("Sorry, This algo is not supported by this GPU arch (SM 3.0 required)");
|
||||||
return;
|
proper_exit(EXIT_CODE_CUDA_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
cudaMemset(d_resultNonce[thr_id], 0xFF, sizeof(uint32_t));
|
cudaMemset(d_resultNonce[thr_id], 0xFF, sizeof(uint32_t));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user