Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
2c634eee
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,发现更多精彩内容 >>
提交
2c634eee
编写于
12月 07, 2020
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19023 from alalek:core_update_allocator_stats_type
上级
c6e60f06
26e8048a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
9 deletion
+25
-9
modules/core/CMakeLists.txt
modules/core/CMakeLists.txt
+12
-4
modules/core/include/opencv2/core/utils/allocator_stats.impl.hpp
.../core/include/opencv2/core/utils/allocator_stats.impl.hpp
+13
-5
未找到文件。
modules/core/CMakeLists.txt
浏览文件 @
2c634eee
...
@@ -82,16 +82,24 @@ option(OPENCV_ENABLE_ALLOCATOR_STATS "Enable Allocator metrics" ON)
...
@@ -82,16 +82,24 @@ option(OPENCV_ENABLE_ALLOCATOR_STATS "Enable Allocator metrics" ON)
if
(
NOT OPENCV_ENABLE_ALLOCATOR_STATS
)
if
(
NOT OPENCV_ENABLE_ALLOCATOR_STATS
)
add_definitions
(
-DOPENCV_DISABLE_ALLOCATOR_STATS=1
)
add_definitions
(
-DOPENCV_DISABLE_ALLOCATOR_STATS=1
)
else
(
)
else
if
(
HAVE_CXX11 OR DEFINED OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
)
if
(
NOT DEFINED OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
)
if
(
NOT DEFINED OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
)
if
(
HAVE_ATOMIC_LONG_LONG AND OPENCV_ENABLE_ATOMIC_LONG_LONG
)
if
(
HAVE_ATOMIC_LONG_LONG AND OPENCV_ENABLE_ATOMIC_LONG_LONG
)
set
(
OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
"long long"
)
if
(
MINGW
)
# command-line generation issue due to space in value, int/int64_t should be used instead
# https://github.com/opencv/opencv/issues/16990
message
(
STATUS
"Consider adding OPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int/int64_t according to your build configuration"
)
else
()
set
(
OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
"long long"
)
endif
()
else
()
else
()
set
(
OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
"int"
)
set
(
OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
"int"
)
endif
()
endif
()
endif
()
endif
()
message
(
STATUS
"Allocator metrics storage type: '
${
OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
}
'"
)
if
(
DEFINED OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
)
add_definitions
(
"-DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=
${
OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
}
"
)
message
(
STATUS
"Allocator metrics storage type: '
${
OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
}
'"
)
add_definitions
(
"-DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=
${
OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
}
"
)
endif
()
endif
()
endif
()
...
...
modules/core/include/opencv2/core/utils/allocator_stats.impl.hpp
浏览文件 @
2c634eee
...
@@ -7,13 +7,11 @@
...
@@ -7,13 +7,11 @@
#include "./allocator_stats.hpp"
#include "./allocator_stats.hpp"
#ifdef CV_CXX11
#include <atomic>
#endif
//#define OPENCV_DISABLE_ALLOCATOR_STATS
//#define OPENCV_DISABLE_ALLOCATOR_STATS
namespace
cv
{
namespace
utils
{
#ifdef CV_CXX11
#include <atomic>
#ifndef OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
#ifndef OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
#if defined(__GNUC__) && (\
#if defined(__GNUC__) && (\
...
@@ -28,6 +26,16 @@ namespace cv { namespace utils {
...
@@ -28,6 +26,16 @@ namespace cv { namespace utils {
#define OPENCV_ALLOCATOR_STATS_COUNTER_TYPE long long
#define OPENCV_ALLOCATOR_STATS_COUNTER_TYPE long long
#endif
#endif
#else // CV_CXX11
#ifndef OPENCV_ALLOCATOR_STATS_COUNTER_TYPE
#define OPENCV_ALLOCATOR_STATS_COUNTER_TYPE int // CV_XADD supports int only
#endif
#endif // CV_CXX11
namespace
cv
{
namespace
utils
{
#ifdef CV__ALLOCATOR_STATS_LOG
#ifdef CV__ALLOCATOR_STATS_LOG
namespace
{
namespace
{
#endif
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录