vectors

package
v0.0.0-...-d20b9d2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dot

func Dot(thunkGen func() DotThunk, length int)

Dot is a generic dot product function.

We assume that the thunkGen generates a new
thunk for each thread to use.  The length is
how long the array is

func DotFloat32

func DotFloat32(a, b []float32) float32

DotFloat32 performs a dot product on two arrays of float32

func DotFloat64

func DotFloat64(a, b []float64) float64

DotFloat64 performs a dot product on two arrays of float64

func DotInt

func DotInt(a, b []int) int

DotInt performs a dot product on two arrays of float64

func DotInt32

func DotInt32(a, b []int32) int32

DotInt32 performs a dot product on two arrays of float64

func DotInt64

func DotInt64(a, b []int64) int64

DotInt64 performs a dot product on two arrays of float64

Types

type DotThunk

type DotThunk struct {
	Save  func()
	Dot   func(int, int)
	Print func(int)
}

DotThunk encapsulates common operations among all dot products

Save	-	When a thread has reached the end of its exection it calls Save
Dot		-	On each iteration we call Dot

Jump to

Keyboard shortcuts

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