Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for isComplex (0.13 sec)

  1. src/cmd/compile/internal/ssa/rewritedec.go

    		return true
    	}
    	// match: (ComplexImag x:(Load <t> ptr mem))
    	// cond: t.IsComplex() && t.Size() == 8
    	// result: @x.Block (Load <typ.Float32> (OffPtr <typ.Float32Ptr> [4] ptr) mem)
    	for {
    		x := v_0
    		if x.Op != OpLoad {
    			break
    		}
    		t := x.Type
    		mem := x.Args[1]
    		ptr := x.Args[0]
    		if !(t.IsComplex() && t.Size() == 8) {
    			break
    		}
    		b = x.Block
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  2. src/text/template/parse/parse_test.go

    		if ok && err != nil {
    			t.Errorf("unexpected error for %q: %s", test.text, err)
    			continue
    		}
    		if !ok && err == nil {
    			t.Errorf("expected error for %q", test.text)
    			continue
    		}
    		if !ok {
    			if *debug {
    				fmt.Printf("%s\n\t%s\n", test.text, err)
    			}
    			continue
    		}
    		if n.IsComplex != test.isComplex {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 24 21:59:12 UTC 2024
    - 24K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/decompose.go

    				}
    				f.NamedValues[*hiName] = append(f.NamedValues[*hiName], v.Args[0])
    				f.NamedValues[*loName] = append(f.NamedValues[*loName], v.Args[1])
    				toDelete = append(toDelete, namedVal{i, j})
    			}
    		case t.IsComplex():
    			rName, iName := f.SplitComplex(name)
    			newNames = maybeAppend2(f, newNames, rName, iName)
    			for j, v := range f.NamedValues[*name] {
    				if v.Op != OpComplexMake {
    					continue
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 21:22:15 UTC 2022
    - 13.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/subr.go

    		if types.SimType[src.Kind()] == types.SimType[dst.Kind()] {
    			return ir.OCONVNOP, ""
    		}
    		return ir.OCONV, ""
    	}
    
    	// 5. src and dst are both complex types.
    	if src.IsComplex() && dst.IsComplex() {
    		if types.SimType[src.Kind()] == types.SimType[dst.Kind()] {
    			return ir.OCONVNOP, ""
    		}
    		return ir.OCONV, ""
    	}
    
    	// Special case for constant conversions: any numeric
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 19:45:58 UTC 2023
    - 20.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/const.go

    	} else {
    		base.Fatalf("cannot use %L as type %v", n, t)
    	}
    
    	n.SetType(nil)
    	return n
    }
    
    func operandType(op ir.Op, t *types.Type) *types.Type {
    	switch op {
    	case ir.OCOMPLEX:
    		if t.IsComplex() {
    			return types.FloatForComplex(t)
    		}
    	case ir.OREAL, ir.OIMAG:
    		if t.IsFloat() {
    			return types.ComplexForFloat(t)
    		}
    	default:
    		if okfor[op][t.Kind()] {
    			return t
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  6. src/text/template/parse/node.go

    			return nil, err
    		}
    		n.IsComplex = true
    		n.simplifyComplex()
    		return n, nil
    	}
    	// Imaginary constants can only be complex unless they are zero.
    	if len(text) > 0 && text[len(text)-1] == 'i' {
    		f, err := strconv.ParseFloat(text[:len(text)-1], 64)
    		if err == nil {
    			n.IsComplex = true
    			n.Complex128 = complex(0, f)
    			n.simplifyComplex()
    			return n, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  7. src/go/types/predicates.go

    func isInteger(t Type) bool        { return isBasic(t, IsInteger) }
    func isUnsigned(t Type) bool       { return isBasic(t, IsUnsigned) }
    func isFloat(t Type) bool          { return isBasic(t, IsFloat) }
    func isComplex(t Type) bool        { return isBasic(t, IsComplex) }
    func isNumeric(t Type) bool        { return isBasic(t, IsNumeric) }
    func isString(t Type) bool         { return isBasic(t, IsString) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  8. src/internal/pkgbits/decoder.go

    	}
    	return res
    }
    
    // Value decodes and returns a constant.Value from the element
    // bitstream.
    func (r *Decoder) Value() constant.Value {
    	r.Sync(SyncValue)
    	isComplex := r.Bool()
    	val := r.scalar()
    	if isComplex {
    		val = constant.BinaryOp(val, token.ADD, constant.MakeImag(r.scalar()))
    	}
    	return val
    }
    
    func (r *Decoder) scalar() constant.Value {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 20:58:46 UTC 2022
    - 13.2K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/predicates.go

    func isInteger(t Type) bool        { return isBasic(t, IsInteger) }
    func isUnsigned(t Type) bool       { return isBasic(t, IsUnsigned) }
    func isFloat(t Type) bool          { return isBasic(t, IsFloat) }
    func isComplex(t Type) bool        { return isBasic(t, IsComplex) }
    func isNumeric(t Type) bool        { return isBasic(t, IsNumeric) }
    func isString(t Type) bool         { return isBasic(t, IsString) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/walk.go

    	// When instrumenting, any expression might require function calls.
    	if base.Flag.Cfg.Instrumenting {
    		return true
    	}
    
    	isSoftFloat := func(typ *types.Type) bool {
    		return types.IsFloat[typ.Kind()] || types.IsComplex[typ.Kind()]
    	}
    
    	return ir.Any(n, func(n ir.Node) bool {
    		// walk should have already moved any Init blocks off of
    		// expressions.
    		if len(n.Init()) != 0 {
    			base.FatalfAt(n.Pos(), "mayCall %+v", n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top