1. petsc
  2. PETSc
  3. petsc

Commits

Karl Rupp  committed ca5856b

ViennaCL: Removed unnecessary call to resize() at vector construction.

  • Participants
  • Parent commits 3f559ed
  • Branches master

Comments (0)

Files changed (1)

File src/vec/vec/impls/seq/seqviennacl/vecviennacl.cpp

View file
     try {
       v->spptr                            = new Vec_ViennaCL;
       ((Vec_ViennaCL*)v->spptr)->GPUarray = new ViennaCLVector((PetscBLASInt)v->map->n);
-      if ((PetscBLASInt)v->map->n > 0)
-        ((Vec_ViennaCL*)v->spptr)->GPUarray->resize((PetscBLASInt)v->map->n);
 
     } catch(char *ex) {
       SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_LIB,"ViennaCL error: %s", ex);
   PetscFunctionReturn(0);
 }
 
-
-#undef __FUNCT__
-#define __FUNCT__ "VecCreate_ViennaCL"
-PETSC_EXTERN PetscErrorCode VecCreate_ViennaCL(Vec v)
-{
-  PetscErrorCode ierr;
-  PetscMPIInt    size;
-
-  PetscFunctionBegin;
-  ierr = MPI_Comm_size(PetscObjectComm((PetscObject)v),&size);CHKERRQ(ierr);
-  if (size == 1) {
-    ierr = VecSetType(v,VECSEQVIENNACL);CHKERRQ(ierr);
-  } else {
-    ierr = VecSetType(v,VECMPIVIENNACL);CHKERRQ(ierr);
-  }
-  PetscFunctionReturn(0);
-}