Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 3,778 for afunc (0.04 sec)

  1. src/cmd/go/testdata/script/cover_coverpkg_with_init.txt

    import (
    	"M/a"
    	"M/b"
    )
    
    func MFunc() string {
    	return "42"
    }
    
    func M2Func() int {
    	return a.AFunc() + b.BFunc()
    }
    
    func init() {
    	println("package 'main' init")
    }
    
    func main() {
    	println(a.AFunc() + b.BFunc())
    }
    -- main/main_test.go --
    package main
    
    import "testing"
    
    func TestMain(t *testing.T) {
    	if MFunc() != "42" {
    		t.Fatalf("bad!")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 30 12:33:44 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  2. src/cmd/go/testdata/script/cover_coverprofile_multipkg.txt

    # Make sure resulting profile is digestible.
    go tool cover -func=cov.p
    
    # No extraneous extra files please.
    ! exists _cover_.out
    
    -- a/a.go --
    package a
    
    func init() {
    	println("package 'a' init: launch the missiles!")
    }
    
    func AFunc() int {
    	return 42
    }
    -- a/a_test.go --
    package a
    
    import "testing"
    
    func TestA(t *testing.T) {
    	if AFunc() != 42 {
    		t.Fatalf("bad!")
    	}
    }
    -- aa/aa.go --
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 04 17:02:36 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/cover_coverpkg_partial.txt

    func TestB(t *testing.T) {
    	if BFunc() == 1010101 {
    		t.Fatalf("bad!")
    	}
    }
    -- c/c.go --
    package c
    
    var G int
    
    func CFunc(x, y int) int {
    	G += x
    	G -= y
    	return x + y
    }
    -- c/c_test.go --
    package c
    
    import "testing"
    
    func TestC(t *testing.T) {
    	if CFunc(10, 10) == 1010101 {
    		t.Fatalf("bad!")
    	}
    }
    -- d/d.go --
    package d
    
    const FortyTwo = 42
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 20:12:49 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  4. src/cmd/cover/testdata/pkgcfg/a/a.go

    package a
    
    type Atyp int
    
    func (ap *Atyp) Set(q int) {
    	*ap = Atyp(q)
    }
    
    func (ap Atyp) Get() int {
    	inter := func(q Atyp) int {
    		return int(q)
    	}
    	return inter(ap)
    }
    
    var afunc = func(x int) int {
    	return x + 1
    }
    var Avar = afunc(42)
    
    func A(x int) int {
    	if x == 0 {
    		return 22
    	} else if x == 1 {
    		return 33
    	}
    	return 44
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 28 11:48:40 UTC 2022
    - 330 bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ir/func.go

    	fn.SetTypecheck(1)
    
    	name.Func = fn
    
    	return fn
    }
    
    func (f *Func) isStmt() {}
    
    func (n *Func) copy() Node                                  { panic(n.no("copy")) }
    func (n *Func) doChildren(do func(Node) bool) bool          { return doNodes(n.Body, do) }
    func (n *Func) editChildren(edit func(Node) Node)           { editNodes(n.Body, edit) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/tests/graphdef2mlir/mlir_passthrough_op.pbtxt

    # RUN: tf-mlir-translate -graphdef-to-mlir -tf-enable-shape-inference-on-import=false %s | FileCheck %s
    
    # CHECK:"tf.MlirPassthroughOp"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  7. test/ken/mfunc.go

    // license that can be found in the LICENSE file.
    
    // Test simple multi-argument multi-valued function.
    
    package main
    
    func
    main() {
    	var x,y int;
    
    	x,y = simple(10,20,30);
    	if x+y != 65 { panic(x+y); }
    }
    
    func
    simple(ia,ib,ic int) (oa,ob int) {
    	return ia+5, ib+ic;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 386 bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/func.go

    // (Call typecheck.Func instead.)
    func tcFunc(n *ir.Func) {
    	if base.EnableTrace && base.Flag.LowerT {
    		defer tracePrint("tcFunc", n)(nil)
    	}
    
    	if name := n.Nname; name.Typecheck() == 0 {
    		base.AssertfAt(name.Type() != nil, n.Pos(), "missing type: %v", name)
    		name.SetTypecheck(1)
    	}
    }
    
    // tcCall typechecks an OCALL node.
    func tcCall(n *ir.CallExpr, top int) ir.Node {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/func.go

    }
    func (f *Func) ConstInt32(t *types.Type, c int32) *Value {
    	return f.constVal(OpConst32, t, int64(c), true)
    }
    func (f *Func) ConstInt64(t *types.Type, c int64) *Value {
    	return f.constVal(OpConst64, t, c, true)
    }
    func (f *Func) ConstFloat32(t *types.Type, c float64) *Value {
    	return f.constVal(OpConst32F, t, int64(math.Float64bits(float64(float32(c)))), true)
    }
    func (f *Func) ConstFloat64(t *types.Type, c float64) *Value {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/func.h

    #define TENSORFLOW_COMPILER_MLIR_QUANTIZATION_COMMON_FUNC_H_
    
    #include "mlir/Dialect/Func/IR/FuncOps.h"  // from @llvm-project
    #include "mlir/IR/BuiltinOps.h"  // from @llvm-project
    
    namespace mlir::quant {
    
    // Returns a public `func::FuncOp` in `module_op` whose name matches either
    // `main` or `serving_default`. If `func::FuncOps` with both names exist, the
    // function with name "main" takes precedence. Returns null if no such a
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 19 06:55:11 UTC 2024
    - 1.3K bytes
    - Viewed (0)
Back to top