Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
afb81ba6
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
afb81ba6
编写于
9月 03, 2018
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
samples: eliminate cvconfig.h usage
- don't use TBB in samples
上级
aa5c4533
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
15 addition
and
37 deletion
+15
-37
samples/gpu/CMakeLists.txt
samples/gpu/CMakeLists.txt
+3
-0
samples/gpu/cascadeclassifier_nvidia_api.cpp
samples/gpu/cascadeclassifier_nvidia_api.cpp
+0
-1
samples/gpu/multi.cpp
samples/gpu/multi.cpp
+12
-20
samples/gpu/opticalflow_nvidia_api.cpp
samples/gpu/opticalflow_nvidia_api.cpp
+0
-1
samples/va_intel/display.cpp.inc
samples/va_intel/display.cpp.inc
+0
-2
samples/va_intel/va_intel_interop.cpp
samples/va_intel/va_intel_interop.cpp
+0
-13
未找到文件。
samples/gpu/CMakeLists.txt
浏览文件 @
afb81ba6
...
...
@@ -30,6 +30,9 @@ if(NOT BUILD_EXAMPLES OR NOT OCV_DEPENDENCIES_FOUND)
endif
()
project
(
gpu_samples
)
if
(
HAVE_CUDA OR CUDA_FOUND
)
add_definitions
(
-DHAVE_CUDA=1
)
endif
()
if
(
COMMAND ocv_warnings_disable
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wsuggest-override -Winconsistent-missing-override
)
endif
()
...
...
samples/gpu/cascadeclassifier_nvidia_api.cpp
浏览文件 @
afb81ba6
...
...
@@ -2,7 +2,6 @@
#pragma warning( disable : 4201 4408 4127 4100)
#endif
#include "opencv2/cvconfig.h"
#include <iostream>
#include <iomanip>
#include <cstdio>
...
...
samples/gpu/multi.cpp
浏览文件 @
afb81ba6
...
...
@@ -7,29 +7,14 @@
#endif
#include <iostream>
#include "opencv2/cvconfig.h"
#include "opencv2/core.hpp"
#include "opencv2/cudaarithm.hpp"
#ifdef HAVE_TBB
# include "tbb/tbb.h"
# include "tbb/task.h"
# undef min
# undef max
#endif
#if !defined(HAVE_CUDA) || !defined(HAVE_TBB)
#if !defined(HAVE_CUDA)
int
main
()
{
#if !defined(HAVE_CUDA)
std
::
cout
<<
"CUDA support is required (CMake key 'WITH_CUDA' must be true).
\n
"
;
#endif
#if !defined(HAVE_TBB)
std
::
cout
<<
"TBB support is required (CMake key 'WITH_TBB' must be true).
\n
"
;
#endif
std
::
cout
<<
"CUDA support is required (OpenCV CMake parameter 'WITH_CUDA' must be true)."
<<
std
::
endl
;
return
0
;
}
...
...
@@ -39,7 +24,14 @@ using namespace std;
using
namespace
cv
;
using
namespace
cv
::
cuda
;
struct
Worker
{
void
operator
()(
int
device_id
)
const
;
};
struct
Worker
:
public
cv
::
ParallelLoopBody
{
void
operator
()(
const
Range
&
r
)
const
CV_OVERRIDE
{
for
(
int
i
=
r
.
start
;
i
<
r
.
end
;
++
i
)
{
this
->
operator
()(
i
);
}
}
void
operator
()(
int
device_id
)
const
;
};
int
main
()
{
...
...
@@ -64,8 +56,8 @@ int main()
}
// Execute calculation in two threads using two GPUs
int
devices
[]
=
{
0
,
1
}
;
tbb
::
parallel_do
(
devices
,
devices
+
2
,
Worker
());
cv
::
Range
devices
(
0
,
2
)
;
cv
::
parallel_for_
(
devices
,
Worker
(),
devices
.
size
());
return
0
;
}
...
...
samples/gpu/opticalflow_nvidia_api.cpp
浏览文件 @
afb81ba6
...
...
@@ -9,7 +9,6 @@
#include <ctime>
#include <ctype.h>
#include "cvconfig.h"
#include <iostream>
#include <iomanip>
#include "opencv2/core/cuda.hpp"
...
...
samples/va_intel/display.cpp.inc
浏览文件 @
afb81ba6
...
...
@@ -7,8 +7,6 @@
#include <sys/types.h>
#include <unistd.h>
#include "cvconfig.h"
#include <va/va.h>
# include <va/va_drm.h>
...
...
samples/va_intel/va_intel_interop.cpp
浏览文件 @
afb81ba6
...
...
@@ -45,7 +45,6 @@
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/core/va_intel.hpp"
#include "cvconfig.h"
#define CHECK_VASTATUS(_status,_func) \
if (_status != VA_STATUS_SUCCESS) \
...
...
@@ -65,15 +64,9 @@ public:
void
usage
()
{
fprintf
(
stderr
,
#if defined(HAVE_VA_INTEL)
"Usage: va_intel_interop [-f] infile outfile1 outfile2
\n\n
"
"Interop ON/OFF version
\n\n
"
"where: -f option indicates interop is off (fallback mode); interop is on by default
\n
"
#elif defined(HAVE_VA)
"Usage: va_intel_interop infile outfile1 outfile2
\n\n
"
"Interop OFF only version
\n\n
"
"where:
\n
"
#endif //HAVE_VA_INTEL / HAVE_VA
" infile is to be existing, contains input image data (bmp, jpg, png, tiff, etc)
\n
"
" outfile1 is to be created, contains original surface data (NV12)
\n
"
" outfile2 is to be created, contains processed surface data (NV12)
\n
"
);
...
...
@@ -84,20 +77,14 @@ public:
int
n
=
0
;
for
(
int
i
=
0
;
i
<
_fnNumFiles
;
++
i
)
m_files
[
i
]
=
0
;
#if defined(HAVE_VA_INTEL)
m_interop
=
true
;
#elif defined(HAVE_VA)
m_interop
=
false
;
#endif //HAVE_VA_INTEL / HAVE_VA
for
(
int
i
=
1
;
i
<
m_argc
;
++
i
)
{
const
char
*
arg
=
m_argv
[
i
];
if
(
arg
[
0
]
==
'-'
)
// option
{
#if defined(HAVE_VA_INTEL)
if
(
!
strcmp
(
arg
,
"-f"
))
m_interop
=
false
;
#endif //HAVE_VA_INTEL
}
else
// parameter
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录