Skip to content

Commit b655027

Browse files
committed
updates to with (Hypercube + TupleVector)
1 parent 8823e40 commit b655027

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/hypercube.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ end
1717
function NestedTuples.with(m::Module, hcube_nt::NamedTuple{N,Tuple{H}}, tv::TupleVector{T,X}, ex::TypelevelExpr{E}) where {T,X,E, N, H<:Hypercube}
1818
n = length(tv)
1919

20-
ωtv(n) = merge(hcube_nt, tv[n])
2120
(ω,) = keys(hcube_nt)
22-
23-
result = chainvec(NestedTuples.with(m, ωtv(1), ex), n)
21+
NestedTuples.with(m, hcube_nt, :(next!($ω)))
22+
result = @inbounds chainvec(NestedTuples.with(m, hcube_nt, tv[1], ex), n)
2423
for j in 2:n
2524
NestedTuples.with(m, hcube_nt, :(next!($ω)))
26-
result[j] = NestedTuples.with(m, ωtv(j), ex)
25+
@inbounds result[j] = NestedTuples.with(m, hcube_nt, tv[j], ex)
2726
end
2827
return result
2928
end

0 commit comments

Comments
 (0)