[petsc-dev] MatCreateVecs interface

Stefano Zampini stefano.zampini at gmail.com
Thu Jun 25 12:32:42 CDT 2015


pushed a fix
https://bitbucket.org/petsc/petsc/commits/ae287a2e7a141494f7c41f9dd537addb63b556e3

However, it appears that the functions below for CUSP, CUSPARSE and VIENNACL are mere copies of the interface.
What  about defining the type of the Vec in the interface and get rid of these?

src/mat/impls/aij/mpi/mpicusp/mpiaijcusp.cu:  A->ops->getvecs        = MatCreateVecs_MPIAIJCUSP;
src/mat/impls/aij/mpi/mpicusparse/mpiaijcusparse.cu:  A->ops->getvecs        = MatCreateVecs_MPIAIJCUSPARSE;
src/mat/impls/aij/mpi/mpiviennacl/mpiaijviennacl.cxx:  A->ops->getvecs        = MatCreateVecs_MPIAIJViennaCL;
src/mat/impls/aij/seq/seqcusp/aijcusp.cu:  B->ops->getvecs        = MatCreateVecs_SeqAIJCUSP;
src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu:  B->ops->getvecs          = MatCreateVecs_SeqAIJCUSPARSE;
src/mat/impls/aij/seq/seqviennacl/aijviennacl.cxx:  B->ops->getvecs        = MatCreateVecs_SeqAIJViennaCL;

Stefano


On Jun 25, 2015, at 4:34 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

> 
>  I think you are right, go ahead and make a pull request or send a patch
> 
>  Barry
> 
>> On Jun 25, 2015, at 9:43 AM, Stefano Zampini <stefano.zampini at gmail.com> wrote:
>> 
>> Why the current interface in MatCreateVecs requires that a matrix has been already either allocated or setup ?
>> Shouldn’t be enough to check if the layout has been already setup?
>> 
>> Stefano
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150625/e1d6877b/attachment.html>


More information about the petsc-dev mailing list