Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
4f19216e
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
4f19216e
编写于
6月 27, 2013
作者:
R
Roman Donchenko
提交者:
OpenCV Buildbot
6月 27, 2013
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1036 from jet47:fix-gpu-deviceinfo
上级
c1f8d9e3
98bd4015
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
29 addition
and
29 deletion
+29
-29
modules/core/include/opencv2/core/gpu.hpp
modules/core/include/opencv2/core/gpu.hpp
+2
-2
modules/core/include/opencv2/core/gpu.inl.hpp
modules/core/include/opencv2/core/gpu.inl.hpp
+1
-1
modules/core/src/gpu_info.cpp
modules/core/src/gpu_info.cpp
+6
-6
modules/gpu/doc/initalization_and_information.rst
modules/gpu/doc/initalization_and_information.rst
+8
-8
modules/gpufilters/src/filtering.cpp
modules/gpufilters/src/filtering.cpp
+1
-1
modules/gpuoptflow/test/test_optflow.cpp
modules/gpuoptflow/test/test_optflow.cpp
+1
-1
modules/ts/src/gpu_perf.cpp
modules/ts/src/gpu_perf.cpp
+1
-1
samples/gpu/driver_api_multi.cpp
samples/gpu/driver_api_multi.cpp
+2
-2
samples/gpu/driver_api_stereo_multi.cpp
samples/gpu/driver_api_stereo_multi.cpp
+2
-2
samples/gpu/multi.cpp
samples/gpu/multi.cpp
+2
-2
samples/gpu/performance/performance.cpp
samples/gpu/performance/performance.cpp
+1
-1
samples/gpu/stereo_multi.cpp
samples/gpu/stereo_multi.cpp
+2
-2
未找到文件。
modules/core/include/opencv2/core/gpu.hpp
浏览文件 @
4f19216e
...
...
@@ -529,10 +529,10 @@ public:
size_t
totalConstMem
()
const
;
//! major compute capability
int
major
()
const
;
int
major
Version
()
const
;
//! minor compute capability
int
minor
()
const
;
int
minor
Version
()
const
;
//! alignment requirement for textures
size_t
textureAlignment
()
const
;
...
...
modules/core/include/opencv2/core/gpu.inl.hpp
浏览文件 @
4f19216e
...
...
@@ -619,7 +619,7 @@ size_t DeviceInfo::totalMemory() const
inline
bool
DeviceInfo
::
supports
(
FeatureSet
feature_set
)
const
{
int
version
=
major
()
*
10
+
minor
();
int
version
=
major
Version
()
*
10
+
minorVersion
();
return
version
>=
feature_set
;
}
...
...
modules/core/src/gpu_info.cpp
浏览文件 @
4f19216e
...
...
@@ -119,7 +119,7 @@ bool cv::gpu::deviceSupports(FeatureSet feature_set)
else
{
DeviceInfo
dev
(
devId
);
version
=
dev
.
major
()
*
10
+
dev
.
minor
();
version
=
dev
.
major
Version
()
*
10
+
dev
.
minorVersion
();
if
(
devId
<
cache_size
)
versions
[
devId
]
=
version
;
}
...
...
@@ -455,7 +455,7 @@ size_t cv::gpu::DeviceInfo::totalConstMem() const
#endif
}
int
cv
::
gpu
::
DeviceInfo
::
major
()
const
int
cv
::
gpu
::
DeviceInfo
::
major
Version
()
const
{
#ifndef HAVE_CUDA
throw_no_cuda
();
...
...
@@ -465,7 +465,7 @@ int cv::gpu::DeviceInfo::major() const
#endif
}
int
cv
::
gpu
::
DeviceInfo
::
minor
()
const
int
cv
::
gpu
::
DeviceInfo
::
minor
Version
()
const
{
#ifndef HAVE_CUDA
throw_no_cuda
();
...
...
@@ -908,12 +908,12 @@ bool cv::gpu::DeviceInfo::isCompatible() const
return
false
;
#else
// Check PTX compatibility
if
(
TargetArchs
::
hasEqualOrLessPtx
(
major
(),
minor
()))
if
(
TargetArchs
::
hasEqualOrLessPtx
(
major
Version
(),
minorVersion
()))
return
true
;
// Check BIN compatibility
for
(
int
i
=
minor
();
i
>=
0
;
--
i
)
if
(
TargetArchs
::
hasBin
(
major
(),
i
))
for
(
int
i
=
minor
Version
();
i
>=
0
;
--
i
)
if
(
TargetArchs
::
hasBin
(
major
Version
(),
i
))
return
true
;
return
false
;
...
...
modules/gpu/doc/initalization_and_information.rst
浏览文件 @
4f19216e
...
...
@@ -147,10 +147,10 @@ Class providing functionality for querying the specified GPU properties. ::
size_t totalConstMem() const;
//! major compute capability
int major() const;
int major
Version
() const;
//! minor compute capability
int minor() const;
int minor
Version
() const;
//! alignment requirement for textures
size_t textureAlignment() const;
...
...
@@ -313,19 +313,19 @@ Returns the device name.
gpu::DeviceInfo::major
----------------------
gpu::DeviceInfo::major
Version
----------------------
-------
Returns the major compute capability version.
.. ocv:function:: int gpu::DeviceInfo::major()
.. ocv:function:: int gpu::DeviceInfo::major
Version
()
gpu::DeviceInfo::minor
----------------------
gpu::DeviceInfo::minor
Version
----------------------
-------
Returns the minor compute capability version.
.. ocv:function:: int gpu::DeviceInfo::minor()
.. ocv:function:: int gpu::DeviceInfo::minor
Version
()
...
...
modules/gpufilters/src/filtering.cpp
浏览文件 @
4f19216e
...
...
@@ -409,7 +409,7 @@ namespace
ensureSizeIsEnough
(
src
.
size
(),
bufType_
,
buf_
);
DeviceInfo
devInfo
;
const
int
cc
=
devInfo
.
major
()
*
10
+
devInfo
.
minor
();
const
int
cc
=
devInfo
.
major
Version
()
*
10
+
devInfo
.
minorVersion
();
cudaStream_t
stream
=
StreamAccessor
::
getStream
(
_stream
);
...
...
modules/gpuoptflow/test/test_optflow.cpp
浏览文件 @
4f19216e
...
...
@@ -80,7 +80,7 @@ GPU_TEST_P(BroxOpticalFlow, Regression)
brox
(
loadMat
(
frame0
),
loadMat
(
frame1
),
u
,
v
);
std
::
string
fname
(
cvtest
::
TS
::
ptr
()
->
get_data_path
());
if
(
devInfo
.
major
()
>=
2
)
if
(
devInfo
.
major
Version
()
>=
2
)
fname
+=
"opticalflow/brox_optical_flow_cc20.bin"
;
else
fname
+=
"opticalflow/brox_optical_flow.bin"
;
...
...
modules/ts/src/gpu_perf.cpp
浏览文件 @
4f19216e
...
...
@@ -288,7 +288,7 @@ namespace perf
printf
(
"[----------]
\n
"
),
fflush
(
stdout
);
printf
(
"[ DEVICE ]
\t
# %d %s.
\n
"
,
i
,
info
.
name
()),
fflush
(
stdout
);
printf
(
"[ ]
\t
Compute capability: %d.%d
\n
"
,
(
int
)
info
.
major
(),
(
int
)
info
.
minor
()),
fflush
(
stdout
);
printf
(
"[ ]
\t
Compute capability: %d.%d
\n
"
,
(
int
)
info
.
major
Version
(),
(
int
)
info
.
minorVersion
()),
fflush
(
stdout
);
printf
(
"[ ]
\t
Multi Processor Count: %d
\n
"
,
info
.
multiProcessorCount
()),
fflush
(
stdout
);
printf
(
"[ ]
\t
Total memory: %d Mb
\n
"
,
static_cast
<
int
>
(
static_cast
<
int
>
(
info
.
totalMemory
()
/
1024.0
)
/
1024.0
)),
fflush
(
stdout
);
printf
(
"[ ]
\t
Free memory: %d Mb
\n
"
,
static_cast
<
int
>
(
static_cast
<
int
>
(
info
.
freeMemory
()
/
1024.0
)
/
1024.0
)),
fflush
(
stdout
);
...
...
samples/gpu/driver_api_multi.cpp
浏览文件 @
4f19216e
...
...
@@ -86,8 +86,8 @@ int main()
if
(
!
dev_info
.
isCompatible
())
{
std
::
cout
<<
"GPU module isn't built for GPU #"
<<
i
<<
" ("
<<
dev_info
.
name
()
<<
", CC "
<<
dev_info
.
major
()
<<
dev_info
.
minor
()
<<
"
\n
"
;
<<
dev_info
.
name
()
<<
", CC "
<<
dev_info
.
major
Version
()
<<
dev_info
.
minor
Version
()
<<
"
\n
"
;
return
-
1
;
}
}
...
...
samples/gpu/driver_api_stereo_multi.cpp
浏览文件 @
4f19216e
...
...
@@ -116,8 +116,8 @@ int main(int argc, char** argv)
if
(
!
dev_info
.
isCompatible
())
{
std
::
cout
<<
"GPU module isn't built for GPU #"
<<
i
<<
" ("
<<
dev_info
.
name
()
<<
", CC "
<<
dev_info
.
major
()
<<
dev_info
.
minor
()
<<
"
\n
"
;
<<
dev_info
.
name
()
<<
", CC "
<<
dev_info
.
major
Version
()
<<
dev_info
.
minor
Version
()
<<
"
\n
"
;
return
-
1
;
}
}
...
...
samples/gpu/multi.cpp
浏览文件 @
4f19216e
...
...
@@ -62,8 +62,8 @@ int main()
if
(
!
dev_info
.
isCompatible
())
{
std
::
cout
<<
"GPU module isn't built for GPU #"
<<
i
<<
" ("
<<
dev_info
.
name
()
<<
", CC "
<<
dev_info
.
major
()
<<
dev_info
.
minor
()
<<
"
\n
"
;
<<
dev_info
.
name
()
<<
", CC "
<<
dev_info
.
major
Version
()
<<
dev_info
.
minor
Version
()
<<
"
\n
"
;
return
-
1
;
}
}
...
...
samples/gpu/performance/performance.cpp
浏览文件 @
4f19216e
...
...
@@ -191,7 +191,7 @@ int main(int argc, const char* argv[])
DeviceInfo
dev_info
(
device
);
if
(
!
dev_info
.
isCompatible
())
{
cerr
<<
"GPU module isn't built for GPU #"
<<
device
<<
" "
<<
dev_info
.
name
()
<<
", CC "
<<
dev_info
.
major
()
<<
'.'
<<
dev_info
.
minor
()
<<
endl
;
cerr
<<
"GPU module isn't built for GPU #"
<<
device
<<
" "
<<
dev_info
.
name
()
<<
", CC "
<<
dev_info
.
major
Version
()
<<
'.'
<<
dev_info
.
minorVersion
()
<<
endl
;
return
-
1
;
}
setDevice
(
device
);
...
...
samples/gpu/stereo_multi.cpp
浏览文件 @
4f19216e
...
...
@@ -81,8 +81,8 @@ int main(int argc, char** argv)
if
(
!
dev_info
.
isCompatible
())
{
std
::
cout
<<
"GPU module isn't built for GPU #"
<<
i
<<
" ("
<<
dev_info
.
name
()
<<
", CC "
<<
dev_info
.
major
()
<<
dev_info
.
minor
()
<<
"
\n
"
;
<<
dev_info
.
name
()
<<
", CC "
<<
dev_info
.
major
Version
()
<<
dev_info
.
minor
Version
()
<<
"
\n
"
;
return
-
1
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录