mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-05 03:24:26 +00:00
Remove define-clauses for USE_SCRYPT.
This commit is contained in:
parent
aa06d390be
commit
323af83fdb
2
api.c
2
api.c
@ -161,9 +161,7 @@ static const char *NULLSTR = "(null)";
|
||||
static const char *TRUESTR = "true";
|
||||
static const char *FALSESTR = "false";
|
||||
|
||||
#ifdef USE_SCRYPT
|
||||
static const char *SCRYPTSTR = "scrypt";
|
||||
#endif
|
||||
static const char *SHA256STR = "sha256";
|
||||
|
||||
static const char *DEVICECODE = ""
|
||||
|
19
cgminer.c
19
cgminer.c
@ -1085,7 +1085,6 @@ static struct opt_table opt_config_table[] = {
|
||||
set_gpu_vddc, NULL, NULL,
|
||||
"Set the GPU voltage in Volts - one value for all or separate by commas for per card"),
|
||||
#endif
|
||||
#ifdef USE_SCRYPT
|
||||
OPT_WITH_ARG("--lookup-gap",
|
||||
set_lookup_gap, NULL, NULL,
|
||||
"Set GPU lookup gap for scrypt mining, comma separated"),
|
||||
@ -1094,13 +1093,6 @@ static struct opt_table opt_config_table[] = {
|
||||
"Intensity of GPU scanning (d or " MIN_INTENSITY_STR
|
||||
" -> " MAX_INTENSITY_STR
|
||||
",default: d to maintain desktop interactivity)"),
|
||||
#else
|
||||
OPT_WITH_ARG("--intensity|-I",
|
||||
set_intensity, NULL, NULL,
|
||||
"Intensity of GPU scanning (d or " MIN_INTENSITY_STR
|
||||
" -> " MAX_INTENSITY_STR
|
||||
",default: d to maintain desktop interactivity)"),
|
||||
#endif
|
||||
#endif
|
||||
OPT_WITH_ARG("--hotplug",
|
||||
set_int_0_to_9999, NULL, &hotplug_time,
|
||||
@ -1250,11 +1242,9 @@ static struct opt_table opt_config_table[] = {
|
||||
opt_hidden
|
||||
#endif
|
||||
),
|
||||
#ifdef USE_SCRYPT
|
||||
OPT_WITH_ARG("--thread-concurrency",
|
||||
set_thread_concurrency, NULL, NULL,
|
||||
"Set GPU thread concurrency for scrypt mining, comma separated"),
|
||||
#endif
|
||||
OPT_WITH_ARG("--url|-o",
|
||||
set_url, NULL, NULL,
|
||||
"URL for bitcoin JSON-RPC server"),
|
||||
@ -1437,13 +1427,10 @@ extern const char *opt_argv0;
|
||||
static char *opt_verusage_and_exit(const char *extra)
|
||||
{
|
||||
printf("%s\nBuilt with "
|
||||
#ifdef HAVE_OPENCL
|
||||
#ifdef HAVE_OPENCL // FIXME: true always
|
||||
"GPU "
|
||||
#endif
|
||||
#ifdef USE_SCRYPT
|
||||
"scrypt "
|
||||
#endif
|
||||
"mining support.\n"
|
||||
"scrypt mining support.\n"
|
||||
, packagename);
|
||||
printf("%s", opt_usage(opt_argv0, extra));
|
||||
fflush(stdout);
|
||||
@ -4262,7 +4249,6 @@ void write_config(FILE *fcfg)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef USE_SCRYPT
|
||||
fputs("\",\n\"lookup-gap\" : \"", fcfg);
|
||||
for(i = 0; i < nDevs; i++)
|
||||
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
|
||||
@ -4275,7 +4261,6 @@ void write_config(FILE *fcfg)
|
||||
for(i = 0; i < nDevs; i++)
|
||||
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
|
||||
(int)gpus[i].shaders);
|
||||
#endif
|
||||
#ifdef HAVE_ADL
|
||||
fputs("\",\n\"gpu-engine\" : \"", fcfg);
|
||||
for(i = 0; i < nDevs; i++)
|
||||
|
@ -1407,9 +1407,7 @@ static bool opencl_thread_init(struct thr_info *thr)
|
||||
|
||||
static bool opencl_prepare_work(struct thr_info __maybe_unused *thr, struct work *work)
|
||||
{
|
||||
#ifdef USE_SCRYPT
|
||||
work->blk.work = work;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -18,11 +18,9 @@ extern char *set_temp_target(char *arg);
|
||||
extern char *set_intensity(char *arg);
|
||||
extern char *set_vector(char *arg);
|
||||
extern char *set_worksize(char *arg);
|
||||
#ifdef USE_SCRYPT
|
||||
extern char *set_shaders(char *arg);
|
||||
extern char *set_lookup_gap(char *arg);
|
||||
extern char *set_thread_concurrency(char *arg);
|
||||
#endif
|
||||
extern char *set_kernel(char *arg);
|
||||
void manage_gpu(void);
|
||||
extern void pause_dynamic_threads(int gpu);
|
||||
|
9
miner.h
9
miner.h
@ -476,11 +476,9 @@ struct cgpu_info {
|
||||
enum cl_kernels kernel;
|
||||
cl_ulong max_alloc;
|
||||
|
||||
#ifdef USE_SCRYPT
|
||||
int opt_lg, lookup_gap;
|
||||
size_t opt_tc, thread_concurrency;
|
||||
size_t shaders;
|
||||
#endif
|
||||
struct timeval tv_gpustart;
|
||||
int intervals;
|
||||
#endif
|
||||
@ -1119,13 +1117,12 @@ typedef struct {
|
||||
cl_uint PreW31;
|
||||
cl_uint PreW32;
|
||||
|
||||
/* For diakgcn */
|
||||
/* FIXME: remove (For diakgcn) */
|
||||
cl_uint B1addK6, PreVal0addK7, W16addK16, W17addK17;
|
||||
cl_uint zeroA, zeroB;
|
||||
cl_uint oneA, twoA, threeA, fourA, fiveA, sixA, sevenA;
|
||||
#ifdef USE_SCRYPT
|
||||
|
||||
struct work *work;
|
||||
#endif
|
||||
} dev_blk_ctx;
|
||||
#else
|
||||
typedef struct {
|
||||
@ -1302,9 +1299,7 @@ struct work {
|
||||
unsigned char target[32];
|
||||
unsigned char hash[32];
|
||||
|
||||
#ifdef USE_SCRYPT
|
||||
unsigned char device_target[32];
|
||||
#endif
|
||||
double device_diff;
|
||||
uint64_t share_diff;
|
||||
|
||||
|
2
ocl.h
2
ocl.h
@ -19,12 +19,10 @@ typedef struct {
|
||||
cl_command_queue commandQueue;
|
||||
cl_program program;
|
||||
cl_mem outputBuffer;
|
||||
#ifdef USE_SCRYPT
|
||||
cl_mem CLbuffer0;
|
||||
cl_mem padbuffer8;
|
||||
size_t padbufsize;
|
||||
void * cldata;
|
||||
#endif
|
||||
bool hasBitAlign;
|
||||
bool hasOpenCL11plus;
|
||||
bool hasOpenCL12plus;
|
||||
|
14
scrypt.h
14
scrypt.h
@ -3,22 +3,8 @@
|
||||
|
||||
#include "miner.h"
|
||||
|
||||
#ifdef USE_SCRYPT
|
||||
extern int scrypt_test(unsigned char *pdata, const unsigned char *ptarget,
|
||||
uint32_t nonce);
|
||||
extern void scrypt_regenhash(struct work *work);
|
||||
|
||||
#else /* USE_SCRYPT */
|
||||
static inline int scrypt_test(__maybe_unused unsigned char *pdata,
|
||||
__maybe_unused const unsigned char *ptarget,
|
||||
__maybe_unused uint32_t nonce)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void scrypt_regenhash(__maybe_unused struct work *work)
|
||||
{
|
||||
}
|
||||
#endif /* USE_SCRYPT */
|
||||
|
||||
#endif /* SCRYPT_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user