zhangmeng
2019-05-31 fb78bfa9107d8fd74ebc7f060ff8424435a533d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package gogpu
 
/*
#cgo CFLAGS: -I. -w -g
#cgo CXXFLAGS: -I. -std=c++11 -w -g
#cgo LDFLAGS: -ldl
#include <stdlib.h>
#include "cgpu.h"
*/
import "C"
 
// IdleGPU pass needed gpu memory size test if satisfy
func IdleGPU(memSize int) int {
    return int(C.get_idle_gpu(C.int(memSize)))
}