/************************************************
  Inner functions
************************************************/
500270
func (api *IconAPI) setStateValue(setFunc func(*sacloud.Request)) *IconAPI {
	api.baseAPI.setStateValue(setFunc)
	return api
}
262670
func (m Module) Function(name string) (Function, error) {
	var fn Function
	cstr := C.CString(name)
	defer C.free(unsafe.Pointer(cstr))
	err := result(C.cuModuleGetFunction(&fn.fn, m.mod, cstr))
	return fn, err
}
801279
func (qb *MySQLQueryBuilder) InnerJoin(table string) QueryBuilder {
	qb.Tokens = append(qb.Tokens, "INNER JOIN", table)
	return qb
}
1259234
func findFunction(name string) (reflect.Value, bool) {
	if fn := builtinFuncs[name]; fn.IsValid() {
		return fn, true
	}
	return reflect.Value{}, false
}
50923
func (b *InsertBuilder) FuncColumn(column string, fn *Func) *InsertBuilder {
	b.columns = append(b.columns, initializer{
		column: column,
		value:  fn,
	})
	return b
}
936779
func (t *Trainer) Init() (err error) {
	f := func() {
		err = t.nn.init()
	}
	t.once.Do(f)
	return
}
71741
func interpolationFuncAbs() ast.Function {
	return ast.Function{
		ArgTypes:   []ast.Type{ast.TypeFloat},
		ReturnType: ast.TypeFloat,
		Callback: func(args []interface{}) (interface{}, error) {
			return math.Abs(args[0].(float64)), nil
		},
	}
}
855419
func main() {
	if len(os.Args) != 4 {
		fmt.Fprintf(os.Stderr, "expected 3 arguments, got %d\n", len(os.Args)-1)
		exit.Exit(1)
	}

	// No error checking here, it's a contrived example after all.
	a, _ := strconv.Atoi(os.Args[2])
	b, _ := strconv.Atoi(os.Args[3])

	var op func(int, int) int
	switch os.Args[1] {
	case "add":
		op = add
	case "sub":
		op = sub
	default:
		fmt.Fprintf(os.Stderr, "unknown operation: %s\n", os.Args[1])
		exit.Exit(1)
	}

	fmt.Println(op(a, b))
}
260617
func _() {
	var _ Event = (*Absolute)(nil)        // assert *Absolute implements Event
	var _ Event = (*FAbsolute)(nil)       // assert *FAbsolute implements Event
	var _ Event = (*Gauge)(nil)           // assert *Gauge implements Event
	var _ Event = (*FGauge)(nil)          // assert *FGauge implements Event
	var _ Event = (*GaugeDelta)(nil)      // assert *GaugeDelta implements Event
	var _ Event = (*FGaugeDelta)(nil)     // assert *FGaugeDelta implements Event
	var _ Event = (*Increment)(nil)       // assert *Increment implements Event
	var _ Event = (*PrecisionTiming)(nil) // assert *PrecisionTiming implements Event
	var _ Event = (*Timing)(nil)          // assert *Timing implements Event
	var _ Event = (*Total)(nil)           // assert *Total implements Event
}
726922
func (t *Table) InnerJoinOn(
	table ReadableTable,
	onCondition BoolExpression) ReadableTable {

	return InnerJoinOn(t, table, onCondition)
}
530345
func (s *Adaptor) Function(name string, args string) (val int, err error) {
	params := url.Values{
		"args":         {args},
		"access_token": {s.AccessToken},
	}

	url := fmt.Sprintf("%s/%s", s.deviceURL(), name)
	resp, err := s.request("POST", url, params)

	if err != nil {
		return -1, err
	}

	val = int(resp["return_value"].(float64))
	return
}
1052655
func functions(decl *cc.Declarator) bool {
	if !strings.HasPrefix(bindgen.NameOf(decl), "cudnn") {
		return false
	}
	if decl.Type.Kind() == cc.Function {
		return true
	}
	return false

}
1080482
func Fn(name string, paramNames ...string) *Func {
	return &Func{
		Name:       name,
		ParamNames: paramNames,
	}
}
974331
func FnJoin(name string, input interface{}, template interface{}) interface{} {

	// Check the input is an array
	if arr, ok := input.([]interface{}); ok {

		switch len(arr) {
		case 0:
			return nil
		case 1:
			return arr[0]
		default:

			// Fn::Join can be used with a delimeter and an array of parts, like so:
			// "Fn::Join": ["," [ "apples", "pears" ]]
			// Or it can be used without a delimiter, and just join the contents
			// "Fn::Join": ["apples", "pears"]
			// Check if the 2nd element of the array is an array, if so, use the first element as the delimiter

			delim := ""
			parts := []string{}
			for i, value := range arr {

				if i == 0 {
					// If the second element is not a string (and is an array), use this first element as a delimiter
					if _, ok := arr[i+1].([]interface{}); ok {
						if d, ok := value.(string); ok {
							delim = d
							continue
						}
					}
				}

				switch v := value.(type) {
				case string:
					// This element is a string; add it to the array of parts that need joining
					parts = append(parts, v)
				case []interface{}:
					// This element is an array; check if it contains strings and add them to the array of parts that need joining
					for _, subvalue := range v {
						if str, ok := subvalue.(string); ok {
							parts = append(parts, str)
						}
					}
				}

			}

			return strings.Join(parts, delim)

		}
	}

	return nil

}
796469
func (me *Dataset) InnerJoin(table Expression, condition joinExpression) *Dataset {
	return me.joinTable(INNER_JOIN, table, condition)
}
641321
func NewFunction(ctx sessionctx.Context, funcName string, retType *types.FieldType, args ...Expression) (Expression, error) {
	return newFunctionImpl(ctx, true, funcName, retType, args...)
}
101438
func GetFunction(function interface{}) *runtime.Func {
	return runtime.FuncForPC(reflect.ValueOf(function).Pointer())
}