localgpu

package
v0.1.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FullNodePowWrap

type FullNodePowWrap struct {
	// contains filtered or unexported fields
}

func NewFullNodePowWrap

func NewFullNodePowWrap(cnf *FullNodePowWrapConfig) *FullNodePowWrap

func (*FullNodePowWrap) Excavate

func (p *FullNodePowWrap) Excavate(inputBlock interfaces.Block, outputBlockCh chan interfaces.Block)

func (*FullNodePowWrap) StopMining

func (p *FullNodePowWrap) StopMining()

type FullNodePowWrapConfig

type FullNodePowWrapConfig struct {
	// contains filtered or unexported fields
}

func NewEmptyFullNodePowWrapConfig

func NewEmptyFullNodePowWrapConfig() *FullNodePowWrapConfig

func NewFullNodePowWrapConfig

func NewFullNodePowWrapConfig(cnffile *sys.Inicnf) *FullNodePowWrapConfig

type GPUWorker

type GPUWorker struct {
	// contains filtered or unexported fields
}

func NewGPUWorker

func NewGPUWorker(successMiningMark *uint32, successBlockCh chan miningBlockReturn, coinbaseMsgNum uint32, stopMark *byte, config *LocalGPUPowMasterConfig, platform *cl.Platform, context *cl.Context, program *cl.Program, devices []*cl.Device, deviceworkers []*GpuMinerDeviceWorkerContext) *GPUWorker

func (*GPUWorker) DoMining

func (g *GPUWorker) DoMining(blockHeight uint64, stopmark *byte, tarhashvalue []byte, blockheadmeta [][]byte) (bool, byte, []byte, []byte)

func (*GPUWorker) RunMining

func (c *GPUWorker) RunMining(newblockheadmeta interfaces.Block, stopmark *byte) bool

type GpuMinerDeviceWorkerContext

type GpuMinerDeviceWorkerContext struct {
	// contains filtered or unexported fields
}

func (*GpuMinerDeviceWorkerContext) ReInit

func (w *GpuMinerDeviceWorkerContext) ReInit(stuff_buf []byte, target_buf []byte)

func (*GpuMinerDeviceWorkerContext) Retain

func (w *GpuMinerDeviceWorkerContext) Retain()

type LocalGPUPowMaster

type LocalGPUPowMaster struct {
	// contains filtered or unexported fields
}

func NewLocalGPUPowMaster

func NewLocalGPUPowMaster(cnf *LocalGPUPowMasterConfig) *LocalGPUPowMaster

func (*LocalGPUPowMaster) Excavate

func (l *LocalGPUPowMaster) Excavate(inputblockheadmeta interfaces.Block, outputCh chan message.PowMasterMsg)

do mining

func (*LocalGPUPowMaster) SetCoinbaseMsgNum

func (l *LocalGPUPowMaster) SetCoinbaseMsgNum(coinbaseMsgNum uint32)

func (*LocalGPUPowMaster) StopMining

func (l *LocalGPUPowMaster) StopMining()

stop mining

type LocalGPUPowMasterConfig

type LocalGPUPowMasterConfig struct {
	ReturnPowerHash   bool
	Concurrent        uint32 // Concurrent mining
	OpenclPath        string
	PlatName          string // 选择的平台
	GroupNum          int    // 同时执行组数量
	GroupSize         int    // 组大小
	ItemLoop          int    // 单次执行循环次数
	EmptyFuncTest     bool   // 空函数编译测试
	UseOneDeviceBuild bool   // 使用单个设备编译
}

func NewEmptyLocalGPUPowMasterConfig

func NewEmptyLocalGPUPowMasterConfig() *LocalGPUPowMasterConfig

func NewLocalGPUPowMasterConfig

func NewLocalGPUPowMasterConfig(cnffile *sys.Inicnf) *LocalGPUPowMasterConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL