Skip to content

Commit

Permalink
assembled_rows as positional argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
fverdugo committed Feb 11, 2024
1 parent ea04326 commit 526dc1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
16 changes: 6 additions & 10 deletions src/p_sparse_matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,8 @@ function psparse(f,row_partition,col_partition;assembled)
PSparseMatrix(matrix_partition,row_partition,col_partition,assembled)
end

function psparse(I,J,V,rows,cols;kwargs...)
psparse(sparse_matrix,I,J,V,rows,cols;kwargs...)
function psparse(I,J,V,rows,cols,assembled_rows=nothing;kwargs...)
psparse(sparse_matrix,I,J,V,rows,cols,assembled_rows;kwargs...)
end

"""
Expand All @@ -1054,7 +1054,7 @@ from each of the underlying parts. It returns a task that produces the
instance of [`PSparseMatrix`](@ref) allowing latency hiding while performing
the communications needed in its setup.
"""
function psparse(f,I,J,V,rows,cols;
function psparse(f,I,J,V,rows,cols,assembled_rows=nothing;
split_format=true,
subassembled=false,
assembled=false,
Expand All @@ -1063,7 +1063,6 @@ function psparse(f,I,J,V,rows,cols;
restore_ids = true,
assembly_neighbors_options_rows = (;),
assembly_neighbors_options_cols = (;),
assembled_rows = nothing,
reuse=Val(false)
)

Expand Down Expand Up @@ -1889,15 +1888,14 @@ end
"""
psystem(I,J,V,I2,V2,rows,cols;kwargs...)
"""
function psystem(I,J,V,I2,V2,rows,cols;
function psystem(I,J,V,I2,V2,rows,cols,assembled_rows=nothing;
subassembled=false,
assembled=false,
assemble=true,
indices = :global,
restore_ids = true,
assembly_neighbors_options_rows = (;),
assembly_neighbors_options_cols = (;),
assembled_rows = nothing,
reuse=Val(false)
)

Expand All @@ -1910,23 +1908,21 @@ function psystem(I,J,V,I2,V2,rows,cols;
assembled_rows = map(remove_ghost,rows)
end

t1 = psparse(I,J,V,rows,cols;
t1 = psparse(I,J,V,rows,cols,assembled_rows;
subassembled,
assembled,
assemble,
restore_ids,
assembly_neighbors_options_rows,
assembly_neighbors_options_cols,
assembled_rows,
reuse=true)

t2 = pvector(I2,V2,rows;
t2 = pvector(I2,V2,rows,assembled_rows;
subassembled,
assembled,
assemble,
restore_ids,
assembly_neighbors_options_rows,
assembled_rows,
reuse=true)

@async begin
Expand Down
7 changes: 3 additions & 4 deletions src/p_vector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ function dense_vector!(A,K,V)
end
end

function pvector(I,V,rows;kwargs...)
pvector(dense_vector,I,V,rows;kwargs...)
function pvector(I,V,rows,assembled_rows=nothing;kwargs...)
pvector(dense_vector,I,V,rows,assembled_rows;kwargs...)
end

"""
Expand All @@ -585,14 +585,13 @@ from each of the underlying parts. It returns a task that produces the
instance of [`PVector`](@ref) allowing latency hiding while performing
the communications needed in its setup.
"""
function pvector(f,I,V,rows;
function pvector(f,I,V,rows,assembled_rows=nothing;
subassembled=false,
assembled=false,
assemble=true,
restore_ids = true,
indices = :global,
reuse=Val(false),
assembled_rows = nothing,
assembly_neighbors_options_rows = (;)
)

Expand Down

0 comments on commit 526dc1d

Please sign in to comment.