petsc-3.3-p7 2013-05-11


Creates a standard, sequential array-style vector using posix threads.


#include "petscvec.h" 
PetscErrorCode VecCreateSeqPThread(MPI_Comm comm,PetscInt n,PetscInt nthreads,PetscInt affinities[],Vec *v)
Collective on MPI_Comm

Input Parameter

comm - the communicator, should be PETSC_COMM_SELF
n - the vector length
nthreads - number of threads
affinities - thread affinities

Output Parameter

V -the vector


Use VecDuplicate() or VecDuplicateVecs() to form additional vectors of the same type as an existing vector.

Use nthreads = PETSC_DECIDE for PETSc to decide the number of threads and affinities = PETSC_NULL to decide the thread affinities.

Options Database Keys

-vec_threads <nthreads> - Sets number of threads to be used for vector operations -vec_thread_affinities - Comma seperated list of thread affinities

See Also

VecCreateSeq(), VecSetNThreads(), VecSetThreadAffinities(), VecDuplicate(), VecDuplicateVecs()

Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages