Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
17640d60
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,发现更多精彩内容 >>
提交
17640d60
编写于
9月 03, 2020
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18258 from alalek:opencl_multiple_execution_contexts_fixup
上级
5ae98921
87116535
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
7 deletion
+13
-7
modules/core/src/ocl.cpp
modules/core/src/ocl.cpp
+5
-4
modules/core/src/opengl.cpp
modules/core/src/opengl.cpp
+1
-1
modules/core/src/system.cpp
modules/core/src/system.cpp
+6
-1
samples/sycl/CMakeLists.txt
samples/sycl/CMakeLists.txt
+1
-1
未找到文件。
modules/core/src/ocl.cpp
浏览文件 @
17640d60
...
...
@@ -2316,8 +2316,9 @@ struct Context::Impl
typedef
std
::
deque
<
Context
::
Impl
*>
container_t
;
static
container_t
&
getGlobalContainer
()
{
static
container_t
g_contexts
;
return
g_contexts
;
// never delete this container (Impl lifetime is greater due to TLS storage)
static
container_t
*
g_contexts
=
new
container_t
();
return
*
g_contexts
;
}
protected:
...
...
@@ -2356,7 +2357,7 @@ protected:
{
cv
::
AutoLock
lock
(
cv
::
getInitializationMutex
());
auto
&
container
=
getGlobalContainer
();
CV_
Assert
((
size_t
)
contextId
<
container
.
size
()
);
CV_
CheckLT
((
size_t
)
contextId
,
container
.
size
(),
""
);
container
[
contextId
]
=
NULL
;
}
}
...
...
@@ -2839,7 +2840,7 @@ bool Context::create()
if
(
!
haveOpenCL
())
return
false
;
p
=
Impl
::
findOrCreateContext
(
std
::
string
());
if
(
p
->
handle
)
if
(
p
&&
p
->
handle
)
return
true
;
release
();
return
false
;
...
...
modules/core/src/opengl.cpp
浏览文件 @
17640d60
...
...
@@ -1692,7 +1692,7 @@ Context& initializeContextFromGL()
cl_platform_id
platform
=
platforms
[
found
];
std
::
string
platformName
=
PlatformInfo
(
platform
).
name
();
OpenCLExecutionContext
clExecCtx
=
OpenCLExecutionContext
::
create
(
platformName
,
platform
,
context
,
device
ID
);
OpenCLExecutionContext
clExecCtx
=
OpenCLExecutionContext
::
create
(
platformName
,
platform
,
context
,
device
);
clReleaseDevice
(
device
);
clReleaseContext
(
context
);
clExecCtx
.
bind
();
...
...
modules/core/src/system.cpp
浏览文件 @
17640d60
...
...
@@ -1416,7 +1416,10 @@ static TlsAbstraction* getTlsAbstraction()
#ifdef WINRT
static
__declspec
(
thread
)
void
*
tlsData
=
NULL
;
// using C++11 thread attribute for local thread data
TlsAbstraction
::
TlsAbstraction
()
{}
TlsAbstraction
::~
TlsAbstraction
()
{}
TlsAbstraction
::~
TlsAbstraction
()
{
cv
::
__termination
=
true
;
// DllMain is missing in static builds
}
void
*
TlsAbstraction
::
getData_
()
const
{
return
tlsData
;
...
...
@@ -1440,6 +1443,7 @@ TlsAbstraction::TlsAbstraction()
}
TlsAbstraction
::~
TlsAbstraction
()
{
cv
::
__termination
=
true
;
// DllMain is missing in static builds
#ifndef CV_USE_FLS
TlsFree
(
tlsKey
);
#else // CV_USE_FLS
...
...
@@ -1472,6 +1476,7 @@ TlsAbstraction::TlsAbstraction()
}
TlsAbstraction
::~
TlsAbstraction
()
{
cv
::
__termination
=
true
;
// DllMain is missing in static builds
if
(
pthread_key_delete
(
tlsKey
)
!=
0
)
{
// Don't use logging here
...
...
samples/sycl/CMakeLists.txt
浏览文件 @
17640d60
...
...
@@ -2,7 +2,7 @@ if(OPENCV_SKIP_SAMPLES_SYCL)
return
()
endif
()
ocv_install_example_src
(
open
cl *.cpp *.hpp CMakeLists.txt
)
ocv_install_example_src
(
sy
cl *.cpp *.hpp CMakeLists.txt
)
set
(
OPENCV_SYCL_SAMPLES_REQUIRED_DEPS
opencv_core
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录