1 // run -tags=use_go_run
3 // Copyright 2010 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
9 // Run the game of life in C using Go for parallelization.
22 var dim = flag.Int("dim", 16, "board dimensions")
23 var gen = flag.Int("gen", 10, "generations")
28 var a [MAXDIM * MAXDIM]int32
29 for i := 2; i < *dim; i += 8 {
30 for j := 2; j < *dim-3; j += 8 {
31 for y := 0; y < 3; y++ {
37 cgolife.Run(*gen, *dim, *dim, a[:])
39 for i := 0; i < *dim; i++ {
40 for j := 0; j < *dim; j++ {