| 126 | } |
| 127 | |
| 128 | float* device_write_only() |
| 129 | { |
| 130 | #ifndef DLIB_USE_CUDA |
| 131 | DLIB_CASSERT(false, "CUDA NOT ENABLED"); |
| 132 | #endif |
| 133 | wait_for_transfer_to_finish(); |
| 134 | host_current = false; |
| 135 | device_current = true; |
| 136 | device_in_use = true; |
| 137 | return data_device.get(); |
| 138 | } |
| 139 | |
| 140 | bool host_ready ( |
| 141 | ) const { return host_current; } |