Closed OhGodAPet closed 10 years ago
As far as I can see --algorithm and --kernel are aliases (i.e. the same thing) in current master. For algorithm the choices need to be hardcoded because there are many parameters besides the cl file (like diff1targ, number of kernels, individual kernel parameters etc), and these parameters are hardcoded in the code (algorithm.h/.c). If I remember correctly the old versions (4.2) did have a separate kernel option, but it was also hardcoded I think.
Right - I mean, would be nice if --algorithm specified the stuff besides the cl file, and --kernel specified the cl file. Hardcoding cl file names hardly makes sense to me...
The option for alternative .cl source file has been added as of 5355c2b1c5dcc8725d9c14030f73c6d85b8e5f66 with kernelfile
under pool, profile or global settings. --kernelfile
, --pool-kernelfile
, --profile-kernelfile
at the command line.
algorithm.c
only sets the parameters of the algorithm (such as the diff multipliers, functions to call to calc hash regen, kernel queue function, etc...) nothing really directly related to the actual kernel source code. By that definition, for example, all scrypt/nscrypt should be "scrypt" algorithm but use different cl files such as zuikkis.cl, ckolivas.cl, etc...
Thanks, man; you're awesome!
Also, while we're at it, is there any reason that the filenames are hardcoded? Why is it not possible to have a newx11.cl file, then do something like ./sgminer --algorithm x11 --kernel newx11 ?