Actual source code: fnutilcuda.h

slepc-3.21.1 2024-04-26
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: */
 10: /*
 11:    Utility subroutines common to several impls
 12: */

 14: #pragma once

 16: #include <slepc/private/slepcimpl.h>

 18: #if defined(PETSC_HAVE_CUDA)
 19: #include <slepccublas.h>

 21: SLEPC_INTERN __host__ PetscErrorCode set_diagonal(PetscInt,PetscScalar*,PetscInt,PetscScalar);
 22: __global__ void set_Cdiagonal_kernel(PetscInt,PetscComplex*,PetscInt,PetscReal,PetscReal,PetscInt);
 23: SLEPC_INTERN __host__ PetscErrorCode set_Cdiagonal(PetscInt,PetscComplex*,PetscInt,PetscReal,PetscReal);
 24: __global__ void shift_diagonal_kernel(PetscInt,PetscScalar*,PetscInt,PetscScalar,PetscInt);
 25: SLEPC_INTERN __host__ PetscErrorCode shift_diagonal(PetscInt,PetscScalar*,PetscInt,PetscScalar);
 26: __global__ void shift_Cdiagonal_kernel(PetscInt,PetscComplex*,PetscInt,PetscComplex,PetscInt);
 27: SLEPC_INTERN __host__ PetscErrorCode shift_Cdiagonal(PetscInt,PetscComplex*,PetscInt,PetscReal,PetscReal);
 28: __global__ void copy_array2D_S2C_kernel(PetscInt,PetscInt,PetscComplex*,PetscInt,PetscScalar*,PetscInt,PetscInt,PetscInt);
 29: SLEPC_INTERN __host__ PetscErrorCode copy_array2D_S2C(PetscInt,PetscInt,PetscComplex*,PetscInt,PetscScalar*,PetscInt);
 30: __global__ void copy_array2D_C2S_kernel(PetscInt,PetscInt,PetscScalar*,PetscInt,PetscComplex*,PetscInt,PetscInt,PetscInt);
 31: SLEPC_INTERN __host__ PetscErrorCode copy_array2D_C2S(PetscInt,PetscInt,PetscScalar*,PetscInt,PetscComplex*,PetscInt);
 32: __global__ void add_array2D_Conj_kernel(PetscInt,PetscInt,PetscComplex*,PetscInt,PetscInt,PetscInt);
 33: SLEPC_INTERN __host__ PetscErrorCode add_array2D_Conj(PetscInt,PetscInt,PetscComplex*,PetscInt);
 34: __global__ void getisreal_array2D_kernel(PetscInt,PetscInt,PetscComplex*,PetscInt,PetscBool*,PetscInt,PetscInt);
 35: SLEPC_INTERN __host__ PetscErrorCode getisreal_array2D(PetscInt,PetscInt,PetscComplex*,PetscInt,PetscBool*);
 36: __global__ void mult_diagonal_kernel(PetscInt,PetscScalar*,PetscInt,PetscScalar*,PetscInt);
 37: SLEPC_INTERN __host__ PetscErrorCode mult_diagonal(PetscInt,PetscScalar*,PetscInt,PetscScalar*);

 39: #endif /* PETSC_HAVE_CUDA */