1 #ifndef OPENPOSE_THREAD_W_ID_GENERATOR_HPP
2 #define OPENPOSE_THREAD_W_ID_GENERATOR_HPP
11 template<
typename TDatums>
21 void work(TDatums& tDatums);
24 unsigned long long mGlobalCounter;
38 template<
typename TDatums>
44 template<
typename TDatums>
49 template<
typename TDatums>
54 template<
typename TDatums>
66 for (
auto& tDatumPtr : *tDatums)
68 if (tDatumPtr->id == std::numeric_limits<unsigned long long>::max())
69 tDatumPtr->id = mGlobalCounter;
71 const auto& tDatumPtr = (*tDatums)[0];
72 if (tDatumPtr->subId == tDatumPtr->subIdMax)
81 catch (
const std::exception& e)
85 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
static void printAveragedTimeMsOnIterationX(const std::string &key, const int line, const std::string &function, const std::string &file, const unsigned long long x=DEFAULT_X)
static const std::string timerInit(const int line, const std::string &function, const std::string &file)
static void timerEnd(const std::string &key)
void work(TDatums &tDatums)
void initializationOnThread()
bool checkNoNullNorEmpty(const TPointerContainer &tPointerContainer)
COMPILE_TEMPLATE_DATUM(WPoseTriangulation)
OP_API void error(const std::string &message, const int line=-1, const std::string &function="", const std::string &file="")
void opLogIfDebug(const T &message, const Priority priority=Priority::Max, const int line=-1, const std::string &function="", const std::string &file="")