Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for makeImg (0.16 sec)

  1. src/image/jpeg/scan.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package jpeg
    
    import (
    	"image"
    )
    
    // makeImg allocates and initializes the destination image.
    func (d *decoder) makeImg(mxx, myy int) {
    	if d.nComp == 1 {
    		m := image.NewGray(image.Rect(0, 0, 8*mxx, 8*myy))
    		d.img1 = m.SubImage(image.Rect(0, 0, d.width, d.height)).(*image.Gray)
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 25 00:46:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. src/go/types/builtins.go

    					if check.recordTypes() {
    						sig := makeSig(S, S, y.typ)
    						sig.variadic = true
    						check.recordBuiltinType(call.Fun, sig)
    					}
    					x.mode = value
    					x.typ = S
    					break
    				}
    			}
    		}
    
    		// check general case by creating custom signature
    		sig := makeSig(S, S, NewSlice(T)) // []T required for variadic signature
    		sig.variadic = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/builtins.go

    					if check.recordTypes() {
    						sig := makeSig(S, S, y.typ)
    						sig.variadic = true
    						check.recordBuiltinType(call.Fun, sig)
    					}
    					x.mode = value
    					x.typ = S
    					break
    				}
    			}
    		}
    
    		// check general case by creating custom signature
    		sig := makeSig(S, S, NewSlice(T)) // []T required for variadic signature
    		sig.variadic = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  4. src/archive/tar/writer_test.go

    	)
    
    	type (
    		makeReg struct {
    			size    int64
    			wantStr string
    		}
    		makeSparse struct {
    			makeReg makeReg
    			sph     sparseHoles
    			size    int64
    		}
    		fileMaker any // makeReg | makeSparse
    	)
    
    	vectors := []struct {
    		maker fileMaker
    		tests []testFnc
    	}{{
    		maker: makeReg{0, ""},
    		tests: []testFnc{
    			testRemaining{0, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 38.7K bytes
    - Viewed (0)
  5. src/go/constant/example_test.go

    import (
    	"fmt"
    	"go/constant"
    	"go/token"
    	"math"
    	"slices"
    )
    
    func Example_complexNumbers() {
    	// Create the complex number 2.3 + 5i.
    	ar := constant.MakeFloat64(2.3)
    	ai := constant.MakeImag(constant.MakeInt64(5))
    	a := constant.BinaryOp(ar, token.ADD, ai)
    
    	// Compute (2.3 + 5i) * 11.
    	b := constant.MakeUint64(11)
    	c := constant.BinaryOp(a, token.MUL, b)
    
    	// Convert c into a complex128.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  6. src/runtime/netpoll.go

    	c.first = pd.link
    	unlock(&c.lock)
    	return pd
    }
    
    // makeArg converts pd to an interface{}.
    // makeArg does not do any allocation. Normally, such
    // a conversion requires an allocation because pointers to
    // types which embed runtime/internal/sys.NotInHeap (which pollDesc is)
    // must be stored in interfaces indirectly. See issue 42076.
    func (pd *pollDesc) makeArg() (i any) {
    	x := (*eface)(unsafe.Pointer(&i))
    	x._type = pdType
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  7. src/go/types/issues_test.go

    }
    
    func TestIssue55030(t *testing.T) {
    	// makeSig makes the signature func(typ...)
    	makeSig := func(typ Type) {
    		par := NewVar(nopos, nil, "", typ)
    		params := NewTuple(par)
    		NewSignatureType(nil, nil, nil, params, nil, true)
    	}
    
    	// makeSig must not panic for the following (example) types:
    	// []int
    	makeSig(NewSlice(Typ[Int]))
    
    	// string
    	makeSig(Typ[String])
    
    	// P where P's core type is string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/issues_test.go

    }
    
    func TestIssue55030(t *testing.T) {
    	// makeSig makes the signature func(typ...)
    	makeSig := func(typ Type) {
    		par := NewVar(nopos, nil, "", typ)
    		params := NewTuple(par)
    		NewSignatureType(nil, nil, nil, params, nil, true)
    	}
    
    	// makeSig must not panic for the following (example) types:
    	// []int
    	makeSig(NewSlice(Typ[Int]))
    
    	// string
    	makeSig(Typ[String])
    
    	// P where P's core type is string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/api_test.go

    	conf := Config{Importer: imports}
    	makePkg := func(src string) {
    		f := mustParse(src)
    		name := f.PkgName.Value
    		pkg, err := conf.Check(name, []*syntax.File{f}, nil)
    		if err != nil {
    			t.Fatal(err)
    		}
    		imports[name] = pkg
    	}
    	makePkg(`package lib; type T[P any] struct{}`)
    	makePkg(`package a; import "lib"; var A lib.T[int]`)
    	makePkg(`package b; import "lib"; var B lib.T[int]`)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
  10. src/go/types/api_test.go

    		useMap := make(map[*ast.Ident]Object)
    		makePkg := func(src string) *Package {
    			pkg, err := typecheck(src, &conf, &Info{Instances: instMap, Uses: useMap})
    			// allow error for issue51803
    			if err != nil && (pkg == nil || pkg.Name() != "issue51803") {
    				t.Fatal(err)
    			}
    			imports[pkg.Name()] = pkg
    			return pkg
    		}
    		makePkg(lib)
    		pkg := makePkg(test.src)
    
    		t.Run(pkg.Name(), func(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 94.2K bytes
    - Viewed (0)
Back to top