petsc-3.14.5 2021-03-03
Report Typos and Errors

# VecGetArrayReadInPlace

Like VecGetArrayRead(), but if this is a CUDA vector and it is currently offloaded to GPU, the returned pointer will be a GPU pointer to the GPU memory that contains this processor's portion of the vector data. Otherwise, it functions as VecGetArrayRead().

### Synopsis

    #include "petscvec.h"
    PetscErrorCode VecGetArrayReadInPlace(Vec x,const PetscScalar **a)

Not Collective

### Input Parameters

| x | - the vector

### Output Parameter

| a | - the array

### Notes

The array must be returned using a matching call to VecRestoreArrayReadInPlace().

### See Also

VecRestoreArrayReadInPlace(), VecGetArray(), VecRestoreArray(), VecGetArrayPair(), VecRestoreArrayPair(), VecGetArrayInPlace()

### Level

beginner

### Location

src/vec/vec/interface/rvector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages