Skip to content

Commit bbfbbb8

Browse files
committed
rework factorize_for_wg
1 parent d6bff7c commit bbfbbb8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/portfft/common/workgroup.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ struct wg_factorization {
7474
* @return a factorization for workgroup dft or null if the size won't work with the implemenation of workgroup dfts.
7575
*/
7676
template <typename Scalar>
77-
inline std::optional<wg_factorization> factorize_for_wg(IdxGlobal fft_size, Idx subgroup_size) {
77+
std::optional<wg_factorization> factorize_for_wg(IdxGlobal fft_size, Idx subgroup_size) {
7878
IdxGlobal n_idx_global = detail::factorize(fft_size);
7979
if (n_idx_global == 1) {
80-
throw unsupported_configuration("FFT size ", fft_size, " : Large Prime sized FFT currently is unsupported");
80+
return std::nullopt;
8181
}
82+
8283
IdxGlobal m_idx_global = fft_size / n_idx_global;
8384
if (detail::can_cast_safely<IdxGlobal, Idx>(n_idx_global) && detail::can_cast_safely<IdxGlobal, Idx>(m_idx_global)) {
8485
Idx n = static_cast<Idx>(n_idx_global);

0 commit comments

Comments
 (0)