Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
7d350280
Commit
7d350280
authored
May 18, 2011
by
Alexey Spizhevoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compilation under mac
parent
8a47b3d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
8 deletions
+19
-8
CMakeLists.txt
modules/gpu/CMakeLists.txt
+10
-6
NCV.cu
modules/gpu/src/nvidia/core/NCV.cu
+1
-1
TestHaarCascadeApplication.cpp
modules/gpu/test/nvidia/TestHaarCascadeApplication.cpp
+8
-1
No files found.
modules/gpu/CMakeLists.txt
View file @
7d350280
...
...
@@ -35,12 +35,12 @@ if (HAVE_CUDA)
endif
()
if
(
HAVE_CUDA
)
get_filename_component
(
_path_to_findnpp
"
${
CMAKE_CURRENT_LIST_FILE
}
"
PATH
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
_path_to_findnpp
}
)
find_package
(
NPP 3.2.16 REQUIRED
)
message
(
STATUS
"NPP detected: "
${
NPP_VERSION
}
)
#
get_filename_component(_path_to_findnpp "${CMAKE_CURRENT_LIST_FILE}" PATH)
#
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${_path_to_findnpp})
#
find_package(NPP 3.2.16 REQUIRED)
#
message(STATUS "NPP detected: " ${NPP_VERSION})
include_directories
(
${
CUDA_INCLUDE_DIRS
}
${
CUDA_NPP_INCLUDES
}
)
include_directories
(
${
CUDA_INCLUDE_DIRS
}
)
if
(
UNIX OR APPLE
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
"-Xcompiler;-fPIC;"
)
...
...
@@ -128,8 +128,12 @@ set_target_properties(${the_target} PROPERTIES
target_link_libraries
(
${
the_target
}
${
OPENCV_LINKER_LIBS
}
${
IPP_LIBS
}
${
DEPS
}
)
if
(
HAVE_CUDA
)
target_link_libraries
(
${
the_target
}
${
CUDA_LIBRARIES
}
${
CUDA_NPP_LIBRARIES
}
)
target_link_libraries
(
${
the_target
}
${
CUDA_LIBRARIES
}
)
CUDA_ADD_CUFFT_TO_TARGET
(
${
the_target
}
)
unset
(
CUDA_npp_LIBRARY CACHE
)
find_cuda_helper_libs
(
npp
)
target_link_libraries
(
${
the_target
}
${
CUDA_npp_LIBRARY
}
)
endif
()
if
(
MSVC
)
...
...
modules/gpu/src/nvidia/core/NCV.cu
View file @
7d350280
...
...
@@ -575,7 +575,7 @@ typedef struct _NcvTimeMoment NcvTimeMoment;
return 1000.0 * 2 * ((t2->moment) - (t1->moment)) / (t1->freq + t2->freq);
}
#elif defined(__
unix__)
#elif defined(__
GNUC__)
#include <sys/time.h>
...
...
modules/gpu/test/nvidia/TestHaarCascadeApplication.cpp
View file @
7d350280
...
...
@@ -11,7 +11,7 @@
#include <float.h>
#if defined(__GNUC__)
#if defined(__GNUC__)
&& !defined(__APPLE__)
#include <fpu_control.h>
#endif
...
...
@@ -48,6 +48,9 @@ bool TestHaarCascadeApplication::init()
bool
TestHaarCascadeApplication
::
process
()
{
#if defined(__APPLE)
return
true
;
#endif
NCVStatus
ncvStat
;
bool
rcode
=
false
;
...
...
@@ -200,6 +203,8 @@ bool TestHaarCascadeApplication::process()
}
ncvAssertReturn
(
cudaSuccess
==
cudaStreamSynchronize
(
0
),
false
);
#if !defined(__APPLE__)
#if defined(__GNUC__)
//http://www.christian-seiler.de/projekte/fpmath/
...
...
@@ -229,6 +234,8 @@ bool TestHaarCascadeApplication::process()
searchRoiU
,
1
,
1.0
f
);
ncvAssertReturn
(
ncvStat
==
NCV_SUCCESS
,
false
);
_controlfp_s
(
&
fpu_cw
,
fpu_oldcw
,
_MCW_PC
);
#endif
#endif
NCV_SKIP_COND_END
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment