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

Method lock

dlib/cuda/cuda_data_ptr.cpp:28–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 // ----------------------------------------------------------------------------------------
27
28 cuda_data_void_ptr weak_cuda_data_void_ptr::
29 lock() const
30 {
31 auto ptr = pdata.lock();
32 if (ptr)
33 {
34 cuda_data_void_ptr temp;
35 temp.pdata = ptr;
36 temp.num = num;
37 return temp;
38 }
39 else
40 {
41 return cuda_data_void_ptr();
42 }
43 }
44
45 // -----------------------------------------------------------------------------------
46 // -----------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

cuda_data_void_ptrClass · 0.85
lockMethod · 0.45

Tested by

no test coverage detected