Skip to content

Commit b0cb22b

Browse files
committed
Fixing doctests
1 parent ec8e839 commit b0cb22b

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/p_range.jl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,13 +1267,16 @@ end
12671267

12681268
function map_global_to_owner(I,global_to_owner)
12691269
Ti = eltype(global_to_owner)
1270-
function map_g_to_o(g)
1271-
if g<1
1272-
return zero(Ti)
1270+
owners = Vector{Ti}(undef,length(I))
1271+
for k in 1:length(I)
1272+
i = I[k]
1273+
if i<1
1274+
owners[k] = zero(Ti)
1275+
continue
12731276
end
1274-
global_to_owner[g]
1277+
owners[k] = global_to_owner[i]
12751278
end
1276-
map_g_to_o.(I)
1279+
owners
12771280
end
12781281

12791282
part_id(a::OwnAndGhostIndices) = a.own.owner

0 commit comments

Comments
 (0)