Documentation
¶
Overview ¶
Package et defines execution tree
Index ¶
- Constants
- func Unsupported(message string) (internal.Compute, error)
- type Control
- type IntSwitchCase
- type MapEntry
- type New
- func NewAssignExpr(trackPos []uint16, ops ...*Operand) New
- func NewBinaryExpr(op token.Token, operands ...*Operand) (New, reflect.Type)
- func NewBlockStmt(newStatementsFn []New, forStmt bool) New
- func NewBranchStmt(tkn token.Token, labelID uint32) (New, error)
- func NewCallExprAssign(caller exec.Caller, args []*Operand, dest []*Operand) (New, error)
- func NewCaller(caller exec.Caller, args []*Operand) (New, error)
- func NewCallerStmt(caller exec.Caller, args []*Operand) (New, error)
- func NewComposite(cType reflect.Type, operands Operands) New
- func NewControlBlockStmt(newStatementsFn []New) New
- func NewDelete(m, key *Operand) (New, error)
- func NewForComplexStateStmt(init New, iOffset uintptr, limit int, ...) (New, error)
- func NewForIntAccConstStmt(init New, destOffset, iOffset uintptr, cmpOp token.Token, limit, delta int, ...) (New, error)
- func NewForIntAddConstStmt(init New, destOffset, iOffset uintptr, cmpOp token.Token, limit, delta int) (New, error)
- func NewForIntCallConstStmt(init New, iOffset uintptr, cmpOp token.Token, limit, delta int, call func(int)) (New, error)
- func NewForIntCallGuardConstStmt(init New, iOffset uintptr, cmpOp token.Token, limit, delta int, call func(int), ...) (New, error)
- func NewForIntConstStmt(init, body New, iOffset uintptr, cmpOp token.Token, limit, delta int, ...) (New, error)
- func NewForMergeCompareIntSliceStmt(init New, ...) (New, error)
- func NewForMergeCopyIntSliceStmt(init New, idxOffset, limitOffset, dstOffset, srcOffset uintptr) (New, error)
- func NewForMergeCopyWithKIntSliceStmt(init New, idxOffset, limitOffset, kOffset, dstOffset, srcOffset uintptr) (New, error)
- func NewForStmt(cond *Operand, init, post, body New, labelID uint32) (New, error)
- func NewGroupStmt(newStatementsFn []New, stmt bool) New
- func NewIfStmt(cond *Operand, whenBranch, elseBranch New) (New, error)
- func NewIncDec(tok token.Token, op *Operand) New
- func NewInt64Cast(x *Operand) (New, error)
- func NewIntSwitchStmt(tag *Operand, cases []IntSwitchCase, defaultBody New, labelID uint32) (New, error)
- func NewJumpBlockStmt(newStatementsFn []New, labels map[uint32]int, forStmt bool) New
- func NewLen(x *Operand) (New, reflect.Type, error)
- func NewMake(destType reflect.Type, args Operands) (New, reflect.Type, error)
- func NewMapComposite(cType reflect.Type, entries []MapEntry) New
- func NewMapGet(m, key *Operand) (New, reflect.Type, error)
- func NewMapGet2Assign(m, key, valueDest, okDest *Operand) (New, error)
- func NewMapSet(m, key, value *Operand) (New, error)
- func NewMapper(x *exec.Selector, params []*exec.Selector, results []*exec.Selector, body New) (New, reflect.Type, error)
- func NewNop() New
- func NewRange(x *Operand, key, value *exec.Selector, body New, labelID uint32) (New, error)
- func NewReducer(x *exec.Selector, params []*exec.Selector, results []*exec.Selector, ...) (New, reflect.Type, error)
- func NewReturnStmt(retOperands Operands, results []*exec.Selector) (New, error)
- func NewSliceGetInt(slice, index *Operand) (New, reflect.Type, error)
- func NewSliceSetInt(slice, index, value *Operand) (New, error)
- func NewStarExpr(operand *Operand) (New, error)
- func NewSwitchStmt(cases []SwitchCase, defaultBody New, labelID uint32) (New, error)
- func NewTypeAssert(x *Operand, target reflect.Type) (New, reflect.Type, error)
- func NewTypeAssert2Assign(x *Operand, target reflect.Type, valueDest, okDest *Operand) (New, error)
- func NewTypeSwitchStmt(x *Operand, cases []TypeSwitchCase, defaultBody New, labelID uint32) (New, error)
- type Operand
- type Operands
- type SwitchCase
- type TypeSwitchCase
Constants ¶
const ( ForIntCallGuardKindNone = forIntCallGuardKindNone ForIntCallGuardKindCmp = forIntCallGuardKindCmp ForIntCallGuardKindModCmp = forIntCallGuardKindModCmp )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IntSwitchCase ¶ added in v0.3.0
IntSwitchCase represents a compiled int switch case.
type New ¶
New function creating a compute function
func NewAssignExpr ¶
NewAssignExpr create an assign expression
func NewBinaryExpr ¶
NewBinaryExpr creates binary expr
func NewBlockStmt ¶
NewBlockStmt crates block node
func NewBranchStmt ¶
NewBranchStmt create branch statment
func NewCallExprAssign ¶
NewCallExprAssign create an assign expression
func NewCallerStmt ¶ added in v0.3.0
NewCallerStmt creates a caller node for expression statements (result ignored).
func NewComposite ¶
NewComposite returns composite literal evaluator
func NewControlBlockStmt ¶ added in v0.3.0
NewControlBlockStmt creates block node that always honors break/continue/return flags.
func NewForComplexStateStmt ¶ added in v0.3.0
func NewForComplexStateStmt(init New, iOffset uintptr, limit int, sumOffset, countOffset, modeOffset, outputOffset, flagsOffset, scoresOffset uintptr, breakLimit int, breakOnGE bool) (New, error)
NewForComplexStateStmt creates a fused kernel for benchmark complex-state loop pattern.
func NewForIntAccConstStmt ¶ added in v0.3.0
func NewForIntAccConstStmt(init New, destOffset, iOffset uintptr, cmpOp token.Token, limit, delta int, assignOp token.Token, useLoopVar bool, rhsConst int, guardEnable bool, guardOp token.Token, guardConst int) (New, error)
NewForIntAccConstStmt creates fused int for-loop for assignment bodies like `sum += i`, `sum -= i`, `sum += 3`, `sum *= i`, optionally guarded by `if i < K`.
func NewForIntAddConstStmt ¶ added in v0.3.0
func NewForIntAddConstStmt(init New, destOffset, iOffset uintptr, cmpOp token.Token, limit, delta int) (New, error)
NewForIntAddConstStmt creates fused int for-loop for `dest += i` body.
func NewForIntCallConstStmt ¶ added in v0.3.0
func NewForIntCallConstStmt(init New, iOffset uintptr, cmpOp token.Token, limit, delta int, call func(int)) (New, error)
NewForIntCallConstStmt creates fused int for-loop for `fn(i)` body.
func NewForIntCallGuardConstStmt ¶ added in v0.3.0
func NewForIntCallGuardConstStmt(init New, iOffset uintptr, cmpOp token.Token, limit, delta int, call func(int), guardKind int, guardOp token.Token, guardConst, guardModBase int) (New, error)
NewForIntCallGuardConstStmt creates fused int for-loop for guarded call body: `if guard(i) { fn(i) }`.
func NewForIntConstStmt ¶ added in v0.3.0
func NewForIntConstStmt(init, body New, iOffset uintptr, cmpOp token.Token, limit, delta int, labelID uint32) (New, error)
NewForIntConstStmt creates a specialized for-loop with int counter and const limit.
func NewForMergeCompareIntSliceStmt ¶ added in v0.3.0
func NewForMergeCompareIntSliceStmt(init New, iOffset, jOffset, kOffset, midOffset, rightOffset, dataOffset, tmpOffset uintptr) (New, error)
NewForMergeCompareIntSliceStmt creates a fused loop for for i < mid && j < right { if data[i] <= data[j] { tmp[k] = data[i]; i++ } else { tmp[k] = data[j]; j++ }; k++ }.
func NewForMergeCopyIntSliceStmt ¶ added in v0.3.0
func NewForMergeCopyIntSliceStmt(init New, idxOffset, limitOffset, dstOffset, srcOffset uintptr) (New, error)
NewForMergeCopyIntSliceStmt creates a fused loop for for i < n { dst[i] = src[i]; i++ }.
func NewForMergeCopyWithKIntSliceStmt ¶ added in v0.3.0
func NewForMergeCopyWithKIntSliceStmt(init New, idxOffset, limitOffset, kOffset, dstOffset, srcOffset uintptr) (New, error)
NewForMergeCopyWithKIntSliceStmt creates a fused loop for for i < mid { tmp[k] = data[i]; i++; k++ }.
func NewForStmt ¶
NewForStmt creates a for stmt
func NewGroupStmt ¶
NewGroupStmt crates group node
func NewInt64Cast ¶ added in v0.3.0
NewInt64Cast creates int64 cast evaluator.
func NewIntSwitchStmt ¶ added in v0.3.0
func NewIntSwitchStmt(tag *Operand, cases []IntSwitchCase, defaultBody New, labelID uint32) (New, error)
NewIntSwitchStmt creates a typed int switch statement node.
func NewJumpBlockStmt ¶ added in v0.3.0
NewJumpBlockStmt creates block node with label-aware goto dispatch.
func NewMapComposite ¶ added in v0.3.0
NewMapComposite returns map composite literal evaluator.
func NewMapGet2Assign ¶ added in v0.3.0
NewMapGet2Assign creates a map index value/ok assignment evaluator.
func NewMapper ¶
func NewMapper(x *exec.Selector, params []*exec.Selector, results []*exec.Selector, body New) (New, reflect.Type, error)
NewMapper creates a mapper
func NewReducer ¶
func NewReducer(x *exec.Selector, params []*exec.Selector, results []*exec.Selector, init *Operand, body New) (New, reflect.Type, error)
NewReducer creates reducer
func NewReturnStmt ¶
NewReturnStmt creates a return stmt
func NewSliceGetInt ¶ added in v0.3.0
NewSliceGetInt creates []int index evaluator for expression slice[index].
func NewSliceSetInt ¶ added in v0.3.0
NewSliceSetInt creates []int index evaluator for assignment slice[index] = value.
func NewStarExpr ¶ added in v0.1.1
func NewSwitchStmt ¶ added in v0.3.0
func NewSwitchStmt(cases []SwitchCase, defaultBody New, labelID uint32) (New, error)
NewSwitchStmt creates a switch statement node.
func NewTypeAssert ¶ added in v0.3.0
NewTypeAssert creates type assertion expression evaluator.
func NewTypeAssert2Assign ¶ added in v0.3.0
NewTypeAssert2Assign creates value,ok type assertion assignment evaluator.
func NewTypeSwitchStmt ¶ added in v0.3.0
func NewTypeSwitchStmt(x *Operand, cases []TypeSwitchCase, defaultBody New, labelID uint32) (New, error)
NewTypeSwitchStmt creates a type switch statement.
type Operand ¶
type Operand struct {
Key string
Idx int
*exec.Selector
Type *xunsafe.Type
Value interface{}
ValuePtr unsafe.Pointer
New
}
Operand defines operand
func NewOperand ¶
NewOperand crates a new operand
func (*Operand) IsNilSelector ¶ added in v0.1.1
type Operands ¶
type Operands []*Operand
Operands represents opertands
func (Operands) NonNilOperand ¶ added in v0.1.1
type SwitchCase ¶ added in v0.3.0
SwitchCase represents a compiled switch case.
Source Files
¶
- assign.go
- binary.go
- block.go
- branchstmt.go
- call.go
- cast_int64.go
- composite.go
- compute.go
- control.go
- delete.go
- doc.go
- forstmt.go
- forstmt_complex_state.go
- forstmt_int.go
- forstmt_int_acc.go
- forstmt_int_add.go
- forstmt_int_call.go
- forstmt_int_call_guard.go
- forstmt_merge.go
- group.go
- ifstmt.go
- incdec.go
- len.go
- make.go
- map.go
- map_composite.go
- mapper.go
- operand.go
- oprands.go
- rangestmt.go
- reducer.go
- returnstmt.go
- slice_int.go
- star.go
- switchstmt.go
- switchstmt_int.go
- type.go
- typeassert.go
- typeswitch.go
- unsupported.go