OpenPose 1.0.0rc2 OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cuda.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_GPU_CUDA_HPP
2 #define OPENPOSE_GPU_CUDA_HPP
3
4 #include <utility> // std::pair
5 #include <openpose/core/common.hpp>
6
7 namespace op
8 {
9 const auto CUDA_NUM_THREADS = 512u;
10
11 OP_API void cudaCheck(const int line = -1, const std::string& function = "", const std::string& file = "");
12
13 OP_API int getCudaGpuNumber();
14
15 inline unsigned int getNumberCudaBlocks(const unsigned int totalRequired,
16 const unsigned int numberCudaThreads = CUDA_NUM_THREADS)
17 {
18 return (totalRequired + numberCudaThreads - 1) / numberCudaThreads;
19 }
20
21 OP_API void getNumberCudaThreadsAndBlocks(dim3& numberCudaThreads, dim3& numberCudaBlocks,
22 const Point<int>& frameSize);
23 }
24
25 #endif // OPENPOSE_GPU_CUDA_HPP
op::getNumberCudaBlocks
unsigned int getNumberCudaBlocks(const unsigned int totalRequired, const unsigned int numberCudaThreads=CUDA_NUM_THREADS)
Definition: cuda.hpp:15
common.hpp
op::getCudaGpuNumber
OP_API int getCudaGpuNumber()
op::cudaCheck
OP_API void cudaCheck(const int line=-1, const std::string &function="", const std::string &file="")
OP_API
#define OP_API
Definition: macros.hpp:19
op::getNumberCudaThreadsAndBlocks
OP_API void getNumberCudaThreadsAndBlocks(dim3 &numberCudaThreads, dim3 &numberCudaBlocks, const Point< int > &frameSize)
op::CUDA_NUM_THREADS
const auto CUDA_NUM_THREADS
Definition: cuda.hpp:9
cl::string
std::string string
Definition: cl2.hpp:574