Skip to content

Commit f844907

Browse files
committed
Put radix 3 in callgraph
1 parent 24cfc87 commit f844907

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/callgraph.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ function CallGraphNode!(nodes::Vector{CallGraphNode}, N::Int, workspace::Vector{
106106
return 1
107107
end
108108
end
109+
if N % 3 == 0
110+
if _ispow(N, 3)
111+
push!(workspace, T[])
112+
push!(nodes, CallGraphNode(0, 0, Pow3FFT(), N, s_in, s_out))
113+
return 1
114+
end
115+
end
109116
if isprime(N)
110117
push!(workspace, T[])
111118
push!(nodes, CallGraphNode(0,0, DFT(),N, s_in, s_out))
@@ -114,6 +121,8 @@ function CallGraphNode!(nodes::Vector{CallGraphNode}, N::Int, workspace::Vector{
114121
Ns = [first(x) for x in collect(factor(N)) for _ in 1:last(x)]
115122
if Ns[1] == 2
116123
N1 = prod(Ns[Ns .== 2])
124+
elseif Ns[1] == 3
125+
N1 = prod(Ns[Ns .== 3])
117126
else
118127
# Greedy search for closest factor of N to sqrt(N)
119128
Nsqrt = sqrt(N)

0 commit comments

Comments
 (0)