static */
| 663 | } |
| 664 | |
| 665 | /* static */ bool GpuDriver::AddStreamCallback(GpuContext* context, |
| 666 | CUstream stream, |
| 667 | StreamCallback callback, |
| 668 | void* data) { |
| 669 | // Note: flags param is required to be zero according to CUDA 6.0. |
| 670 | CUresult res = cuStreamAddCallback(stream, callback, data, 0 /* = flags */); |
| 671 | if (res != CUDA_SUCCESS) { |
| 672 | LOG(ERROR) << "unable to add host callback: " << ToString(res); |
| 673 | return false; |
| 674 | } |
| 675 | return true; |
| 676 | } |
| 677 | |
| 678 | /* static */ bool GpuDriver::GetModuleFunction(GpuContext* context, |
| 679 | CUmodule module, |
nothing calls this directly
no test coverage detected