Lines Matching refs:tp
37 OverheadType mlir::sparse_tensor::overheadTypeEncoding(Type tp) { in overheadTypeEncoding() argument
38 if (tp.isIndex()) in overheadTypeEncoding()
40 if (auto intTp = tp.dyn_cast<IntegerType>()) in overheadTypeEncoding()
98 StringRef mlir::sparse_tensor::overheadTypeFunctionSuffix(Type tp) { in overheadTypeFunctionSuffix() argument
99 return overheadTypeFunctionSuffix(overheadTypeEncoding(tp)); in overheadTypeFunctionSuffix()
161 mlir::Attribute mlir::sparse_tensor::getOneAttr(Builder &builder, Type tp) { in getOneAttr() argument
162 if (tp.isa<FloatType>()) in getOneAttr()
163 return builder.getFloatAttr(tp, 1.0); in getOneAttr()
164 if (tp.isa<IndexType>()) in getOneAttr()
166 if (auto intTp = tp.dyn_cast<IntegerType>()) in getOneAttr()
167 return builder.getIntegerAttr(tp, APInt(intTp.getWidth(), 1)); in getOneAttr()
168 if (tp.isa<RankedTensorType, VectorType>()) { in getOneAttr()
169 auto shapedTp = tp.cast<ShapedType>(); in getOneAttr()
178 Type tp = v.getType(); in genIsNonzero() local
179 Value zero = constantZero(builder, loc, tp); in genIsNonzero()
180 if (tp.isa<FloatType>()) in genIsNonzero()
183 if (tp.isIntOrIndex()) in genIsNonzero()
186 if (tp.dyn_cast<ComplexType>()) in genIsNonzero()