MCPcopy Create free account
hub / github.com/creatale/node-dv / copyTo

Method copyTo

deps/opencv/modules/core/src/opengl_interop.cpp:265–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263 }
264
265 void CudaResource::copyTo(void* dst, size_t dpitch, size_t width, size_t height, cudaStream_t stream)
266 {
267 CV_DbgAssert( resource_ != 0 );
268
269 GraphicsMapHolder h(&resource_, stream);
270 (void) h;
271
272 void* src;
273 size_t size;
274 cudaSafeCall( cudaGraphicsResourceGetMappedPointer(&src, &size, resource_) );
275
276 CV_DbgAssert( width * height == size );
277
278 if (stream == 0)
279 cudaSafeCall( cudaMemcpy2D(dst, dpitch, src, width, width, height, cudaMemcpyDeviceToDevice) );
280 else
281 cudaSafeCall( cudaMemcpy2DAsync(dst, dpitch, src, width, width, height, cudaMemcpyDeviceToDevice, stream) );
282 }
283
284 void* CudaResource::map(cudaStream_t stream)
285 {

Callers 1

copyFromMethod · 0.45

Calls 11

throw_noglFunction · 0.85
throw_nocudaFunction · 0.85
registerBufferMethod · 0.80
kindMethod · 0.80
copyFromMethod · 0.45
createMethod · 0.45
elemSizeMethod · 0.45
getMatMethod · 0.45
isContinuousMethod · 0.45
bindMethod · 0.45
setAutoReleaseMethod · 0.45

Tested by

no test coverage detected