Skip to content

Commit

Permalink
split ifelse into lines
Browse files Browse the repository at this point in the history
  • Loading branch information
RainerHeintzmann committed Aug 29, 2023
1 parent c9aa2cd commit aee3216
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/cufft/fft.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aee3216

Please sign in to comment.