cuda.hpp 461 字节
Newer Older
G
gineshidalgo99 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#ifndef OPENPOSE__UTILITIES_CUDA_HPP
#define OPENPOSE__UTILITIES_CUDA_HPP

#include <string>

namespace op
{
    void cudaCheck(const int line = -1, const std::string& function = "", const std::string& file = "");

    inline unsigned int getNumberCudaBlocks(const unsigned int totalRequired, const unsigned int numberCudaThreads)
    {
        return (totalRequired + numberCudaThreads - 1) / numberCudaThreads;
    }
}

#endif // OPENPOSE__UTILITIES_CUDA_HPP