Date: 2024-12-02T08:57:59+00:00

Actual source code: svec.h
slepc-3.22.2 2024-12-02
Report Typos and Errors

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain

      6:    This file is part of SLEPc.
      7:    SLEPc is distributed under a 2-clause BSD license (see LICENSE).
      8:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      9: */

     11: #pragma once

     13: typedef struct {
     14:   Vec       v;
     15:   PetscBool mpi;    /* true if either VECMPI, VECMPICUDA, or VECMPIHIP */
     16: } BV_SVEC;

     18: #if defined(PETSC_HAVE_CUDA)
     19: SLEPC_INTERN PetscErrorCode BVMult_Svec_CUDA(BV,PetscScalar,PetscScalar,BV,Mat);
     20: SLEPC_INTERN PetscErrorCode BVMultVec_Svec_CUDA(BV,PetscScalar,PetscScalar,Vec,PetscScalar*);
     21: SLEPC_INTERN PetscErrorCode BVMultInPlace_Svec_CUDA(BV,Mat,PetscInt,PetscInt);
     22: SLEPC_INTERN PetscErrorCode BVMultInPlaceHermitianTranspose_Svec_CUDA(BV,Mat,PetscInt,PetscInt);
     23: SLEPC_INTERN PetscErrorCode BVDot_Svec_CUDA(BV,BV,Mat);
     24: SLEPC_INTERN PetscErrorCode BVDotVec_Svec_CUDA(BV,Vec,PetscScalar*);
     25: SLEPC_INTERN PetscErrorCode BVDotVec_Local_Svec_CUDA(BV,Vec,PetscScalar*);
     26: SLEPC_INTERN PetscErrorCode BVScale_Svec_CUDA(BV,PetscInt,PetscScalar);
     27: SLEPC_INTERN PetscErrorCode BVNorm_Svec_CUDA(BV,PetscInt,NormType,PetscReal*);
     28: SLEPC_INTERN PetscErrorCode BVNorm_Local_Svec_CUDA(BV,PetscInt,NormType,PetscReal*);
     29: SLEPC_INTERN PetscErrorCode BVNormalize_Svec_CUDA(BV,PetscScalar*);
     30: SLEPC_INTERN PetscErrorCode BVMatMult_Svec_CUDA(BV,Mat,BV);
     31: SLEPC_INTERN PetscErrorCode BVCopy_Svec_CUDA(BV,BV);
     32: SLEPC_INTERN PetscErrorCode BVCopyColumn_Svec_CUDA(BV,PetscInt,PetscInt);
     33: SLEPC_INTERN PetscErrorCode BVResize_Svec_CUDA(BV,PetscInt,PetscBool);
     34: SLEPC_INTERN PetscErrorCode BVGetColumn_Svec_CUDA(BV,PetscInt,Vec*);
     35: SLEPC_INTERN PetscErrorCode BVRestoreColumn_Svec_CUDA(BV,PetscInt,Vec*);
     36: SLEPC_INTERN PetscErrorCode BVRestoreSplit_Svec_CUDA(BV,BV*,BV*);
     37: SLEPC_INTERN PetscErrorCode BVRestoreSplitRows_Svec_CUDA(BV,IS,IS,BV*,BV*);
     38: SLEPC_INTERN PetscErrorCode BVGetMat_Svec_CUDA(BV,Mat*);
     39: SLEPC_INTERN PetscErrorCode BVRestoreMat_Svec_CUDA(BV,Mat*);
     40: #endif

     42: #if defined(PETSC_HAVE_HIP)
     43: SLEPC_INTERN PetscErrorCode BVMult_Svec_HIP(BV,PetscScalar,PetscScalar,BV,Mat);
     44: SLEPC_INTERN PetscErrorCode BVMultVec_Svec_HIP(BV,PetscScalar,PetscScalar,Vec,PetscScalar*);
     45: SLEPC_INTERN PetscErrorCode BVMultInPlace_Svec_HIP(BV,Mat,PetscInt,PetscInt);
     46: SLEPC_INTERN PetscErrorCode BVMultInPlaceHermitianTranspose_Svec_HIP(BV,Mat,PetscInt,PetscInt);
     47: SLEPC_INTERN PetscErrorCode BVDot_Svec_HIP(BV,BV,Mat);
     48: SLEPC_INTERN PetscErrorCode BVDotVec_Svec_HIP(BV,Vec,PetscScalar*);
     49: SLEPC_INTERN PetscErrorCode BVDotVec_Local_Svec_HIP(BV,Vec,PetscScalar*);
     50: SLEPC_INTERN PetscErrorCode BVScale_Svec_HIP(BV,PetscInt,PetscScalar);
     51: SLEPC_INTERN PetscErrorCode BVNorm_Svec_HIP(BV,PetscInt,NormType,PetscReal*);
     52: SLEPC_INTERN PetscErrorCode BVNorm_Local_Svec_HIP(BV,PetscInt,NormType,PetscReal*);
     53: SLEPC_INTERN PetscErrorCode BVNormalize_Svec_HIP(BV,PetscScalar*);
     54: SLEPC_INTERN PetscErrorCode BVMatMult_Svec_HIP(BV,Mat,BV);
     55: SLEPC_INTERN PetscErrorCode BVCopy_Svec_HIP(BV,BV);
     56: SLEPC_INTERN PetscErrorCode BVCopyColumn_Svec_HIP(BV,PetscInt,PetscInt);
     57: SLEPC_INTERN PetscErrorCode BVResize_Svec_HIP(BV,PetscInt,PetscBool);
     58: SLEPC_INTERN PetscErrorCode BVGetColumn_Svec_HIP(BV,PetscInt,Vec*);
     59: SLEPC_INTERN PetscErrorCode BVRestoreColumn_Svec_HIP(BV,PetscInt,Vec*);
     60: SLEPC_INTERN PetscErrorCode BVRestoreSplit_Svec_HIP(BV,BV*,BV*);
     61: SLEPC_INTERN PetscErrorCode BVRestoreSplitRows_Svec_HIP(BV,IS,IS,BV*,BV*);
     62: SLEPC_INTERN PetscErrorCode BVGetMat_Svec_HIP(BV,Mat*);
     63: SLEPC_INTERN PetscErrorCode BVRestoreMat_Svec_HIP(BV,Mat*);
     64: #endif