Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for cgolife (0.12 sec)

  1. src/cmd/cgo/internal/testlife/life_test.go

    }
    
    func testMain(m *testing.M) int {
    	GOPATH, err := os.MkdirTemp("", "cgolife")
    	if err != nil {
    		log.Panic(err)
    	}
    	defer os.RemoveAll(GOPATH)
    	os.Setenv("GOPATH", GOPATH)
    
    	// Copy testdata into GOPATH/src/cgolife, along with a go.mod file
    	// declaring the same path.
    	modRoot := filepath.Join(GOPATH, "src", "cgolife")
    	if err := cgotest.OverlayDir(modRoot, "testdata"); err != nil {
    		log.Panic(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 22 20:56:09 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testlife/testdata/main.go

    // license that can be found in the LICENSE file.
    
    //go:build test_run
    
    // Run the game of life in C using Go for parallelization.
    
    package main
    
    import (
    	"flag"
    	"fmt"
    
    	"cgolife"
    )
    
    const MAXDIM = 100
    
    var dim = flag.Int("dim", 16, "board dimensions")
    var gen = flag.Int("gen", 10, "generations")
    
    func main() {
    	flag.Parse()
    
    	var a [MAXDIM * MAXDIM]int32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 803 bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testlife/testdata/life.go

    // Copyright 2010 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package cgolife
    
    // #include "life.h"
    import "C"
    
    import "unsafe"
    
    func Run(gen, x, y int, a []int32) {
    	n := make([]int32, x*y)
    	for i := 0; i < gen; i++ {
    		C.Step(C.int(x), C.int(y), (*C.int)(unsafe.Pointer(&a[0])), (*C.int)(unsafe.Pointer(&n[0])))
    		copy(a, n)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 892 bytes
    - Viewed (0)
  4. src/cmd/go/internal/generate/generate_test.go

    // -- Note line numbers included to check substitutions from "build-in" variable - $GOLINE
    var splitTestsLines = []splitTestWithLine{
    	{"-command TEST1 $GOLINE", []string{"-command", "TEST1", "22"}, 22},
    	{"-command TEST2 ${DOLLAR}GOLINE", []string{"-command", "TEST2", "$GOLINE"}, 26},
    	{"TEST1", []string{"22"}, 33},
    	{"TEST2", []string{"66"}, 66},
    	{"TEST1 ''", []string{"22", "''"}, 99},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 20 14:09:12 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  5. src/cmd/go/testdata/script/generate_env.txt

    [GOOS:plan9] env path=$GOBIN${:}$path
    [!GOOS:plan9] env PATH=$GOBIN${:}$PATH
    
    # Test generators have access to the environment
    go generate ./printenv.go
    stdout '^GOARCH='$GOARCH
    stdout '^GOOS='$GOOS
    stdout '^GOFILE='
    stdout '^GOLINE='
    stdout '^GOPACKAGE='
    stdout '^DOLLAR='
    
    -- env.go --
    package main
    
    import (
    	"fmt"
    	"os"
    )
    
    func main() {
    	for _, v := range os.Environ() {
    		fmt.Println(v)
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 554 bytes
    - Viewed (0)
  6. src/cmd/go/internal/work/shell.go

    	// Replace *[100]_Ctype_foo with *[100]C.foo.
    	// If we're using -x, assume we're debugging and want the full dump, so disable the rewrite.
    	if !cfg.BuildX && cgoLine.MatchString(out) {
    		out = cgoLine.ReplaceAllString(out, "")
    		out = cgoTypeSigRe.ReplaceAllString(out, "C.")
    	}
    
    	// Usually desc is already p.Desc(), but if not, signal cmdError.Error to
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  7. src/cmd/go/testdata/script/generate.txt

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Test go generate variable substitution.
    
    //go:generate echo $GOARCH $GOFILE:$GOLINE ${GOPACKAGE}abc xyz$GOPACKAGE/$GOFILE/123
    
    package p
    -- generate/flag.go --
    // Copyright 2015 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 17 03:24:24 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  8. src/cmd/go/internal/generate/generate.go

    	$GOARCH
    		The execution architecture (arm, amd64, etc.)
    	$GOOS
    		The execution operating system (linux, windows, etc.)
    	$GOFILE
    		The base name of the file.
    	$GOLINE
    		The line number of the directive in the source file.
    	$GOPACKAGE
    		The name of the package of the file containing the directive.
    	$GOROOT
    		The GOROOT directory for the 'go' command that invoked the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 29 19:39:24 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  9. src/cmd/go/alldocs.go

    //
    //	$GOARCH
    //		The execution architecture (arm, amd64, etc.)
    //	$GOOS
    //		The execution operating system (linux, windows, etc.)
    //	$GOFILE
    //		The base name of the file.
    //	$GOLINE
    //		The line number of the directive in the source file.
    //	$GOPACKAGE
    //		The name of the package of the file containing the directive.
    //	$GOROOT
    //		The GOROOT directory for the 'go' command that invoked the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 16:54:28 UTC 2024
    - 142.4K bytes
    - Viewed (0)
Back to top