[Mlir-commits] [mlir] 7720d65 - Add constructor to ShapedTypeComponents for unranked with element type.
Stella Laurenzo
llvmlistbot at llvm.org
Fri Apr 24 10:43:27 PDT 2020
Author: Stella Laurenzo
Date: 2020-04-24T10:43:08-07:00
New Revision: 7720d6578cc9e639c751b1577c3e40a8e2d33e00
URL: https://github.com/llvm/llvm-project/commit/7720d6578cc9e639c751b1577c3e40a8e2d33e00
DIFF: https://github.com/llvm/llvm-project/commit/7720d6578cc9e639c751b1577c3e40a8e2d33e00.diff
LOG: Add constructor to ShapedTypeComponents for unranked with element type.
Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, grosul1, frgossen, Kayjukh, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78774
Added:
Modified:
mlir/include/mlir/Interfaces/InferTypeOpInterface.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/Interfaces/InferTypeOpInterface.h b/mlir/include/mlir/Interfaces/InferTypeOpInterface.h
index 0da1125dfc4b..c13f2e358d6f 100644
--- a/mlir/include/mlir/Interfaces/InferTypeOpInterface.h
+++ b/mlir/include/mlir/Interfaces/InferTypeOpInterface.h
@@ -38,7 +38,8 @@ class ShapedTypeComponents {
public:
/// Default construction is an unranked shape.
ShapedTypeComponents() : ranked(false), elementType(nullptr), attr(nullptr){};
-
+ ShapedTypeComponents(Type elementType)
+ : ranked(false), elementType(elementType), attr(nullptr) {}
template <typename Arg, typename = typename std::enable_if_t<
std::is_constructible<ShapeStorageT, Arg>::value>>
ShapedTypeComponents(Arg &&arg, Type elementType = nullptr,
More information about the Mlir-commits
mailing list