Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 48 for vconst2 (0.18 sec)

  1. src/internal/types/testdata/check/const1.go

    // license that can be found in the LICENSE file.
    
    // constant conversions
    
    package const1
    
    import "math"
    
    const(
    	mi = ^int(0)
    	mu = ^uint(0)
    	mp = ^uintptr(0)
    
    	logSizeofInt     = uint(mi>>8&1 + mi>>16&1 + mi>>32&1)
    	logSizeofUint    = uint(mu>>8&1 + mu>>16&1 + mu>>32&1)
    	logSizeofUintptr = uint(mp>>8&1 + mp>>16&1 + mp>>32&1)
    )
    
    const (
    	minInt8 = -1<<(8<<iota - 1)
    	minInt16
    	minInt32
    	minInt64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 16:11:16 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate_registration_test.cc

        %1:2 = tf_executor.island wraps "tf.Const"() {device = "", dtype = "tfdtype$DT_HALF", value = dense<[1.0, 2.0]> : tensor<2xf16>} : () -> tensor<2xf16> loc("const2")
        tf_executor.fetch %0#0, %1#0 : tensor<1x2xf16>, tensor<2xf16>
      }
      func.return %graph#0, %graph#1 : tensor<1x2xf16>, tensor<2xf16>
    })";
      std::string result;
    
      auto status = Translate(kMlirSource, result);
    
      ASSERT_TRUE(status.succeeded());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jul 20 23:11:32 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  3. test/const3.go

    package main
    
    import "fmt"
    
    type T int
    
    func (t T) String() string { return fmt.Sprintf("T%d", int(t)) }
    
    const (
    	A T = 1 << (1 << iota)
    	B
    	C
    	D
    	E
    )
    
    func main() {
    	s := fmt.Sprintf("%v %v %v %v %v", A, B, C, D, E)
    	if s != "T2 T4 T16 T256 T65536" {
    		println("type info didn't propagate in const: got", s)
    		panic("fail")
    	}
    	x := uint(5)
    	y := float64(uint64(1)<<x)	// used to fail to compile
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 02:19:43 UTC 2012
    - 659 bytes
    - Viewed (0)
  4. test/const6.go

    Emmanuel Odeke <******@****.***> 1460323946 -0700
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 834 bytes
    - Viewed (0)
  5. test/const8.go

    // in the correct context; see issues #49157, #53585.
    
    package main
    
    const X = 2
    
    func main() {
    	const (
    		A    = iota // 0
    		iota = iota // 1
    		B           // 1 (iota is declared locally on prev. line)
    		C           // 1
    	)
    	if A != 0 || B != 1 || C != 1 {
    		println("got", A, B, C, "want 0 1 1")
    		panic("FAILED")
    	}
    
    	const (
    		X = X + X
    		Y
    		Z = iota
    	)
    	if X != 4 || Y != 8 || Z != 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 28 18:11:31 UTC 2022
    - 727 bytes
    - Viewed (0)
  6. test/const1.go

    	f(Bool)             // ERROR "convert|wrong type|cannot|incompatible"
    }
    
    const ptr = nil // ERROR "const.*nil|not constant"
    const _ = string([]byte(nil)) // ERROR "is not a? ?constant"
    const _ = uintptr(unsafe.Pointer((*int)(nil))) // ERROR "is not a? ?constant"
    const _ = unsafe.Pointer((*int)(nil)) // ERROR "cannot be nil|invalid constant type|is not a constant|not constant"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 01 21:49:31 UTC 2020
    - 3.8K bytes
    - Viewed (0)
  7. test/const5.go

    package p
    
    var b struct {
    	a[10]int
    }
    
    var m map[string][20]int
    
    var s [][30]int
    
    func f() *[40]int
    var c chan *[50]int
    var z complex128
    
    const (
    	n1 = len(b.a)
    	n2 = len(m[""])
    	n3 = len(s[10])
    
    	n4 = len(f())  // ERROR "is not a constant|is not constant"
    	n5 = len(<-c) // ERROR "is not a constant|is not constant"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jul 11 14:36:33 UTC 2015
    - 835 bytes
    - Viewed (0)
  8. src/runtime/internal/sys/consts.go

    const StackGuardMultiplier = 1 + goos.IsAix + isRace
    
    // DefaultPhysPageSize is the default physical page size.
    const DefaultPhysPageSize = goarch.DefaultPhysPageSize
    
    // PCQuantum is the minimal unit for a program counter (1 on x86, 4 on most other systems).
    // The various PC tables record PC deltas pre-divided by PCQuantum.
    const PCQuantum = goarch.PCQuantum
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 16:26:25 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  9. test/const.go

    package main
    
    import "os"
    
    const (
    	c0      = 0
    	cm1     = -1
    	chuge   = 1 << 100
    	chuge_1 = chuge - 1
    	c1      = chuge >> 100
    	c3div2  = 3 / 2
    	c1e3    = 1e3
    
    	rsh1 = 1e100 >> 1000
    	rsh2 = 1e302 >> 1000
    
    	ctrue  = true
    	cfalse = !ctrue
    
    	// Issue #34563
    	_ = string(int(123))
    	_ = string(rune(456))
    )
    
    const (
    	f0              = 0.0
    	fm1             = -1.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 26 23:54:29 UTC 2019
    - 4.8K bytes
    - Viewed (0)
  10. test/const7.go

    		return
    	}
    
    	dir, err := ioutil.TempDir("", "const7_")
    	if err != nil {
    		log.Fatalf("creating temp dir: %v\n", err)
    	}
    	defer os.RemoveAll(dir)
    
    	const bitLimit = 512
    	const charLimit = 10000 // compiler-internal constant length limit
    	testProg(dir, "x1", bitLimit, "")
    	testProg(dir, "x2", bitLimit+1, "constant overflow")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:56:32 UTC 2023
    - 1.9K bytes
    - Viewed (0)
Back to top