clang 是否像具有 _ExtInt 一样具有 _ExtFloat?
Does clang have _ExtFloat just like it has _ExtInt?
我最近一直在研究 clang 的 _ExtInt
功能(允许您声明任何大小的 int),只是想知道是否还有一个 _ExtFloat
可以用来创建自定义尺寸浮动。
不,不是。
作为参考,以下是一位 LLVM 开发人员在 Reddit 上被问到相同问题 (Source) 时所说的话:
We've actually discussed this, but they are incredibly difficult to specify. You need 3 different pieces of information, and they don't scale on different hardware well.
In the case of integers, you can do transitions with truncations/sign extensions, with floats you'd need a large software library to convert floats of unsupported sizes.
我最近一直在研究 clang 的 _ExtInt
功能(允许您声明任何大小的 int),只是想知道是否还有一个 _ExtFloat
可以用来创建自定义尺寸浮动。
不,不是。
作为参考,以下是一位 LLVM 开发人员在 Reddit 上被问到相同问题 (Source) 时所说的话:
We've actually discussed this, but they are incredibly difficult to specify. You need 3 different pieces of information, and they don't scale on different hardware well.
In the case of integers, you can do transitions with truncations/sign extensions, with floats you'd need a large software library to convert floats of unsupported sizes.