[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types
Saurabh Jha via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 30 11:30:40 PDT 2021
SaurabhJha added a comment.
Hey, I should mention that I am new to clang/llvm. My below thoughts could be wrong.
> IIRC, making C-style casts work correctly in C++ will actually be easier if you make one of the specialized casts do it; I'd say go ahead and do it in `static_cast`.
>
> Casts in C use basically a completely different code path.
Okay, then I think I will focus on static casts and C style casts for later. They use different functions, `CheckStaticCast` and `CheckCStyleCast` respectively and implementing static casts in matrix must involve change in `CheckStaticCast` and the function it calls.
> Right, vector casts are their own unfortunate thing which we don't want to semantically emulate.
>
> What code do you want to get out of this? Are there e.g. vectorized float->double conversions we can use, or is the operation basically doomed to break the matrix apart and put it back together again?
I think because matrices are vectors underneath, we should try vectorised conversions.
Thoughts?
Saurabh
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99037/new/
https://reviews.llvm.org/D99037
More information about the cfe-commits
mailing list