fhahn marked an inline comment as done. fhahn added inline comments.
================ Comment at: clang/docs/MatrixTypes.rst:29 +A *matrix element type* must be a real type (as in C99 6.2.5p17) excluding +enumeration types or an implementation-defined half-precision floating point +type, otherwise the program is ill-formed. ---------------- rjmccall wrote: > fhahn wrote: > > SjoerdMeijer wrote: > > > Now I am wondering if this requires some explanations on binary > > > operations for these implemenation-defined types? For example, for > > > `__fp16` and matrices with this `__fp16` element type, I assume > > > arithmetic is performed in at least the (single) floating-point > > > precision. So I guess in section "Arithmetic Conversions" a rule needs to > > > be added that the conversion of these implementation defined types need > > > to performed? > > > > > I don't think we need to specifically discuss the implementation defined > > types here, as the conversions and binary operator definitions are framed > > in terms of the existing rules for the element types used. I am potentially > > missing something, but with the current wording the conversions for > > `__fp16` would use the conversion rules for that type and the binary > > operators would use the arithmetic rules for it. > Yeah, for the scalar conversions / scalar operands, you should just say that > the source has to be a real type and not otherwise restrict it. All of those > types should already be convertible to any matrix element type. Thanks, I've updated the wording to ensure the scalar values are of a real type in the scalar -> matrix conversion and scalar, matrix binary operator contexts. I hope that is enough to clarify things. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76612/new/ https://reviews.llvm.org/D76612 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits