Compare commits
39 Commits
workaround
...
experiment
Author | SHA1 | Date | |
---|---|---|---|
3a5d4fedd7 | |||
723c460cf6 | |||
810695171a | |||
70127817b3 | |||
d121daf206 | |||
f5157b6395 | |||
961b616ad1 | |||
ddfc9191d5 | |||
ae99be7207 | |||
371467c2bc | |||
1d957bc128 | |||
d036f21862 | |||
2e16b0dca7 | |||
86ad9ed5e8 | |||
0d9b066915 | |||
b39bc480a1 | |||
b7f8e4a6b3 | |||
71219f101e | |||
f3dab45f31 | |||
2784c82c23 | |||
78717c2b43 | |||
4584285126 | |||
fc31299d1e | |||
f4747bfc9d | |||
daf22ecdb0 | |||
17c2df800c | |||
fce9110e2a | |||
52e7bf43ad | |||
8bbbc72bfc | |||
6a02f3bee6 | |||
5be483c4c1 | |||
4c05167901 | |||
6186776059 | |||
c6ebf91079 | |||
a198f37f8e | |||
312d93cb4c | |||
007d970a12 | |||
3ac9954d32 | |||
7098d1801a |
@ -17,9 +17,9 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Julia environment
|
||||
uses: https://github.com/julia-actions/setup-julia@v2
|
||||
uses: https://github.com/julia-actions/setup-julia@v1.9.2
|
||||
with:
|
||||
version: '1.10'
|
||||
version: '1.9.2'
|
||||
|
||||
- name: Instantiate
|
||||
run: |
|
||||
@ -58,9 +58,9 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Julia environment
|
||||
uses: https://github.com/julia-actions/setup-julia@v2
|
||||
uses: https://github.com/julia-actions/setup-julia@v1.9.2
|
||||
with:
|
||||
version: '1.10'
|
||||
version: '1.9.2'
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
|
34
src/trie.jl
34
src/trie.jl
@ -48,7 +48,7 @@ function insert_helper!(
|
||||
trie::NodeIdTrie{NodeType},
|
||||
node::NodeType,
|
||||
depth::Int,
|
||||
) where {TaskType <: AbstractDataTask, NodeType <: DataTaskNode{TaskType}}
|
||||
) where {TaskType <: AbstractTask, NodeType <: Union{DataTaskNode{TaskType}, ComputeTaskNode{TaskType}}}
|
||||
if (length(children(node)) == depth)
|
||||
push!(trie.value, node)
|
||||
return nothing
|
||||
@ -62,26 +62,6 @@ function insert_helper!(
|
||||
end
|
||||
return insert_helper!(trie.children[id], node, depth)
|
||||
end
|
||||
# TODO: Remove this workaround once https://github.com/JuliaLang/julia/issues/54404 is fixed in julia 1.10+
|
||||
function insert_helper!(
|
||||
trie::NodeIdTrie{NodeType},
|
||||
node::NodeType,
|
||||
depth::Int,
|
||||
) where {TaskType <: AbstractComputeTask, NodeType <: ComputeTaskNode{TaskType}}
|
||||
if (length(children(node)) == depth)
|
||||
push!(trie.value, node)
|
||||
return nothing
|
||||
end
|
||||
|
||||
depth = depth + 1
|
||||
id = node.children[depth].id
|
||||
|
||||
if (!haskey(trie.children, id))
|
||||
trie.children[id] = NodeIdTrie{NodeType}()
|
||||
end
|
||||
return insert_helper!(trie.children[id], node, depth)
|
||||
end
|
||||
|
||||
|
||||
"""
|
||||
insert!(trie::NodeTrie, node::Node)
|
||||
@ -91,17 +71,7 @@ Insert the given node into the trie. It's sorted by its type in the first layer,
|
||||
function insert!(
|
||||
trie::NodeTrie,
|
||||
node::NodeType,
|
||||
) where {TaskType <: AbstractDataTask, NodeType <: DataTaskNode{TaskType}}
|
||||
if (!haskey(trie.children, NodeType))
|
||||
trie.children[NodeType] = NodeIdTrie{NodeType}()
|
||||
end
|
||||
return insert_helper!(trie.children[NodeType], node, 0)
|
||||
end
|
||||
# TODO: Remove this workaround once https://github.com/JuliaLang/julia/issues/54404 is fixed in julia 1.10+
|
||||
function insert!(
|
||||
trie::NodeTrie,
|
||||
node::NodeType,
|
||||
) where {TaskType <: AbstractComputeTask, NodeType <: ComputeTaskNode{TaskType}}
|
||||
) where {TaskType <: AbstractTask, NodeType <: Union{DataTaskNode{TaskType}, ComputeTaskNode{TaskType}}}
|
||||
if (!haskey(trie.children, NodeType))
|
||||
trie.children[NodeType] = NodeIdTrie{NodeType}()
|
||||
end
|
||||
|
Reference in New Issue
Block a user