[petsc-dev] [petsc-maint] Proposal to improve MatSetValuesBlocked

Mark Adams mfadams at lbl.gov
Mon Jan 4 08:28:27 CST 2021


Hi Frank,

Jed likes static inline functions as he said. I assume this is dispatched
with a switch statement.

I would probably just use the model used for MatMult in BAIJ.
See src/mat/impls/baij/seq/baij.c. This just sets the matmult function to
point to specialized functions.

So I'd look where BAIJ sets ops->multadd and do the same for
matsetvaluesblocked. This would be called in src/mat/interface.

I see this was already done for block size 4 from Fortran
(matsetvaluesblocked4). That might be a good place to start.

Others might have better ideas. I did not write any of this code.

Thanks,
Mark



On Mon, Jan 4, 2021 at 7:48 AM Frank Bramkamp <bramkamp at nsc.liu.se> wrote:

> Hi Mark,
>
> then just let me know how you want to implement the blocking/ switch
> statements.
>
> I can also insert it manually in the code. It probably makes sense to
> implement it for
> row and column oriented BAIJ format, as well as for ADD_VALUES and insert
> values.
>
>
> I took some days off around new year. This week I am back again more
> regularly.
>
>
> Greetings,
> Frank
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20210104/d991a15b/attachment.html>


More information about the petsc-dev mailing list