Skip to content

Commit 7357575

Browse files
authored
Removing loopvectorization (#38)
* Removing loopvectorization * Remove unused function/branches
1 parent 17c2ffb commit 7357575

File tree

3 files changed

+13
-23
lines changed

3 files changed

+13
-23
lines changed

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ version = "0.2.2"
66
[deps]
77
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
88
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
9-
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
109
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
1110
Primes = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae"
1211
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1312

1413
[compat]
1514
DocStringExtensions = "0.8"
1615
Documenter = "0.27"
17-
LoopVectorization = "0.12"
1816
MuladdMacro = "0.2"
1917
Primes = "0.5"
2018
julia = "1"

src/FFTA.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module FFTA
22

3-
using Primes, DocStringExtensions, LoopVectorization, MuladdMacro
3+
using Primes, DocStringExtensions, MuladdMacro
44
export fft, bfft
55

66
include("callgraph.jl")

src/callgraph.jl

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,23 @@ end
5555
# Get the node in the graph at index i
5656
Base.getindex(g::CallGraph{T}, i::Int) where {T} = g.nodes[i]
5757

58-
# Get the left child of the node at index `i`
59-
leftNode(g::CallGraph, i::Int) = g[i+g[i].left]
60-
61-
# Get the right child of the node at index `i`
62-
rightNode(g::CallGraph, i::Int) = g[i+g[i].right]
58+
"""
59+
$(TYPEDSIGNATURES)
60+
Check if `N` is a power of `base`
6361
62+
"""
6463
function _ispow(N, base)
65-
if base == 2
66-
while N & 0b1 == 0
67-
N >>= 1
68-
end
69-
return N == 1
70-
elseif base == 4
71-
while N & 0b11 == 0
72-
N >>= 2
73-
end
74-
return N == 1
75-
else
76-
while N % base == 0
77-
N = N/base
78-
end
79-
return N == 1
64+
while N % base == 0
65+
N = N/base
8066
end
67+
return N == 1
8168
end
8269

70+
"""
71+
$(TYPEDSIGNATURES)
72+
Check if `N` is a power of 2 or 4
73+
74+
"""
8375
function _ispow24(N::Int)
8476
N < 1 && return nothing
8577
while N & 0b11 == 0

0 commit comments

Comments
 (0)