Actual source code: fnutilcuda.h
slepc-3.15.1 2021-05-28
1: /*
2: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3: SLEPc - Scalable Library for Eigenvalue Problem Computations
4: Copyright (c) 2002-2021, 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: */
17: #include <slepcsys.h>
19: #if defined(PETSC_HAVE_CUDA)
20: #include <petsccublas.h>
22: #define X_AXIS 0
23: #define Y_AXIS 1
24: #define TILE_SIZE_X 1
25: #define BLOCK_SIZE_X 1
26: #define TILE_SIZE_Y 32
27: #define BLOCK_SIZE_Y 32
29: __global__ void clean_offdiagonal_kernel(PetscInt,PetscScalar*,PetscInt,PetscScalar,PetscInt);
30: SLEPC_INTERN __host__ PetscErrorCode clean_offdiagonal(PetscInt,PetscScalar*,PetscInt,PetscScalar);
31: __global__ void set_diagonal_kernel(PetscInt,PetscScalar*,PetscInt,PetscScalar,PetscInt);
32: SLEPC_INTERN __host__ PetscErrorCode set_diagonal(PetscInt,PetscScalar*,PetscInt,PetscScalar);
33: __global__ void set_Cdiagonal_kernel(PetscInt,PetscComplex*,PetscInt,PetscReal,PetscReal,PetscInt);
34: SLEPC_INTERN __host__ PetscErrorCode set_Cdiagonal(PetscInt,PetscComplex*,PetscInt,PetscReal,PetscReal);
35: __global__ void shift_diagonal_kernel(PetscInt,PetscScalar*,PetscInt,PetscScalar,PetscInt);
36: SLEPC_INTERN __host__ PetscErrorCode shift_diagonal(PetscInt,PetscScalar*,PetscInt,PetscScalar);
37: __global__ void shift_Cdiagonal_kernel(PetscInt,PetscComplex*,PetscInt,PetscComplex,PetscInt);
38: SLEPC_INTERN __host__ PetscErrorCode shift_Cdiagonal(PetscInt,PetscComplex*,PetscInt,PetscReal,PetscReal);
39: __global__ void copy_array2D_S2C_kernel(PetscInt,PetscInt,PetscComplex*,PetscInt,PetscScalar*,PetscInt,PetscInt,PetscInt);
40: SLEPC_INTERN __host__ PetscErrorCode copy_array2D_S2C(PetscInt,PetscInt,PetscComplex*,PetscInt,PetscScalar*,PetscInt);
41: __global__ void copy_array2D_C2S_kernel(PetscInt,PetscInt,PetscScalar*,PetscInt,PetscComplex*,PetscInt,PetscInt,PetscInt);
42: SLEPC_INTERN __host__ PetscErrorCode copy_array2D_C2S(PetscInt,PetscInt,PetscScalar*,PetscInt,PetscComplex*,PetscInt);
43: __global__ void add_array2D_Conj_kernel(PetscInt,PetscInt,PetscComplex*,PetscInt,PetscInt,PetscInt);
44: SLEPC_INTERN __host__ PetscErrorCode add_array2D_Conj(PetscInt,PetscInt,PetscComplex*,PetscInt);
45: __global__ void mult_diagonal_kernel(PetscScalar*,PetscInt,PetscInt,PetscScalar*,PetscInt);
46: __global__ void getisreal_array2D_kernel(PetscInt,PetscInt,PetscComplex*,PetscInt,PetscBool*,PetscInt,PetscInt);
47: SLEPC_INTERN __host__ PetscErrorCode getisreal_array2D(PetscInt,PetscInt,PetscComplex*,PetscInt,PetscBool*);
48: SLEPC_INTERN __host__ PetscErrorCode mult_diagonal(PetscScalar*,PetscInt, PetscInt,PetscScalar*);
49: SLEPC_INTERN __host__ PetscErrorCode get_params_1D(PetscInt,dim3*,dim3*,PetscInt*);
50: SLEPC_INTERN __host__ PetscErrorCode get_params_2D(PetscInt,PetscInt,dim3*,dim3*,PetscInt*,PetscInt*);
52: #endif /* PETSC_HAVE_CUDA */
54: #endif /* __FNUTILCUDA_H */