This commit is contained in:
Ruipeng Li 2022-06-09 00:31:47 -07:00
parent 26d53aacce
commit 5b35ee3a41

View File

@ -1057,6 +1057,13 @@ hypre_ParCSRTMatMatPartialAddDevice( hypre_ParCSRCommPkg *comm_pkg,
HYPRE_Int *ie_ii = hypre_TAlloc(HYPRE_Int, num_rows + num_elemt, HYPRE_MEMORY_DEVICE);
HYPRE_Int *ie_j = hypre_TAlloc(HYPRE_Int, num_rows + num_elemt, HYPRE_MEMORY_DEVICE);
HYPRE_Complex *ie_a = NULL;
if (hypre_HandleSpgemmUseVendor(hypre_handle()))
{
ie_a = hypre_TAlloc(HYPRE_Complex, num_rows + num_elemt, HYPRE_MEMORY_DEVICE);
HYPRE_THRUST_CALL(fill, ie_a, ie_a + num_rows + num_elemt, 1.0);
}
HYPRE_THRUST_CALL( sequence, ie_ii, ie_ii + num_rows);
HYPRE_THRUST_CALL( copy, send_map, send_map + num_elemt, ie_ii + num_rows);
@ -1068,6 +1075,7 @@ hypre_ParCSRTMatMatPartialAddDevice( hypre_ParCSRCommPkg *comm_pkg,
hypre_CSRMatrixI(IE) = ie_i;
hypre_CSRMatrixJ(IE) = ie_j;
hypre_CSRMatrixData(IE) = ie_a;
// CC = [Cbar_local; Cext]
hypre_CSRMatrix *CC = hypre_CSRMatrixStack2Device(Cbar_local, Cext);