Documentation
¶
Index ¶
- Variables
- func Absr(a float32) float32
- func AllStrOptions(o []interface{}, t ...interface{}) []string
- func AsMap(s interface{}) map[string]reflect.Value
- func Avgr(a []float32) float32
- func BoolOption(t interface{}, o []interface{}) bool
- func Contains(cont interface{}, val interface{}) bool
- func Convert(v reflect.Value, na bool, tp reflect.Type) reflect.Value
- func ConvertSlice(v reflect.Value, na Bits, tp reflect.Type, nocopy ...bool) reflect.Value
- func Copy(writer io.Writer, reader io.Reader, opts ...interface{}) (count int, err error)
- func CopySlice(a interface{}) interface{}
- func Cord(x, y []float64) float64
- func Corr(x, y []float32) float64
- func Fast32f(s string) (float32, error)
- func FieldsOf(s interface{}) []string
- func Flatnr(a [][]float32) []float32
- func FloatOption(t interface{}, o []interface{}) float64
- func Fnz(a ...interface{}) interface{}
- func Fnzb(e ...bool) bool
- func Fnzd(a ...float64) float64
- func Fnze(e ...error) error
- func Fnzi(a ...int) int
- func Fnzl(a ...int64) int64
- func Fnzr(a ...float32) float32
- func Fnzs(e ...string) string
- func Ife(expr bool, x interface{}, y interface{}) interface{}
- func Ifed(expr bool, x float64, y float64) float64
- func Ifei(expr bool, x int, y int) int
- func Ifel(expr bool, x int64, y int64) int64
- func Ifer(expr bool, x float32, y float32) float32
- func Ifes(expr bool, x string, y string) string
- func Ifev(expr bool, x reflect.Value, y reflect.Value) reflect.Value
- func IfsOption(t interface{}, o []interface{}) interface{}
- func Index(i int, p interface{}) unsafe.Pointer
- func IndexOf(a string, b []string) int
- func IndexOfMax(a interface{}) int
- func IndexOfMin(a interface{}) int
- func Indmaxd(a []float64) int
- func Indmind(a []float64) int
- func IntOption(t interface{}, o []interface{}) int
- func Isna(v reflect.Value) bool
- func KeysOf(m interface{}) interface{}
- func Less(a, b reflect.Value) bool
- func MapInterface(m map[string]reflect.Value) map[string]interface{}
- func Max(a ...interface{}) interface{}
- func MaxIndex(a reflect.Value) int
- func MaxValue(a reflect.Value) reflect.Value
- func Maxd(a float64, b ...float64) float64
- func Maxi(a int, b ...int) int
- func Maxr(a float32, b ...float32) float32
- func Meanr(a []float32) float32
- func Min(a ...interface{}) interface{}
- func MinIndex(a reflect.Value) int
- func MinMaxr(a []float32) (float32, float32)
- func MinValue(a reflect.Value) reflect.Value
- func Mind(a float64, b ...float64) float64
- func Mini(a int, b ...int) int
- func Minr(a float32, b ...float32) float32
- func ModelPath(s string) string
- func Mse(a, b []float32) float32
- func MultiOption(o []interface{}, t ...interface{}) (reflect.Value, int)
- func Nan(tp reflect.Type) reflect.Value
- func OnlyFilter(names []string, c ...string) func(Struct) Struct
- func Option(t interface{}, o interface{}) reflect.Value
- func Pattern(pattern string) func(string) bool
- func RandomIndex(ln, seed int) []int
- func RandomInts(seed int, count int) []int
- func Rank(a []float32, first ...bool) []float32
- func RankPct(a []float32, first ...bool) []float32
- func Reverse(slice interface{})
- func Reversed(slice interface{}) interface{}
- func Rindmaxd(a []float64) int
- func Rindmind(a []float64) int
- func Round32(v float32, n int) float32
- func Round32s(v []float32, n int) []float32
- func Round64(v float64, n int) float64
- func Round64s(v []float64, n int) []float64
- func RuneOption(t interface{}, o []interface{}) rune
- func Seed(seed int) int
- func Seed32(seed int) uint32
- func Seed64(seed int) int64
- func Sigmar(a []float32) float64
- func Slow32f(s string) (float32, error)
- func Sort(a interface{})
- func Sorted(a interface{}) interface{}
- func SortedKeysOf(m interface{}) interface{}
- func Starsub(pattern, subst string) func(string) (string, bool)
- func StrMultiOption(o []interface{}, t ...interface{}) (string, int)
- func StrOption(t interface{}, o []interface{}) string
- func Strings(m interface{}) (r []string)
- func TensorUnpacker(lr Struct, c string) func(lr Struct) Struct
- func Transformer(rt reflect.Type) func(reflect.Value, reflect.Value) reflect.Value
- func Unwrapper(v reflect.Type) func(lr Struct) reflect.Value
- func ValsOf(m interface{}) interface{}
- func Varr(a []float32) float64
- func Words(l int) int
- func Wrapper(rt reflect.Type) func(reflect.Value) Struct
- type AtomicCounter
- type AtomicFlag
- type AtomicMask_
- type AtomicPool_
- type AtomicSingleIndex
- type Bits
- func (q Bits) Append(z Bits, at int) Bits
- func (q Bits) Bit(i int) bool
- func (q Bits) Copy() Bits
- func (q Bits) Count() (n int)
- func (q Bits) Grow(cap int) Bits
- func (q Bits) Len() int
- func (q *Bits) Or_(a Bits)
- func (q Bits) Repr() string
- func (q *Bits) Set(i int, v bool)
- func (q Bits) Slice(from, to int) Bits
- func (q Bits) String() string
- func (q Bits) Word(i int) uint
- type Cell
- func (c Cell) Float() float64
- func (c Cell) Int() int
- func (c Cell) Int16() int16
- func (c Cell) Int32() int32
- func (c Cell) Int64() int64
- func (c Cell) Int8() int8
- func (c Cell) Real() float32
- func (c Cell) Reals(docopy ...bool) []float32
- func (c Cell) String() string
- func (c Cell) Text() string
- func (c Cell) Uint() uint
- func (c Cell) Uint16() uint16
- func (c Cell) Uint32() uint32
- func (c Cell) Uint64() uint64
- func (c Cell) Uint8() uint8
- func (c Cell) Values() interface{}
- func (c Cell) Volume() int
- type CopyBufferSize
- type CopyProgress
- type Fixed8
- type Lexic
- type NaiveRandom
- type Struct
- func (lr Struct) Copy(extra int) Struct
- func (lr Struct) Float(c string) float64
- func (lr Struct) Index(c string) Cell
- func (lr Struct) Int(c string) int
- func (lr Struct) Pos(c string) int
- func (lr Struct) Real(c string) float32
- func (lr Struct) Round(p int) Struct
- func (lr Struct) Set(c string, val reflect.Value) Struct
- func (lr Struct) String() string
- func (lr Struct) Text(c string) string
- func (lr Struct) UnpackTensor(c string) Struct
- func (lr Struct) Value(c string) reflect.Value
- func (lr Struct) ValueAt(i int) reflect.Value
- func (lrx Struct) With(lr Struct) (r Struct)
- type Tensor
- func DecodeTensor(string) (t Tensor, err error)
- func MakeByteTensor(channels, height, width int, values []byte, docopy ...bool) Tensor
- func MakeFixed8Tensor(channels, height, width int, values []Fixed8, docopy ...bool) Tensor
- func MakeFloat32Tensor(channels, height, width int, values []float32, docopy ...bool) Tensor
- func MakeFloat64Tensor(channels, height, width int, values []float64, docopy ...bool) Tensor
- func MakeIntTensor(channels, height, width int, values []int, docopy ...bool) Tensor
- type VersionType
- type WaitCounter
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ConvertSlice ¶
func Copy ¶
func Ife ¶
func Ife(expr bool, x interface{}, y interface{}) interface{}
Ife returns x if expr == true else returns y
func Ifed ¶
Ifed returns x if expr == true else returns y
func Ifel ¶
Ifel returns x if expr == true else returns y
func Ifer ¶
Ifer returns x if expr == true else returns y
func Ifes ¶
Ifes returns x if expr == true else returns y
func Ifev ¶
Ifev returns x if expr == true else returns y
func IfsOption ¶
func IfsOption(t interface{}, o []interface{}) interface{}
func Less ¶
Less compares two values and returns true if the left value is less than right one otherwise it returns false
func Reverse ¶
func Reverse(slice interface{})
func Reversed ¶
func Reversed(slice interface{}) interface{}
func Sort ¶
func Sort(a interface{})
func Sorted ¶
func Sorted(a interface{}) interface{}
func SortedKeysOf ¶
func SortedKeysOf(m interface{}) interface{}
SortedKeysOf returns sorted list of keys of a map
func Transformer ¶
func ValsOf ¶
func ValsOf(m interface{}) interface{}
Types ¶
type AtomicCounter ¶
type AtomicCounter struct {
Value uint64
}
AtomicCounter - hm, yes it's atomic counter
func (*AtomicCounter) Dec ¶
func (c *AtomicCounter) Dec() uint64
Dec decrements counter and returns NEW value
func (*AtomicCounter) PostInc ¶
func (c *AtomicCounter) PostInc() uint64
PostInc increments counter and returns OLD value
type AtomicMask_ ¶
type AtomicMask_ struct {
// contains filtered or unexported fields
}
func AtomicMask ¶
func AtomicMask(width int) *AtomicMask_
func ExtendableAtomicMask ¶
func ExtendableAtomicMask(canextend func(int) bool) *AtomicMask_
func (*AtomicMask_) FinCallForAll ¶
func (a *AtomicMask_) FinCallForAll(f func(no int))
func (*AtomicMask_) Lock ¶
func (a *AtomicMask_) Lock() int
func (*AtomicMask_) Unlock ¶
func (a *AtomicMask_) Unlock(i int)
type AtomicPool_ ¶
type AtomicPool_ struct {
// contains filtered or unexported fields
}
func AtomicPool ¶
func AtomicPool(acquire func(no int) interface{}) *AtomicPool_
func (*AtomicPool_) Allocate ¶
func (a *AtomicPool_) Allocate() (interface{}, int)
func (*AtomicPool_) Close ¶
func (a *AtomicPool_) Close()
func (*AtomicPool_) Release ¶
func (a *AtomicPool_) Release(n int)
type AtomicSingleIndex ¶
type AtomicSingleIndex struct {
// contains filtered or unexported fields
}
AtomicSingleIndex - it's an atomic positive integer single set value
func (*AtomicSingleIndex) Get ¶
func (c *AtomicSingleIndex) Get() (int, bool)
Get returns index value
func (*AtomicSingleIndex) Set ¶
func (c *AtomicSingleIndex) Set(value int) (int, bool)
Set sets value if it was not set before
type Bits ¶
type Bits struct {
// contains filtered or unexported fields
}
type Cell ¶
type Fixed8 ¶
type Fixed8 struct {
// contains filtered or unexported fields
}
value in range [-1..1] with 2 digits precession
type Lexic ¶
type NaiveRandom ¶
type NaiveRandom struct {
Value uint32
}
func (*NaiveRandom) Float ¶
func (nr *NaiveRandom) Float() float64
func (*NaiveRandom) Int ¶
func (nr *NaiveRandom) Int() int
func (*NaiveRandom) Reseed ¶
func (nr *NaiveRandom) Reseed()
func (*NaiveRandom) Uint ¶
func (nr *NaiveRandom) Uint() uint
func (*NaiveRandom) Uint32 ¶
func (nr *NaiveRandom) Uint32() (r uint32)
type Struct ¶
type Tensor ¶
type Tensor struct {
// contains filtered or unexported fields
}
func DecodeTensor ¶
gets base64-encoded compressed stream as a string prefixed by \xE2\x9C\x97` (✗`)
func MakeByteTensor ¶
func MakeFixed8Tensor ¶
func MakeFloat32Tensor ¶
func MakeFloat64Tensor ¶
func MakeIntTensor ¶
type VersionType ¶
type VersionType int
func MakeVersion ¶
func MakeVersion(major, minor, patch int) VersionType
func (VersionType) Major ¶
func (v VersionType) Major() int
func (VersionType) Minor ¶
func (v VersionType) Minor() int
func (VersionType) Patch ¶
func (v VersionType) Patch() int
func (VersionType) String ¶
func (v VersionType) String() string
type WaitCounter ¶
type WaitCounter struct { Value uint64 // contains filtered or unexported fields }
WaitCounter implements barrier counter for lazy flow execution synchronization
func (*WaitCounter) Inc ¶
func (c *WaitCounter) Inc() (r bool)
PostInc increments index and notifies waiting goroutines
func (*WaitCounter) Stop ¶
func (c *WaitCounter) Stop()
Stop sets Integer to ~uint64(0) and notifies waiting goroutines. It means also counter will not increment more
func (*WaitCounter) Stopped ¶
func (c *WaitCounter) Stopped() bool
Stopped returns true if counter is stopped and will not increment more
func (*WaitCounter) Wait ¶
func (c *WaitCounter) Wait(index uint64) (r bool)
Wait waits until counter Integer is not equal to specified index
Source Files
¶
- atomic.go
- bits.go
- cell.go
- convert.go
- copy.go
- counter.go
- cov.go
- fields.go
- fixed.go
- floats32.go
- fnz.go
- ife.go
- index.go
- indexof.go
- iocopy.go
- keysof.go
- less.go
- lexic.go
- mapifs.go
- mask.go
- minmax.go
- naivernd.go
- option.go
- path.go
- pattern.go
- pool.go
- rank.go
- reverse.go
- round.go
- sort.go
- struct.go
- tensor.go
- types.go
- values.go
- version.go