mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-09 06:18:06 +00:00
algorithm spaces/indentation fix
This commit is contained in:
parent
60a79024ad
commit
5ba1772d5a
20
algorithm.c
20
algorithm.c
@ -264,7 +264,6 @@ static cl_int queue_marucoin_mod_kernel(struct __clState *clState, struct _dev_b
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
static cl_int queue_marucoin_mod_old_kernel(struct __clState *clState, struct _dev_blk_ctx *blk, __maybe_unused cl_uint threads)
|
||||
{
|
||||
cl_kernel *kernel;
|
||||
@ -395,7 +394,8 @@ static algorithm_settings_t algos[] = {
|
||||
{ NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
void copy_algorithm_settings(algorithm_t* dest, const char* algo) {
|
||||
void copy_algorithm_settings(algorithm_t* dest, const char* algo)
|
||||
{
|
||||
algorithm_settings_t* src;
|
||||
|
||||
// Find algorithm settings and copy
|
||||
@ -430,13 +430,15 @@ void copy_algorithm_settings(algorithm_t* dest, const char* algo) {
|
||||
}
|
||||
}
|
||||
|
||||
void set_algorithm(algorithm_t* algo, const char* newname_alias) {
|
||||
void set_algorithm(algorithm_t* algo, const char* newname_alias)
|
||||
{
|
||||
const char* newname;
|
||||
uint8_t nfactor = 10;
|
||||
|
||||
// scrypt is default ckolivas kernel
|
||||
if (strcmp(newname_alias, "scrypt") == 0)
|
||||
if (strcmp(newname_alias, "scrypt") == 0) {
|
||||
newname = "ckolivas";
|
||||
}
|
||||
// Adaptive N-factor Scrypt is default ckolivas kernel with nfactor 11
|
||||
else if ((strcmp(newname_alias, "adaptive-n-factor") == 0) ||
|
||||
(strcmp(newname_alias, "adaptive-nfactor") == 0) ||
|
||||
@ -446,8 +448,10 @@ void set_algorithm(algorithm_t* algo, const char* newname_alias) {
|
||||
newname = "ckolivas";
|
||||
nfactor = 11;
|
||||
// Not an alias
|
||||
} else
|
||||
}
|
||||
else {
|
||||
newname = newname_alias;
|
||||
}
|
||||
|
||||
copy_algorithm_settings(algo, newname);
|
||||
|
||||
@ -455,12 +459,14 @@ void set_algorithm(algorithm_t* algo, const char* newname_alias) {
|
||||
set_algorithm_nfactor(algo, nfactor);
|
||||
}
|
||||
|
||||
void set_algorithm_nfactor(algorithm_t* algo, const uint8_t nfactor) {
|
||||
void set_algorithm_nfactor(algorithm_t* algo, const uint8_t nfactor)
|
||||
{
|
||||
algo->nfactor = nfactor;
|
||||
algo->n = (1 << nfactor);
|
||||
}
|
||||
|
||||
bool cmp_algorithm(algorithm_t* algo1, algorithm_t* algo2) {
|
||||
bool cmp_algorithm(algorithm_t* algo1, algorithm_t* algo2)
|
||||
{
|
||||
return (strcmp(algo1->name, algo2->name) == 0) &&
|
||||
(algo1->nfactor == algo2->nfactor);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user