On Thu, Jun 25, 2015 at 12:32 PM, Stefano Zampini <[email protected] > wrote:
> 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? > I think the point here is that the matrix should return Vecs of a compatible type, not a user specified one. Matt > 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 <[email protected]> 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 <[email protected]> > 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 > > > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
