device

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 CPUExecute

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

func NewCPUExecute

func NewCPUExecute(cnf *Config) *CPUExecute

func (*CPUExecute) Allocate

func (c *CPUExecute) Allocate() chan itfcs.PoWExecute

func (*CPUExecute) Config

func (c *CPUExecute) Config() itfcs.PoWConfig

func (*CPUExecute) DoMining

func (c *CPUExecute) DoMining(stopmark *byte, successmark *byte, input interfaces.Block, nonce_offset uint32) (*itfcs.PoWResultData, error)

func (*CPUExecute) GetNonceSpan

func (c *CPUExecute) GetNonceSpan() uint32

func (*CPUExecute) Init

func (c *CPUExecute) Init() error

func (*CPUExecute) ReportSpanTime

func (c *CPUExecute) ReportSpanTime(sec float64)

second

func (*CPUExecute) StartAllocate

func (c *CPUExecute) StartAllocate()

type Config

type Config struct {
	TEST_DEBUG bool

	Concurrent     uint32 // Concurrent mining
	DeviceSpanTime float64
	Detail_Log     bool

	GPU_Enable             bool
	GPU_OpenclPath         string
	GPU_UseMainFileContent string
	GPU_PlatformNameMatch  string
	GPU_GroupSize          int
	GPU_GroupConcurrent    int
	GPU_ItemLoopNum        int
	GPU_UseOneDeviceBuild  bool // Compile using a single device
	GPU_ForceRebuild       bool // Force recompile
	GPU_EmptyFuncTest      bool // Empty function compilation test
}

func NewConfig

func NewConfig(cnfsection *inicnf.Section) *Config

func NewEmptyMinerPoolWorkerConfig

func NewEmptyMinerPoolWorkerConfig() *Config

func (*Config) IsDetailLog

func (c *Config) IsDetailLog() bool

type HashrateLogTable

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

func NewHashrateLog

func NewHashrateLog() *HashrateLogTable

func (*HashrateLogTable) RecordHashChan

func (h *HashrateLogTable) RecordHashChan() chan fields.Hash

func (*HashrateLogTable) UpdateMiningBlock

func (h *HashrateLogTable) UpdateMiningBlock(blk interfaces.Block)

type PoWDeviceMng

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

func NewPoWDeviceMng

func NewPoWDeviceMng(alloter itfcs.PoWExecute) *PoWDeviceMng

func (*PoWDeviceMng) Config

func (c *PoWDeviceMng) Config() itfcs.PoWConfig

func (*PoWDeviceMng) DoMining

func (c *PoWDeviceMng) DoMining(stopmark *byte, inputCh chan *itfcs.PoWStuffBriefData) (*itfcs.PoWResultData, error)

find block

func (*PoWDeviceMng) Init

func (c *PoWDeviceMng) Init() error

func (*PoWDeviceMng) StopMining

func (c *PoWDeviceMng) StopMining()

type PoWMasterMng

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

func NewPoWMasterMng

func NewPoWMasterMng(alloter itfcs.PoWExecute) *PoWMasterMng

func (*PoWMasterMng) Config

func (m *PoWMasterMng) Config() itfcs.PoWConfig

func (*PoWMasterMng) DoMining

func (m *PoWMasterMng) DoMining(input interfaces.Block, resCh chan interfaces.Block) error

find a block

func (*PoWMasterMng) Init

func (m *PoWMasterMng) Init() error

func (*PoWMasterMng) StopMining

func (m *PoWMasterMng) StopMining()

type PoWThreadMng

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

func NewPoWThreadMng

func NewPoWThreadMng(exec itfcs.PoWExecute) *PoWThreadMng

func (*PoWThreadMng) Config

func (c *PoWThreadMng) Config() itfcs.PoWConfig

func (*PoWThreadMng) DoMining

func (c *PoWThreadMng) DoMining(stopmark *byte, target_hash fields.Hash, input itfcs.PoWStuffBriefData, stepHxCh chan fields.Hash, resCh chan *itfcs.PoWResultData) error

func (*PoWThreadMng) Init

func (c *PoWThreadMng) Init() error

func (*PoWThreadMng) StopMining

func (c *PoWThreadMng) StopMining()

type PoWWokerMng

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

func NewPoWWorkerMng

func NewPoWWorkerMng(alloter itfcs.PoWExecute) *PoWWokerMng

func (*PoWWokerMng) CloseUploadHashrate

func (w *PoWWokerMng) CloseUploadHashrate()

func (*PoWWokerMng) Config

func (c *PoWWokerMng) Config() itfcs.PoWConfig

func (*PoWWokerMng) DoMining

find block

func (*PoWWokerMng) Init

func (w *PoWWokerMng) Init() error

func (*PoWWokerMng) StopMining

func (w *PoWWokerMng) StopMining()

Jump to

Keyboard shortcuts

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