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

Method get_handle

dlib/cuda/cudnn_dlibapi.cpp:97–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95 }
96
97 cudnnHandle_t get_handle (
98 )
99 {
100 int new_device_id;
101 CHECK_CUDA(cudaGetDevice(&new_device_id));
102 // make room for more devices if needed
103 if (new_device_id >= (long)handles.size())
104 handles.resize(new_device_id+16);
105
106 // If we don't have a handle already for this device then make one
107 if (!handles[new_device_id])
108 CHECK_CUDNN(cudnnCreate(&handles[new_device_id]));
109
110 // Finally, return the handle for the current device
111 return handles[new_device_id];
112 }
113
114 private:
115

Callers 6

descriptorFunction · 0.45
contextFunction · 0.45

Calls 2

sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected