Skip to content

Commit

Permalink
fix precompiled headers usage in gpu module
Browse files Browse the repository at this point in the history
  • Loading branch information
marina.kolpakova committed Dec 30, 2012
1 parent bb07e27 commit e53d576
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 21 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,9 @@ if(HAVE_CUDA)
status("")
status(" NVIDIA CUDA")

status(" Use CUFFT:" HAVE_CUFFT THEN YES ELSE NO)
status(" Use CUBLAS:" HAVE_CUBLAS THEN YES ELSE NO)
status(" Use CUFFT:" HAVE_CUFFT THEN YES ELSE NO)
status(" Use CUBLAS:" HAVE_CUBLAS THEN YES ELSE NO)
status(" USE NVCUVID:" HAVE_NVCUVID THEN YES ELSE NO)
status(" NVIDIA GPU arch:" ${OPENCV_CUDA_ARCH_BIN})
status(" NVIDIA PTX archs:" ${OPENCV_CUDA_ARCH_PTX})
status(" Use fast math:" CUDA_FAST_MATH THEN YES ELSE NO)
Expand Down
2 changes: 1 addition & 1 deletion modules/gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ endif()
set(the_description "GPU-accelerated Computer Vision")
ocv_add_module(gpu opencv_imgproc opencv_calib3d opencv_objdetect opencv_video opencv_nonfree opencv_photo opencv_legacy)

ocv_module_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/cuda" "${CMAKE_CURRENT_SOURCE_DIR}/../highgui/src")
ocv_module_include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/cuda")

file(GLOB lib_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
file(GLOB lib_device_hdrs "include/opencv2/${name}/device/*.hpp" "include/opencv2/${name}/device/*.h")
Expand Down
4 changes: 2 additions & 2 deletions modules/gpu/src/ffmpeg_video_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
#if defined(HAVE_CUDA) && defined(HAVE_NVCUVID)

#if defined(HAVE_FFMPEG) && defined(BUILD_SHARED_LIBS)
#include "cap_ffmpeg_impl.hpp"
#include "../src/cap_ffmpeg_impl.hpp"
#else
#include "cap_ffmpeg_api.hpp"
#include "../src/cap_ffmpeg_api.hpp"
#endif

namespace
Expand Down
2 changes: 1 addition & 1 deletion modules/gpu/src/gpu_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
//
//M*/

#include <precomp.hpp>
#include "precomp.hpp"

namespace cv { namespace gpu
{
Expand Down
12 changes: 2 additions & 10 deletions modules/gpu/src/softcascade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
//
//M*/

#include <precomp.hpp>
#include "precomp.hpp"

#if !defined (HAVE_CUDA)
cv::gpu::SCascade::SCascade(const double, const double, const int, const int) { throw_nogpu(); }
Expand All @@ -60,7 +60,7 @@ cv::Ptr<cv::gpu::ChannelsProcessor> cv::gpu::ChannelsProcessor::create(const int
{ throw_nogpu(); return cv::Ptr<cv::gpu::ChannelsProcessor>(0); }

#else
# include <icf.hpp>
# include "icf.hpp"

cv::gpu::device::icf::Level::Level(int idx, const Octave& oct, const float scale, const int w, const int h)
: octave(idx), step(oct.stages), relScale(scale / oct.scale)
Expand Down Expand Up @@ -95,14 +95,6 @@ namespace icf {
void shrink(const cv::gpu::PtrStepSzb& channels, cv::gpu::PtrStepSzb shrunk);
}

// namespace imgproc {
// void shfl_integral_gpu_buffered(PtrStepSzb, PtrStepSz<uint4>, PtrStepSz<unsigned int>, int, cudaStream_t);

// template <typename T>
// void resize_gpu(PtrStepSzb src, PtrStepSzb srcWhole, int xoff, int yoff, float fx, float fy,
// PtrStepSzb dst, int interpolation, cudaStream_t stream);
// }

}}}

struct cv::gpu::SCascade::Fields
Expand Down
2 changes: 1 addition & 1 deletion modules/objdetect/src/icf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
//
//M*/

#include <precomp.hpp>
#include "precomp.hpp"

cv::SCascade::Channels::Channels(int shr) : shrinkage(shr) {}

Expand Down
2 changes: 1 addition & 1 deletion modules/objdetect/src/objdetect_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
//
//M*/

#include <precomp.hpp>
#include "precomp.hpp"

namespace cv
{
Expand Down
6 changes: 3 additions & 3 deletions modules/objdetect/src/softcascade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
//
//M*/

#include <precomp.hpp>
#include "precomp.hpp"

namespace {

Expand Down Expand Up @@ -568,11 +568,11 @@ void cv::SCascade::detect(InputArray _image, InputArray _rois, OutputArray _rec
std::vector<Detection> objects;
detect( _image, _rois, objects);

_rects.create(1, objects.size(), CV_32SC4);
_rects.create(1, (int)objects.size(), CV_32SC4);
cv::Mat_<cv::Rect> rects = (cv::Mat_<cv::Rect>)_rects.getMat();
cv::Rect* rectPtr = rects.ptr<cv::Rect>(0);

_confs.create(1, objects.size(), CV_32F);
_confs.create(1, (int)objects.size(), CV_32F);
cv::Mat confs = _confs.getMat();
float* confPtr = rects.ptr<float>(0);

Expand Down

0 comments on commit e53d576

Please sign in to comment.