simd

package
v0.0.0-...-06eb182 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() bool

func CpuId

func CpuId(info *[4]uint32, ax uint32)

func SSE2

func SSE2() bool

SSE2 returns true if the the CPU supports SSE2 instructions

func SSSE3

func SSSE3() bool

SSSE3 returns true if the the CPU supports SSSE3 instructions

Types

type Error

type Error struct {
	Err error
	Pos token.Pos
}

type F32x4

type F32x4 [4]float32

func AddF32x4

func AddF32x4(x, y F32x4) F32x4

func DivF32x4

func DivF32x4(x, y F32x4) F32x4

func MulF32x4

func MulF32x4(x, y F32x4) F32x4

func SubF32x4

func SubF32x4(x, y F32x4) F32x4

SubF32x4 subtracts y from x

type F64x2

type F64x2 [2]float64

func AddF64x2

func AddF64x2(x, y F64x2) F64x2

func DivF64x2

func DivF64x2(x, y F64x2) F64x2

func MulF64x2

func MulF64x2(x, y F64x2) F64x2

func SubF64x2

func SubF64x2(x, y F64x2) F64x2

SubF64x2 subtracts y from x

type File

type File struct {
	Info *types.Info
	Pkg  *types.Package
	// contains filtered or unexported fields
}

File holds a single parsed file and associated data.

func ParseFile

func ParseFile(f string) (*File, error)

ParseFile analyzes the single file passed in.

func (*File) Check

func (f *File) Check()

check type-checks the package. The package must be OK to proceed.

func (*File) ErrorLocation

func (f *File) ErrorLocation(err *Error) string

func (*File) Valid

func (f *File) Valid() *Error

Valid checks that the go constructs used in the file, f, are valid in the subset of go used in simd translation

The go subset allows funcs that are passed parameters of basic types or slices and arrays of basic types and return int, bool, or nothing In a func only simd var declarations are allowed and they must be at the beginning of the func. The func must be of the form

{simd var declarations} {var assignments} {for loop} (optional) {var assignments} {return}

type I128

type I128 [16]byte

type I16x8

type I16x8 [8]int16

func AddI16x8

func AddI16x8(x, y I16x8) I16x8

func MulI16x8

func MulI16x8(x, y I16x8) I16x8

func ShlI16x8

func ShlI16x8(x I16x8, shift uint8) I16x8

func ShrI16x8

func ShrI16x8(x I16x8, shift uint8) I16x8

func SubI16x8

func SubI16x8(x, y I16x8) I16x8

SubI16x8 subtracts y from x

type I32x4

type I32x4 [4]int32

func AddI32x4

func AddI32x4(x, y I32x4) I32x4

func MulI32x4

func MulI32x4(x, y I32x4) I32x4

func ShlI32x4

func ShlI32x4(x I32x4, shift uint8) I32x4

func ShrI32x4

func ShrI32x4(x I32x4, shift uint8) I32x4

func ShuffleI32x4

func ShuffleI32x4(x I32x4, order uint8) I32x4

func SubI32x4

func SubI32x4(x, y I32x4) I32x4

SubI32x4 subtracts y from x

type I64x2

type I64x2 [2]int64

func AddI64x2

func AddI64x2(x, y I64x2) I64x2

func ShlI64x2

func ShlI64x2(x, shift uint8) I64x2

func SubI64x2

func SubI64x2(x, y I64x2) I64x2

SubI64x2 subtracts y from x

type I8x16

type I8x16 [16]int8

SIMD types

func AddI8x16

func AddI8x16(x, y I8x16) I8x16

func SubI8x16

func SubI8x16(x, y I8x16) I8x16

SubI8x16 subtracts y from x

type M128

type M128 [4]float32

type M128d

type M128d [2]float64

type M128i

type M128i [16]byte

SSE2 types

type U128

type U128 [16]byte

type U16x8

type U16x8 [8]uint16

func AddU16x8

func AddU16x8(x, y U16x8) U16x8

func MulU16x8

func MulU16x8(x, y U16x8) U16x8

func ShlU16x8

func ShlU16x8(x U16x8, shift uint8) U16x8

func ShrU16x8

func ShrU16x8(x U16x8, shift uint8) U16x8

func SubU16x8

func SubU16x8(x, y U16x8) U16x8

SubU16x8 subtracts y from x

type U32x4

type U32x4 [4]uint32

func AddU32x4

func AddU32x4(x, y U32x4) U32x4

func MulU32x4

func MulU32x4(x, y U32x4) U32x4

func ShlU32x4

func ShlU32x4(x U32x4, shift uint8) U32x4

func ShrU32x4

func ShrU32x4(x U32x4, shift uint8) U32x4

func ShuffleU32x4

func ShuffleU32x4(x U32x4, order uint8) U32x4

func SubU32x4

func SubU32x4(x, y U32x4) U32x4

SubU32x4 subtracts y from x

type U64x2

type U64x2 [2]uint64

func AddU64x2

func AddU64x2(x, y U64x2) U64x2

func ShlU64x2

func ShlU64x2(x, shift uint8) U64x2

func ShrU64x2

func ShrU64x2(x, shift uint8) U64x2

func SubU64x2

func SubU64x2(x, y U64x2) U64x2

SubU64x2 subtracts y from x

type U8x16

type U8x16 [16]uint8

func AddU8x16

func AddU8x16(x, y U8x16) U8x16

func SubU8x16

func SubU8x16(x, y U8x16) U8x16

SubU8x16 subtracts y from x

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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