Skip to content

Commit 397ca1e

Browse files
committed
Remove unused NonContiguousIterableTypesT typedef. It is easy for this typedef to get out of sync with other code
Signed-off-by: Rickert, Jonas <[email protected]>
1 parent 147590f commit 397ca1e

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/Dialect/ONNX/ElementsAttr/DisposableElementsAttr.hpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,6 @@ class DisposableElementsAttr
186186
// to copy out data in bulk with getArray/WideNums() and readArray/WideNums().
187187
//===--------------------------------------------------------------------===//
188188

189-
// All the iterable types are listed as NonContiguous here as no type
190-
// is guaranteed to be represented contiguously in the underlying buffer
191-
// because of strides and the possibility that bufferBType != btype.
192-
using NonContiguousIterableTypesT =
193-
std::tuple<Attribute, IntegerAttr, FloatAttr, APInt, APFloat, WideNum,
194-
bool, int8_t, uint8_t, int16_t, int8_t, int32_t, uint32_t, int64_t,
195-
uint64_t, onnx_mlir::float_16, onnx_mlir::bfloat_16, float, double>;
196189

197190
// An underlying iota_range sequence iterator returns size_t flat indices
198191
// which are mapped to elements of type X by a function<X(size_t)>.
@@ -206,7 +199,7 @@ class DisposableElementsAttr
206199
using iterator_range = llvm::iterator_range<iterator<X>>;
207200

208201
// This implementation enables the value_begin() and getValues() methods
209-
// from the ElementsAttr interface, for the NonContiguousIterableTypesT types.
202+
// from the ElementsAttr interface
210203
template <typename X>
211204
FailureOr<iterator<X>> try_value_begin_impl(OverloadToken<X>) const;
212205

src/Dialect/ONNX/ElementsAttr/DisposableElementsAttr.hpp.inc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
//===----------------------------------------------------------------------===//
66

77
namespace detail {
8-
// True for the types T in DisposableElementsAttr::NonContiguousIterableTypesT.
8+
99
template <typename T>
1010
constexpr bool isIterableType =
1111
llvm::is_one_of<T, Attribute, IntegerAttr, FloatAttr, APInt, APFloat,
1212
onnx_mlir::WideNum>::value ||
1313
onnx_mlir::CppTypeTrait<T>::isIntOrFloat;
1414

15-
// Supports all the types T in NonContiguousIterableTypesT.
1615
template <typename T>
1716
T getNumber(Type elementType, onnx_mlir::BType tag, onnx_mlir::WideNum n) {
1817
static_assert(isIterableType<T>);

0 commit comments

Comments
 (0)