提交 4bb7d76f 编写于 作者: L liuruilong

format files

上级 336bdc1c
...@@ -213,27 +213,21 @@ int64_t &Dim<l>::operator[](int i) { ...@@ -213,27 +213,21 @@ int64_t &Dim<l>::operator[](int i) {
} }
// Dynamic access to constant Dim // Dynamic access to constant Dim
inline int64_t Dim<0>::operator[](int i) const { inline int64_t Dim<0>::operator[](int i) const { return indexer(*this, i); }
return indexer(*this, i);
}
// Dynamic access to mutable Dim // Dynamic access to mutable Dim
inline int64_t &Dim<0>::operator[](int i) { inline int64_t &Dim<0>::operator[](int i) { return indexer(*this, i); }
return indexer(*this, i);
}
// Dynamic access to constant Dim // Dynamic access to constant Dim
// without std::enable_if will try to instantiate this on get<0>(d) // without std::enable_if will try to instantiate this on get<0>(d)
template <int l> template <int l>
typename std::enable_if<(l > 0), int64_t>::type get(const Dim<l> &d, typename std::enable_if<(l > 0), int64_t>::type get(const Dim<l> &d, int i) {
int i) {
return d[i]; return d[i];
} }
// Dynamic access to mutable Dim // Dynamic access to mutable Dim
template <int l> template <int l>
typename std::enable_if<(l > 0), int64_t &>::type get(Dim<l> &d, typename std::enable_if<(l > 0), int64_t &>::type get(Dim<l> &d, int i) {
int i) {
return d[i]; return d[i];
} }
...@@ -351,8 +345,7 @@ Dim<i> normalize_strides(const Dim<i> &size, const Dim<i> &stride) { ...@@ -351,8 +345,7 @@ Dim<i> normalize_strides(const Dim<i> &size, const Dim<i> &stride) {
///\cond HIDDEN ///\cond HIDDEN
template <> template <>
inline Dim<0> normalize_strides(const Dim<0> &size, inline Dim<0> normalize_strides(const Dim<0> &size, const Dim<0> &stride) {
const Dim<0> &stride) {
return Dim<0>(); return Dim<0>();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册