Is your feature request related to a problem? Please describe.
HLSL has a bunch of different casting builtins that are all spelled differently and not templated. That makes it difficult for template code to cast to the appropriate type if the type is a template parameter.
Describe the solution you'd like
It would be awesome to add a templated bit_cast operation. Such a casting operation was added as an implementation detail in:
Is your feature request related to a problem? Please describe. HLSL has a bunch of different casting builtins that are all spelled differently and not templated. That makes it difficult for template code to cast to the appropriate type if the type is a template parameter.
Describe the solution you'd like It would be awesome to add a templated
bit_cast
operation. Such a casting operation was added as an implementation detail in:https://github.com/llvm/llvm-project/pull/107292
I suspect we could create a similar header-implemented interface for DXC as well using type traits.