public void Start(EthashStratum aStratum, int aIntensity, int aLocalWorkSize) { mStratum = aStratum; mLocalWorkSize = aLocalWorkSize; mGlobalWorkSize = aIntensity * mLocalWorkSize * Device.GetComputeDevice().MaxComputeUnits; base.Start(); }
public void Start(EthashStratum aEthashStratum, int aEthashIntensity, int aEthashLocalWorkSize) { Stratum = aEthashStratum; mEthashLocalWorkSizeArray[0] = aEthashLocalWorkSize; mEthashGlobalWorkSizeArray[0] = aEthashIntensity * mEthashLocalWorkSizeArray[0] * OpenCLDevice.GetComputeDevice().MaxComputeUnits; base.Start(); }
public void Start(EthashStratum aEthashStratum, PascalStratum aPascalStratum, int aEthashIntensity, int aPascalIterations) { mEthashStratum = aEthashStratum; mEthashLocalWorkSizeArray[0] = 256; mEthashGlobalWorkSizeArray[0] = aEthashIntensity * mEthashLocalWorkSizeArray[0] * OpenCLDevice.GetComputeDevice().MaxComputeUnits; mPascalStratum = aPascalStratum; mPascalRatio = (UInt32)aPascalIterations; base.Start(); }
public OpenCLEthashMiner(ComputeDevice aDevice, int aDeviceIndex, EthashStratum aStratum) : base(aDevice, aDeviceIndex, "Ethash") { mStratum = aStratum; mGlobalWorkSize = 4096 * mLocalWorkSize * Device.MaxComputeUnits; mProgram = new ComputeProgram(this.Context, System.IO.File.ReadAllText(@"Kernels\ethash.cl")); //mProgram = new ComputeProgram(this.Context, new List<byte[]> { System.IO.File.ReadAllBytes(@"BinaryKernels\ethash-newEllesmeregw192l8.bin") }, new List<ComputeDevice> { Device }); MainForm.Logger("Loaded ethash program for Device #" + aDeviceIndex + "."); List <ComputeDevice> deviceList = new List <ComputeDevice>(); deviceList.Add(Device); mProgram.Build(deviceList, "-DWORKSIZE=" + mLocalWorkSize, null, IntPtr.Zero); MainForm.Logger("Built ethash program for Device #" + aDeviceIndex + "."); mDAGKernel = mProgram.CreateKernel("GenerateDAG"); MainForm.Logger("Created DAG kernel for Device #" + aDeviceIndex + "."); mSearchKernel = mProgram.CreateKernel("search"); MainForm.Logger("Created search kernel for Device #" + aDeviceIndex + "."); mMinerThread = new Thread(new ThreadStart(MinerThread)); mMinerThread.IsBackground = true; mMinerThread.Start(); }
public override void SetPrimaryStratum(Stratum stratum) { Stratum = (EthashStratum)stratum; }