| 116 | } |
| 117 | |
| 118 | void HandExtractorNet::checkThread() const |
| 119 | { |
| 120 | try |
| 121 | { |
| 122 | if (mThreadId != std::this_thread::get_id()) |
| 123 | error("The CPU/GPU pointer data cannot be accessed from a different thread.", |
| 124 | __LINE__, __FUNCTION__, __FILE__); |
| 125 | } |
| 126 | catch (const std::exception& e) |
| 127 | { |
| 128 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 129 | } |
| 130 | } |
| 131 | } |