worker

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2018 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CryptonightIter uint32 = 0x80000
View Source
var CryptonightLiteIter uint32 = 0x40000
View Source
var CryptonightLiteMask uint32 = 0xFFFF0
View Source
var CryptonightLiteMemory uint32 = 1048576
View Source
var CryptonightMask uint32 = 0x1FFFF0
View Source
var CryptonightMemory uint32 = 2097152
View Source
var NonceIndex = 39

NonceIndex is the starting location of nonce in binary blob

View Source
var NonceWidth = 4

NonceWidth is the char width of nonce in binary blob

Functions

func List

func List() map[string]Capabilities

Types

type CLDeviceConfig

type CLDeviceConfig struct {
	Intensity int
	Device    *opencl.Device
}

type CPUStats

type CPUStats struct {
	Index    int     `json:"index"`
	Hashrate float32 `json:"hashrate"`
}

type Capabilities

type Capabilities struct {
	CPU    bool `json:"cpu"`
	OpenCL bool `json:"opencl"`
	CUDA   bool `json:"cuda"`
}

type Config

type Config struct {
	Stratum    stratum.Client
	Donate     int
	Processors []ProcessorConfig
	CLDevices  []CLDeviceConfig
}

type GPUStats

type GPUStats struct {
	Platform int     `json:"platform"`
	Index    int     `json:"index"`
	Hashrate float32 `json:"hashrate"`
}

type ProcessorConfig

type ProcessorConfig struct {
	Threads   int
	Processor *processor.Processor
}

type Stats

type Stats struct {
	CPUStats []CPUStats `json:"cpu_stats"`
	GPUStats []GPUStats `json:"gpu_stats"`
}

type Worker

type Worker interface {
	Work() error
	Capabilities() Capabilities
	Stats() Stats
}

func New

func New(coin string, config Config) (Worker, error)

func NewCryptonight

func NewCryptonight(config Config, lite bool) Worker

Jump to

Keyboard shortcuts

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