From aee32167dfa6aa9010f593d87f7f46e4ecc52d49 Mon Sep 17 00:00:00 2001 From: RainerHeintzmann Date: Tue, 29 Aug 2023 11:32:23 +0200 Subject: [PATCH] split ifelse into lines --- lib/cufft/fft.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/cufft/fft.jl b/lib/cufft/fft.jl index 5ccc595a6a..c431453d1f 100644 --- a/lib/cufft/fft.jl +++ b/lib/cufft/fft.jl @@ -148,7 +148,11 @@ end # yields the maximal dimensions of the plan, for plans starting at dim 1 or ending at the size vector, # this is always the full input size function plan_max_dims(region, sz) - ifelse(region[1] == 1 && (length(region) <=1 || all(diff(collect(region)) .== 1)), length(sz), region[end]) + if (region[1] == 1 && (length(region) <=1 || all(diff(collect(region)) .== 1))) + return length(sz) + else + return region[end] + end end # retrieves the size to allocate even if the trailing dimensions do no transform