Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
月光在发光
Paddle
提交
96d530c1
P
Paddle
项目概览
月光在发光
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
96d530c1
编写于
2月 23, 2022
作者:
C
chentianyu03
提交者:
GitHub
2月 23, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move array_ref_test and small_vector_test into paddle/utils and format header macro define (#39831)
上级
95280a36
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
16 addition
and
30 deletion
+16
-30
paddle/testing/CMakeLists.txt
paddle/testing/CMakeLists.txt
+0
-2
paddle/utils/CMakeLists.txt
paddle/utils/CMakeLists.txt
+2
-0
paddle/utils/any.h
paddle/utils/any.h
+2
-5
paddle/utils/array_ref.h
paddle/utils/array_ref.h
+2
-5
paddle/utils/array_ref_test.cc
paddle/utils/array_ref_test.cc
+0
-0
paddle/utils/flat_hash_map.h
paddle/utils/flat_hash_map.h
+1
-1
paddle/utils/none.h
paddle/utils/none.h
+3
-6
paddle/utils/optional.h
paddle/utils/optional.h
+3
-5
paddle/utils/small_vector.h
paddle/utils/small_vector.h
+3
-6
paddle/utils/small_vector_test.cc
paddle/utils/small_vector_test.cc
+0
-0
未找到文件。
paddle/testing/CMakeLists.txt
浏览文件 @
96d530c1
...
...
@@ -3,5 +3,3 @@
if
(
WITH_TESTING
)
cc_library
(
paddle_gtest_main SRCS paddle_gtest_main.cc DEPS init device_context memory gtest gflags
)
endif
()
cc_test
(
small_vector_test SRCS small_vector_test.cc DEPS gtest gflags
)
cc_test
(
array_ref_test SRCS array_ref_test.cc DEPS gtest gflags
)
paddle/utils/CMakeLists.txt
浏览文件 @
96d530c1
add_subdirectory
(
string
)
cc_test
(
small_vector_test SRCS small_vector_test.cc DEPS gtest gflags
)
cc_test
(
array_ref_test SRCS array_ref_test.cc DEPS gtest gflags
)
paddle/utils/any.h
浏览文件 @
96d530c1
...
...
@@ -6,8 +6,7 @@
// See http://www.boost.org/libs/any for Documentation.
#ifndef PADDLE_ANY_INCLUDED
#define PADDLE_ANY_INCLUDED
#pragma once
// what: variant type boost::any
// who: contributed by Kevlin Henney,
...
...
@@ -168,12 +167,10 @@ template <typename ValueType>
inline
const
ValueType
*
unsafe_any_cast
(
const
any
*
operand
)
{
return
unsafe_any_cast
<
ValueType
>
(
const_cast
<
any
*>
(
operand
));
}
}
}
// namespace paddle
// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#endif
paddle/utils/array_ref.h
浏览文件 @
96d530c1
...
...
@@ -12,8 +12,7 @@
//
//===----------------------------------------------------------------------===//
#ifndef PADDLE_UTILS_ARRAY_REF_H_
#define PADDLE_UTILS_ARRAY_REF_H_
#pragma once
#include <algorithm>
#include <array>
...
...
@@ -332,6 +331,4 @@ inline bool operator!=(SmallVectorImpl<T> &LHS, ArrayRef<T> RHS) {
return
!
(
LHS
==
RHS
);
}
}
// end namespace paddle
#endif // PADDLE_UTILS_ARRAY_REF_H_
}
// namespace paddle
paddle/
testing
/array_ref_test.cc
→
paddle/
utils
/array_ref_test.cc
浏览文件 @
96d530c1
文件已移动
paddle/utils/flat_hash_map.h
浏览文件 @
96d530c1
...
...
@@ -1741,4 +1741,4 @@ struct power_of_two_std_hash : std::hash<T> {
typedef
paddle
::
power_of_two_hash_policy
hash_policy
;
};
}
//
end
namespace paddle
}
// namespace paddle
paddle/utils/none.h
浏览文件 @
96d530c1
...
...
@@ -15,8 +15,7 @@
// You are welcome to contact the author at:
// fernando_cacciola@hotmail.com
//
#ifndef PADDLE_NONE_17SEP2003_HPP
#define PADDLE_NONE_17SEP2003_HPP
#pragma once
namespace
paddle
{
...
...
@@ -26,7 +25,7 @@ struct none_helper {};
typedef
int
detail
::
none_helper
::*
none_t
;
}
// namespace
boost
}
// namespace
paddle
// NOTE: Borland users have to include this header outside any precompiled
// headers
...
...
@@ -37,6 +36,4 @@ namespace paddle {
none_t
const
none
=
((
none_t
)
0
);
}
// namespace boost
#endif
}
// namespace paddle
paddle/utils/optional.h
浏览文件 @
96d530c1
...
...
@@ -17,8 +17,7 @@
// You are welcome to contact the author at:
// fernando_cacciola@hotmail.com
//
#ifndef PADDLE_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
#define PADDLE_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
#pragma once
#include <algorithm>
#include <functional>
...
...
@@ -27,6 +26,8 @@
#include "none.h"
namespace
paddle
{
// Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<>
// member template of a factory as used in the optional<> implementation.
// He proposed this simple fix which is to move the call to apply<> outside
...
...
@@ -38,7 +39,6 @@ void construct(Factory const& factory, void* address) {
}
}
namespace
paddle
{
template
<
typename
T
>
class
optional
;
...
...
@@ -865,5 +865,3 @@ inline void optional_swap(optional<T>& x, optional<T>& y) {
}
// namespace optional_detail
}
// namespace paddle
#endif
paddle/utils/small_vector.h
浏览文件 @
96d530c1
...
...
@@ -18,8 +18,7 @@
//
//===----------------------------------------------------------------------===//
#ifndef PADDLE_UTILS_SMALL_VECTOR_H_
#define PADDLE_UTILS_SMALL_VECTOR_H_
#pragma once
#include <algorithm>
#include <cassert>
...
...
@@ -1461,7 +1460,7 @@ static_assert(sizeof(SmallVectorSizeType<char>) == sizeof(uint32_t),
"Expected SmallVectorBase<uint32_t> variant to be in use."
);
#endif
}
//
end
namespace paddle
}
// namespace paddle
namespace
std
{
...
...
@@ -1479,6 +1478,4 @@ inline void swap(paddle::SmallVector<T, N> &LHS,
LHS
.
swap
(
RHS
);
}
}
// end namespace std
#endif // PADDLE_UTILS_SMALL_VECTOR_H_
}
// namespace std
paddle/
testing
/small_vector_test.cc
→
paddle/
utils
/small_vector_test.cc
浏览文件 @
96d530c1
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录