OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
profiler.hpp File Reference
#include <chrono>
#include <string>
#include <openpose/core/macros.hpp>
#include <openpose/utilities/enumClasses.hpp>

Go to the source code of this file.

Classes

class  op::Profiler
 

Namespaces

 op
 

Macros

#define OP_PROFILE_INIT(REPS)
 
#define OP_PROFILE_END(finalTime, factor, REPS)
 
#define OP_CUDA_PROFILE_INIT(REPS)
 
#define OP_CUDA_PROFILE_END(finalTime, factor, REPS)
 

Functions

OP_API std::chrono::time_point< std::chrono::high_resolution_clock > op::getTimerInit ()
 
OP_API double op::getTimeSeconds (const std::chrono::time_point< std::chrono::high_resolution_clock > &timerInit)
 
OP_API void op::printTime (const std::chrono::time_point< std::chrono::high_resolution_clock > &timerInit, const std::string &firstMessage, const std::string &secondMessage, const Priority priority)
 

Macro Definition Documentation

◆ OP_CUDA_PROFILE_END

#define OP_CUDA_PROFILE_END (   finalTime,
  factor,
  REPS 
)
Value:
} \
cudaDeviceSynchronize(); \
(finalTime) = (factor)/(float)(REPS)*getTimeSeconds(timerInit); \
cudaCheck(__LINE__, __FUNCTION__, __FILE__); \
}
OP_API double getTimeSeconds(const std::chrono::time_point< std::chrono::high_resolution_clock > &timerInit)

Definition at line 59 of file profiler.hpp.

◆ OP_CUDA_PROFILE_INIT

#define OP_CUDA_PROFILE_INIT (   REPS)
Value:
{ \
cudaDeviceSynchronize(); \
const auto timerInit = getTimerInit(); \
for (auto rep = 0 ; rep < (REPS) ; ++rep) \
{
OP_API std::chrono::time_point< std::chrono::high_resolution_clock > getTimerInit()

Definition at line 51 of file profiler.hpp.

◆ OP_PROFILE_END

#define OP_PROFILE_END (   finalTime,
  factor,
  REPS 
)
Value:
} \
(finalTime) = (factor)/(float)(REPS)*getTimeSeconds(timerInit); \
}

Definition at line 36 of file profiler.hpp.

◆ OP_PROFILE_INIT

#define OP_PROFILE_INIT (   REPS)
Value:
{ \
const auto timerInit = getTimerInit(); \
for (auto rep = 0 ; rep < (REPS) ; ++rep) \
{

Definition at line 31 of file profiler.hpp.