MCPcopy Create free account
hub / github.com/davisking/dlib / device_write_only

Method device_write_only

dlib/cuda/gpu_data.h:140–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138 }
139
140 float* device_write_only()
141 {
142#ifndef DLIB_USE_CUDA
143 DLIB_CASSERT(false, "CUDA NOT ENABLED");
144#else
145 DLIB_CASSERT(cuda::use_cuda(), "CUDA disabled");
146#endif
147 wait_for_transfer_to_finish();
148 host_current = false;
149 device_current = true;
150 device_in_use = true;
151 return data_device.get();
152 }
153
154 bool host_ready (
155 ) const { return host_current; }

Callers 1

memcpyFunction · 0.45

Calls 2

use_cudaFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected