NewComputeGPU returns a new GPU struct with Compute Defaults set configure any additional defaults before calling Config. Use NewGPU for a graphics enabled GPU.
()
| 141 | // configure any additional defaults before calling Config. |
| 142 | // Use NewGPU for a graphics enabled GPU. |
| 143 | func NewComputeGPU() *GPU { |
| 144 | gp := &GPU{} |
| 145 | gp.Defaults(false) |
| 146 | return gp |
| 147 | } |
| 148 | |
| 149 | // FindString returns index of string if in list, else -1 |
| 150 | func FindString(str string, strs []string) int { |