Use RxAlgo:base instead of switch.
This commit is contained in:
parent
bee01544c5
commit
8a69c23646
3 changed files with 8 additions and 23 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "backend/opencl/wrappers/OclDevice.h"
|
||||
#include "crypto/common/Algorithm.h"
|
||||
#include "crypto/randomx/randomx.h"
|
||||
#include "crypto/rx/RxAlgo.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
@ -40,27 +41,8 @@ bool ocl_generic_rx_generator(const OclDevice &device, const Algorithm &algorith
|
|||
}
|
||||
|
||||
const size_t mem = device.globalMemSize();
|
||||
|
||||
RandomX_ConfigurationBase* config = nullptr;
|
||||
|
||||
switch (algorithm) {
|
||||
case Algorithm::RX_0:
|
||||
config = &RandomX_MoneroConfig;
|
||||
break;
|
||||
|
||||
case Algorithm::RX_LOKI:
|
||||
config = &RandomX_LokiConfig;
|
||||
break;
|
||||
|
||||
case Algorithm::RX_WOW:
|
||||
config = &RandomX_WowneroConfig;
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool gcnAsm = false;
|
||||
auto config = RxAlgo::base(algorithm);
|
||||
bool gcnAsm = false;
|
||||
|
||||
switch (device.type()) {
|
||||
case OclDevice::Baffin:
|
||||
|
@ -70,6 +52,9 @@ bool ocl_generic_rx_generator(const OclDevice &device, const Algorithm &algorith
|
|||
case OclDevice::Vega_20:
|
||||
gcnAsm = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Must have space for dataset, scratchpads and 128 MB of free memory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue