MatX icon indicating copy to clipboard operation
MatX copied to clipboard

fft broken for non-owning types [BUG]

Open luitjens opened this issue 3 years ago • 1 comments

the function GetFFTInputView will not compile for non-owning types.

https://github.com/NVIDIA/MatX/blob/main/include/matx_fft.h#L706-L738

The issue is that owning/non-owning is part of the type. The output of this function will return the same owning status as the input source unless the fft_length > input length. In this case it will allocate a new tensor and return that. The size check is necessarily a runtime check. This means the function tries to return different types from different non-constexpr branches which will not compile.

luitjens avatar Aug 11 '22 17:08 luitjens

one fix would be to make owning/non-owning a runtime property and not a compile time property.

luitjens avatar Aug 11 '22 17:08 luitjens

Is this fixed with your latest change?

cliffburdick avatar Aug 17 '22 16:08 cliffburdick

fixed in 7397f0103af66d72e521a0aa547d056aa120419c

luitjens avatar Aug 17 '22 17:08 luitjens