You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Pull Request resolved: #5423
## Context
Introduce implicit conversion functions to `vec` types. This allows the following pattern:
```cpp
utils::ivec3 v1{4, 5, 2};
utils::uvec3 v2 = v1;
```
Whereas before, we would have to do
```cpp
utils::ivec3 v1{4, 5, 2};
utils::uvec3 v2(
safe_downcast<uint32_t>(v1[0],
safe_downcast<uint32_t>(v1[1],
safe_downcast<uint32_t>(v1[2]);
```
The connection with `vTensor` class cleanup is that this will allow for consolidation of `vTensor` class methods, specifically circumventing the need to provide two functions to retrieve the logical limits of the `Tensor`, one to retrieve it as a `ivec3` and another to retrieve it as a `uvec3`.
ghstack-source-id: 243309910
exported-using-ghexport
Reviewed By: jorgep31415
Differential Revision: D62878650
fbshipit-source-id: 8ed9e8ecfcc35aaf8ba6277fcf3e56c97e8fe8c7
0 commit comments