tensority

package
Version: v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AIHash  = NewCache() // AIHash is created for let different package share same cache
	UseSIMD = false
)

Functions

This section is empty.

Types

type Cache

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

Cache is create for cache the tensority result

func NewCache

func NewCache() *Cache

NewCache create a cache struct

func (*Cache) AddCache

func (a *Cache) AddCache(hash, seed, result *bc.Hash)

AddCache is used for add tensority calculate result

func (*Cache) Hash

func (a *Cache) Hash(hash, seed *bc.Hash) *bc.Hash

Hash is the real entry for call tensority algorithm

func (*Cache) RemoveCache

func (a *Cache) RemoveCache(hash, seed *bc.Hash)

RemoveCache clean the cached result

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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