示例#1
0
文件: init.go 项目: LStoleriu/hotspin
// Initialize the CUDA driver API.
// Currently, flags must be 0.
// If Init() has not been called, any function from the driver API will panic with ERROR_NOT_INITIALIZED.
func Init(flags int) {
	err := Result(C.cuInit(C.uint(flags)))
	if err != SUCCESS {
		panic(err)
	}
}
示例#2
0
文件: cuda.go 项目: kashif/gocuda
func Init(flags uint32) int {
	return int(C.cuInit(C.uint(flags)))
}