Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
656594ad
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,发现更多精彩内容 >>
提交
656594ad
编写于
4月 02, 2013
作者:
A
Andrey Kamaev
提交者:
OpenCV Buildbot
4月 02, 2013
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #736 from bitwangyaoyao:2.4_clflush
上级
baa4882a
f3254b28
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
6 deletion
+18
-6
modules/ocl/include/opencv2/ocl/ocl.hpp
modules/ocl/include/opencv2/ocl/ocl.hpp
+3
-0
modules/ocl/perf/precomp.hpp
modules/ocl/perf/precomp.hpp
+2
-0
modules/ocl/src/initialization.cpp
modules/ocl/src/initialization.cpp
+6
-1
modules/ocl/src/mcwutil.cpp
modules/ocl/src/mcwutil.cpp
+7
-5
未找到文件。
modules/ocl/include/opencv2/ocl/ocl.hpp
浏览文件 @
656594ad
...
...
@@ -126,6 +126,9 @@ namespace cv
CV_EXPORTS
void
*
getoclCommandQueue
();
//explicit call clFinish. The global command queue will be used.
CV_EXPORTS
void
finish
();
//this function enable ocl module to use customized cl_context and cl_command_queue
//getDevice also need to be called before this function
CV_EXPORTS
void
setDeviceEx
(
Info
&
oclinfo
,
void
*
ctx
,
void
*
qu
,
int
devnum
=
0
);
...
...
modules/ocl/perf/precomp.hpp
浏览文件 @
656594ad
...
...
@@ -375,6 +375,7 @@ struct name##_test: Runnable { \
while (!TestSystem::instance().stop()) { \
TestSystem::instance().gpuOn()
#define GPU_OFF \
ocl::finish(); \
TestSystem::instance().gpuOff(); \
} TestSystem::instance().gpuComplete()
...
...
@@ -388,4 +389,5 @@ struct name##_test: Runnable { \
#define WARMUP_ON \
while (!TestSystem::instance().warmupStop()) {
#define WARMUP_OFF \
ocl::finish(); \
} TestSystem::instance().warmupComplete()
modules/ocl/src/initialization.cpp
浏览文件 @
656594ad
...
...
@@ -354,6 +354,11 @@ namespace cv
return
&
(
Context
::
getContext
()
->
impl
->
clCmdQueue
);
}
void
finish
()
{
clFinish
(
Context
::
getContext
()
->
impl
->
clCmdQueue
);
}
void
queryDeviceInfo
(
DEVICE_INFO
info_type
,
void
*
info
)
{
static
Info
::
Impl
*
impl
=
Context
::
getContext
()
->
impl
;
...
...
@@ -712,7 +717,7 @@ namespace cv
clReleaseEvent
(
event
);
#endif
clF
ini
sh
(
clCxt
->
impl
->
clCmdQueue
);
clF
lu
sh
(
clCxt
->
impl
->
clCmdQueue
);
openCLSafeCall
(
clReleaseKernel
(
kernel
));
}
...
...
modules/ocl/src/mcwutil.cpp
浏览文件 @
656594ad
...
...
@@ -144,7 +144,7 @@ namespace cv
format
.
image_channel_data_type
=
CL_FLOAT
;
break
;
default:
throw
std
::
exception
(
);
CV_Error
(
-
1
,
"Image forma is not supported"
);
break
;
}
switch
(
channels
)
...
...
@@ -159,7 +159,7 @@ namespace cv
format
.
image_channel_order
=
CL_RGBA
;
break
;
default:
throw
std
::
exception
(
);
CV_Error
(
-
1
,
"Image forma is not supported"
);
break
;
}
#if CL_VERSION_1_2
...
...
@@ -197,7 +197,8 @@ namespace cv
const
size_t
regin
[
3
]
=
{
mat
.
cols
*
mat
.
elemSize
(),
mat
.
rows
,
1
};
clEnqueueCopyBufferRect
((
cl_command_queue
)
mat
.
clCxt
->
oclCommandQueue
(),
(
cl_mem
)
mat
.
data
,
devData
,
origin
,
origin
,
regin
,
mat
.
step
,
0
,
mat
.
cols
*
mat
.
elemSize
(),
0
,
0
,
NULL
,
NULL
);
}
clFlush
((
cl_command_queue
)
mat
.
clCxt
->
oclCommandQueue
());
}
else
{
devData
=
(
cl_mem
)
mat
.
data
;
...
...
@@ -206,7 +207,7 @@ namespace cv
clEnqueueCopyBufferToImage
((
cl_command_queue
)
mat
.
clCxt
->
oclCommandQueue
(),
devData
,
texture
,
0
,
origin
,
region
,
0
,
NULL
,
0
);
if
((
mat
.
cols
*
mat
.
elemSize
()
!=
mat
.
step
))
{
clF
ini
sh
((
cl_command_queue
)
mat
.
clCxt
->
oclCommandQueue
());
clF
lu
sh
((
cl_command_queue
)
mat
.
clCxt
->
oclCommandQueue
());
clReleaseMemObject
(
devData
);
}
...
...
@@ -231,7 +232,8 @@ namespace cv
try
{
cv
::
ocl
::
openCLGetKernelFromSource
(
clCxt
,
&
_kernel_string
,
"test_func"
);
//_support = true;
finish
();
_support
=
true
;
}
catch
(
const
cv
::
Exception
&
e
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录