Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
6bca22f8
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6bca22f8
编写于
7月 16, 2020
作者:
E
Eric
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added fix to include for windows
Removed log header
上级
eeba0461
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
1610 addition
and
10 deletion
+1610
-10
mindspore/ccsrc/minddata/dataset/include/dataset/core/constants.h
...e/ccsrc/minddata/dataset/include/dataset/core/constants.h
+0
-1
mindspore/ccsrc/minddata/dataset/include/dataset/core/data_type.h
...e/ccsrc/minddata/dataset/include/dataset/core/data_type.h
+0
-1
mindspore/ccsrc/minddata/dataset/include/dataset/core/tensor_shape.h
...csrc/minddata/dataset/include/dataset/core/tensor_shape.h
+0
-1
mindspore/ccsrc/minddata/dataset/include/dataset/util/status.h
...pore/ccsrc/minddata/dataset/include/dataset/util/status.h
+0
-1
mindspore/ccsrc/minddata/dataset/include/status.h
mindspore/ccsrc/minddata/dataset/include/status.h
+137
-1
mindspore/ccsrc/minddata/dataset/include/status.h
mindspore/ccsrc/minddata/dataset/include/status.h
+137
-1
mindspore/ccsrc/minddata/dataset/include/tensor.h
mindspore/ccsrc/minddata/dataset/include/tensor.h
+668
-1
mindspore/ccsrc/minddata/dataset/include/tensor.h
mindspore/ccsrc/minddata/dataset/include/tensor.h
+668
-1
mindspore/ccsrc/minddata/dataset/include/utils/log_adapter.h
mindspore/ccsrc/minddata/dataset/include/utils/log_adapter.h
+0
-1
mindspore/ccsrc/minddata/dataset/include/utils/overload.h
mindspore/ccsrc/minddata/dataset/include/utils/overload.h
+0
-1
未找到文件。
mindspore/ccsrc/minddata/dataset/include/dataset/core/constants.h
已删除
120000 → 0
浏览文件 @
eeba0461
..
/
..
/
..
/
core
/
constants
.
h
\ No newline at end of file
mindspore/ccsrc/minddata/dataset/include/dataset/core/data_type.h
已删除
120000 → 0
浏览文件 @
eeba0461
..
/
..
/
..
/
core
/
data_type
.
h
\ No newline at end of file
mindspore/ccsrc/minddata/dataset/include/dataset/core/tensor_shape.h
已删除
120000 → 0
浏览文件 @
eeba0461
..
/
..
/
..
/
core
/
tensor_shape
.
h
\ No newline at end of file
mindspore/ccsrc/minddata/dataset/include/dataset/util/status.h
已删除
120000 → 0
浏览文件 @
eeba0461
..
/
..
/
..
/
util
/
status
.
h
\ No newline at end of file
mindspore/ccsrc/minddata/dataset/include/status.h
已删除
120000 → 0
浏览文件 @
eeba0461
..
/
util
/
status
.
h
\ No newline at end of file
mindspore/ccsrc/minddata/dataset/include/status.h
0 → 100644
浏览文件 @
6bca22f8
/**
* Copyright 2019 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef DATASET_UTIL_STATUS_H_
#define DATASET_UTIL_STATUS_H_
#if defined(__GNUC__) || defined(__clang__)
#define DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
#define DEPRECATED __declspec(deprecated)
#else
#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
#define DEPRECATED
#endif
#include <iostream>
#include <string>
#include <utility>
namespace
mindspore
{
namespace
dataset
{
#define RETURN_IF_NOT_OK(_s) \
do { \
Status __rc = (_s); \
if (__rc.IsError()) { \
return __rc; \
} \
} while (false)
#define RETURN_STATUS_UNEXPECTED(_e) \
do { \
return Status(StatusCode::kUnexpectedError, __LINE__, __FILE__, _e); \
} while (false)
#define CHECK_FAIL_RETURN_UNEXPECTED(_condition, _e) \
do { \
if (!(_condition)) { \
return Status(StatusCode::kUnexpectedError, __LINE__, __FILE__, _e); \
} \
} while (false)
#define RETURN_UNEXPECTED_IF_NULL(_ptr) \
do { \
if ((_ptr) == nullptr) { \
std::string err_msg = "The pointer[" + std::string(#_ptr) + "] is null."; \
RETURN_STATUS_UNEXPECTED(err_msg); \
} \
} while (false)
enum
class
StatusCode
:
char
{
kOK
=
0
,
kOutOfMemory
=
1
,
kShapeMisMatch
=
2
,
kInterrupted
=
3
,
kNoSpace
=
4
,
kPyFuncException
=
5
,
kDuplicateKey
=
6
,
kPythonInterpreterFailure
=
7
,
kTDTPushFailure
=
8
,
kFileNotExist
=
9
,
kProfilingError
=
10
,
kBoundingBoxOutOfBounds
=
11
,
kBoundingBoxInvalidShape
=
12
,
// Make this error code the last one. Add new error code above it.
kUnexpectedError
=
127
};
std
::
string
CodeAsString
(
const
StatusCode
c
);
class
Status
{
public:
Status
()
noexcept
;
explicit
Status
(
StatusCode
c
)
noexcept
;
~
Status
()
noexcept
;
// Copy constructor
Status
(
const
Status
&
s
);
Status
&
operator
=
(
const
Status
&
s
);
// Move constructor
Status
(
Status
&&
)
noexcept
;
Status
&
operator
=
(
Status
&&
)
noexcept
;
Status
(
const
StatusCode
code
,
const
std
::
string
&
msg
);
Status
(
const
StatusCode
code
,
int
line_of_code
,
const
char
*
file_name
,
const
std
::
string
&
extra
=
""
);
// Return a success status
static
Status
OK
()
{
return
Status
(
StatusCode
::
kOK
);
}
std
::
string
ToString
()
const
;
StatusCode
get_code
()
const
;
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Status
&
s
);
explicit
operator
bool
()
const
{
return
(
get_code
()
==
StatusCode
::
kOK
);
}
bool
operator
==
(
const
Status
&
other
)
const
{
return
(
this
->
get_code
()
==
other
.
get_code
());
}
bool
operator
!=
(
const
Status
&
other
)
const
{
return
!
(
*
this
==
other
);
}
bool
IsOk
()
const
{
return
(
get_code
()
==
StatusCode
::
kOK
);
}
bool
IsError
()
const
{
return
!
IsOk
();
}
bool
IsOutofMemory
()
const
{
return
(
get_code
()
==
StatusCode
::
kOutOfMemory
);
}
bool
IsInterrupted
()
const
{
return
(
get_code
()
==
StatusCode
::
kInterrupted
);
}
bool
IsShapeIncorrect
()
const
{
return
(
get_code
()
==
StatusCode
::
kShapeMisMatch
);
}
bool
IsNoSpace
()
const
{
return
(
get_code
()
==
StatusCode
::
kNoSpace
);
}
private:
StatusCode
code_
;
std
::
string
err_msg_
;
};
}
// namespace dataset
}
// namespace mindspore
#endif // DATASET_UTIL_STATUS_H_
mindspore/ccsrc/minddata/dataset/include/tensor.h
已删除
120000 → 0
浏览文件 @
eeba0461
..
/
core
/
tensor
.
h
\ No newline at end of file
mindspore/ccsrc/minddata/dataset/include/tensor.h
0 → 100644
浏览文件 @
6bca22f8
此差异已折叠。
点击以展开。
mindspore/ccsrc/minddata/dataset/include/utils/log_adapter.h
已删除
120000 → 0
浏览文件 @
eeba0461
..
/
..
/
..
/
..
/
utils
/
log_adapter
.
h
\ No newline at end of file
mindspore/ccsrc/minddata/dataset/include/utils/overload.h
已删除
120000 → 0
浏览文件 @
eeba0461
..
/
..
/
..
/
..
/
utils
/
overload
.
h
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录