| 135 | } |
| 136 | |
| 137 | Status CLCommandQueue::EnqueueWriteBuffer(cl_mem memory, size_t size_in_bytes, |
| 138 | const void* data) { |
| 139 | auto error_code = clEnqueueWriteBuffer( |
| 140 | queue_, memory, CL_TRUE, 0, size_in_bytes, data, 0, nullptr, nullptr); |
| 141 | if (error_code != CL_SUCCESS) { |
| 142 | return UnknownError( |
| 143 | absl::StrCat("Failed to upload data to GPU (clEnqueueWriteBuffer) - ", |
| 144 | CLErrorCodeToString(error_code))); |
| 145 | } |
| 146 | return OkStatus(); |
| 147 | } |
| 148 | |
| 149 | Status CLCommandQueue::EnqueueReadBuffer(cl_mem memory, size_t size_in_bytes, |
| 150 | void* data) { |
no test coverage detected