HypreCpuTransfers.hpp
Go to the documentation of this file.
84 device_arrays.vector_buffer_device, values, HYPRE_Real, N, HYPRE_MEMORY_DEVICE, HYPRE_MEMORY_HOST);
107 HYPRE_IJVectorSetValues(hypre_vec, N, const_cast<HYPRE_BigInt*>(host_arrays.indices.data()), values));
146 values, device_arrays.vector_buffer_device, HYPRE_Real, N, HYPRE_MEMORY_HOST, HYPRE_MEMORY_DEVICE);
167 HYPRE_IJVectorGetValues(hypre_vec, N, const_cast<HYPRE_BigInt*>(host_arrays.indices.data()), values));
203 device_arrays.matrix_buffer_device, values, HYPRE_Real, nnz, HYPRE_MEMORY_DEVICE, HYPRE_MEMORY_HOST);
#define OPM_HYPRE_SAFE_CALL(expr) Macro to wrap Hypre function calls with error checking. Definition: HypreErrorHandling.hpp:96 Unified interface for Hypre operations with both CPU and GPU data structures. Definition: HypreInterface.hpp:61 void transferCpuVectorToHypre(const VectorType &cpu_vec, HYPRE_IJVector hypre_vec, HypreHostDataArrays &host_arrays, const HypreDeviceDataArrays &device_arrays, const ParallelInfo &par_info, bool use_gpu_backend) Transfer CPU vector to Hypre vector. Definition: HypreCpuTransfers.hpp:67 void setDuneVectorFromContinuousVector(VectorType &v, const std::vector< HYPRE_Real > &continuous_vector_values, const std::vector< int > &local_hypre_to_local_dune) Distribute HYPRE vector values back to original vector positions. Definition: HypreCpuTransfers.hpp:52 void transferHypreToCpuVector(HYPRE_IJVector hypre_vec, VectorType &cpu_vec, HypreHostDataArrays &host_arrays, const HypreDeviceDataArrays &device_arrays, const ParallelInfo &par_info, bool use_gpu_backend) Transfer Hypre vector to CPU vector. Definition: HypreCpuTransfers.hpp:127 void updateMatrixFromCpuMatrix(const MatrixType &cpu_matrix, HYPRE_IJMatrix hypre_matrix, const SparsityPattern &sparsity_pattern, const HypreHostDataArrays &host_arrays, const HypreDeviceDataArrays &device_arrays, bool use_gpu_backend) Update Hypre matrix from CPU matrix Uses HYPRE_IJMatrixSetValues2 with pre-computed row_indexes,... Definition: HypreCpuTransfers.hpp:187 void setContinuousVectorForHypre(const VectorType &v, std::vector< HYPRE_Real > &continuous_vector_values, const std::vector< int > &local_hypre_to_local_dune) Extract owned vector values in the order expected by HYPRE. Definition: HypreCpuTransfers.hpp:37 GPU device memory arrays for HYPRE operations with GPU backend. Definition: HypreDataStructures.hpp:137 HYPRE_BigInt * rows_device Definition: HypreDataStructures.hpp:140 HYPRE_Real * vector_buffer_device Device buffer for vector operations Used when input type and backend are different,... Definition: HypreDataStructures.hpp:149 HYPRE_Int * ncols_device Mirrors host data arrays. Definition: HypreDataStructures.hpp:139 HYPRE_Int * row_indexes_device Definition: HypreDataStructures.hpp:142 HYPRE_BigInt * indices_device Definition: HypreDataStructures.hpp:143 HYPRE_Real * matrix_buffer_device Device buffer for matrix values, only needed for CPU input + GPU backend. Definition: HypreDataStructures.hpp:155 HYPRE_BigInt * cols_device Definition: HypreDataStructures.hpp:141 Host arrays for HYPRE matrix and vector data transfers. Definition: HypreDataStructures.hpp:106 std::vector< HYPRE_BigInt > indices Global DOF indices for owned degrees of freedom. Definition: HypreDataStructures.hpp:120 std::vector< HYPRE_Real > continuous_vector_values Temporary buffer for vector values in non-owner-first ordering. Definition: HypreDataStructures.hpp:128 std::vector< HYPRE_Int > row_indexes Pre-computed row start indexes for HYPRE_IJMatrixSetValues2. Definition: HypreDataStructures.hpp:113 Parallel domain decomposition information for HYPRE-Dune interface. Definition: HypreDataStructures.hpp:37 bool owner_first Whether owned DOFs appear first in local Dune ordering. Definition: HypreDataStructures.hpp:77 std::vector< int > local_hypre_to_local_dune Mapping from local HYPRE indices to local Dune indices. Definition: HypreDataStructures.hpp:59 Compressed Sparse Row (CSR) sparsity pattern for HYPRE matrix assembly. Definition: HypreDataStructures.hpp:86 std::vector< HYPRE_BigInt > rows Global row indices for owned rows (size: N_owned) Definition: HypreDataStructures.hpp:91 std::vector< HYPRE_Int > ncols Non-zero entries per owned row (size: N_owned) Definition: HypreDataStructures.hpp:88 std::vector< HYPRE_BigInt > cols Global column indices in CSR format (size: nnz) Definition: HypreDataStructures.hpp:94 |