Пример #1
1
// based on the -gpu flag, activate set of GPUs to use
func initMultiGPU() {
	flag := *flag_gpus
	cuFlags := parseCuFlags()

	gpus := Atoi(flag)
	gpu.InitGPU(gpus, cuFlags)
}
Пример #2
1
// INTERNAL: generates LaTeX files with documentation.
func TexGen() {
	initCUDA()
	gpu.InitGPU(0, 0)

	out := OpenWRONLY("modules.tex")
	defer out.Close()

	// order by alphabetic order
	keys := make([]string, len(modules))
	i := 0
	for k, _ := range modules {
		keys[i] = k
		i++
	}
	sort.Strings(keys)

	for _, name := range keys {
		moduleTexGen(out, name)
	}

}