getDeviceAllocator returns singleton deviceAllocator instance.
()
| 111 | |
| 112 | // getDeviceAllocator returns singleton deviceAllocator instance. |
| 113 | func getDeviceAllocator() deviceAllocator { |
| 114 | deviceAllocatorOnce.Do(func() { |
| 115 | da = newDeviceAllocator() |
| 116 | }) |
| 117 | return da |
| 118 | } |
| 119 | |
| 120 | // deviceAllocate is the wrapper of deviceAllocate of deviceAllocator. |
| 121 | func deviceAllocate(bytes, device int) devicePointer { |
no test coverage detected