130 using ThisType = MatrixInternal<ValueT,EllPackSize>;
132 static constexpr int ellpack_size = EllPackSize ;
134 using ValueType = ValueT;
135 using value_type = ValueT;
138 using InternalProfileType =
typename ProfileType::InternalType;
139 using IndexType =
typename InternalProfileType::IndexType;
140 using IndexBufferType =
typename InternalProfileType::IndexBufferType;
141 using IndexBufferPtrType = std::unique_ptr<IndexBufferType>;
143 using value_buffer_type = sycl::buffer<value_type, 1>;
144 using ValueBufferType = sycl::buffer<value_type, 1>;
145 using ValueBufferPtrType = std::unique_ptr<ValueBufferType>;
147 using QueueType = sycl::queue;
153 static constexpr int NxN = N*N ;
154 inline std::size_t ijk(std::size_t k,
int i,
int j)
const
156 return (k*NxN + i*N + j)*ellpack_size;
159 inline std::size_t ij(std::size_t local_id,
int i,
int j)
const
161 return local_id*NxN+ i*N + j;
167 static const int ellpack_size = EllPackSize ;
176 inline std::size_t _ijk(std::size_t k,
int i,
int j)
const
178 return (k*m_NxN + i*m_N + j)*ellpack_size;
181 inline std::size_t _ij(std::size_t local_id,
int i,
int j)
const
183 return local_id*m_NxN+ i*m_N + j;
186 template<
typename MatrixValueAccessorT,
187 typename MatrixColAccessorT,
188 typename VectorAccessorT>
189 ValueType mult(
int ieq,
190 std::size_t local_id,
192 MatrixColAccessorT& cols,
193 MatrixValueAccessorT& matrix,
194 VectorAccessorT& x)
const
196 ValueType value = 0. ;
197 auto x_offset = cols[k*ellpack_size+local_id]*m_N ;
200 for(
int j=0;j<m_N;++j)
202 auto mat_offset = _ijk(k,ieq,j)+local_id ;
203 value += matrix[mat_offset]*x[x_offset+j] ;
210 template<
typename MatrixValueAccessorT,
211 typename MatrixColAccessorT,
212 typename MaskAccessorT,
213 typename VectorAccessorT>
214 ValueType mult(
int ieq,
215 std::size_t local_id,
217 MatrixColAccessorT& cols,
219 MatrixValueAccessorT& matrix,
220 VectorAccessorT& x)
const
222 ValueType value = 0. ;
223 auto x_offset = cols[k*ellpack_size+local_id]*m_N ;
224 auto ma = mask[k*ellpack_size+local_id] ;
225 if(x_offset>=0 && ma==1)
227 for(
int j=0;j<m_N;++j)
229 auto mat_offset = _ijk(k,ieq,j)+local_id ;
230 value += matrix[mat_offset]*x[x_offset+j] ;
238 template<
typename MatrixAccT,
243 static constexpr int ellpack_size = EllPackSize ;
248 LU(
int N, MatrixAccT& matrix)
254 inline std::size_t _ijk(std::size_t k,
int i,
int j)
const
256 return (k*m_NxN + i*m_N + j)*ellpack_size;
259 inline std::size_t _ij(std::size_t local_id,
int i,
int j)
const
261 return local_id*m_NxN+ i*m_N + j;
264 void factorize([[maybe_unused]] std::size_t global_id,
265 std::size_t local_id,
266 std::size_t block_id,
271 for(
int i=0;i<m_N;++i)
272 for(
int j=0;j<m_N;++j)
273 m_LU[_ijk(block_id,i,j)+local_id] = m_matrix[_ijk(kcol,i,j)+local_id] ;
276 for (
int k = 0; k < m_N; ++k)
279 m_LU[_ijk(block_id,k,k)+local_id] = 1 / m_LU[_ijk(block_id,k,k)+local_id];
280 for (
int i = k + 1; i < m_N; ++i) {
281 m_LU[_ijk(block_id,i,k)+local_id] *= m_LU[_ijk(block_id,k,k)+local_id];
283 for (
int i = k + 1; i < m_N; ++i) {
284 for (
int j = k + 1; j < m_N; ++j) {
285 m_LU[_ijk(block_id,i,j)+local_id] -= m_LU[_ijk(block_id,i,k)+local_id] * m_LU[_ijk(block_id,k,j)+local_id];
291 void inverse(std::size_t global_id,
292 std::size_t local_id,
293 std::size_t block_id,
295 VectorAccT m_y)
const
298 for(
int i=0;i<m_N;++i)
299 for(
int j=0;j<m_N;++j)
300 m_y[_ij(global_id,i,j)] = 0. ;
301 for(
int i=0;i<m_N;++i)
302 m_y[_ij(global_id,i,i)] = 1. ;
305 for (
int i = 1; i < m_N; ++i)
307 for (
int j = 0; j < i; ++j)
309 for(
int k=0;k<m_N;++k)
310 m_y[_ij(global_id,i,k)] -= m_LU[_ijk(block_id,i,j)+local_id] * m_y[_ij(global_id,j,k)];
315 for (
int i = m_N - 1; i >= 0; --i)
317 for (
int j = m_N - 1; j > i; --j)
319 for(
int k=0;k<m_N;++k)
320 m_y[_ij(global_id,i,k)] -= m_LU[_ijk(block_id,i,j)+local_id] * m_y[_ij(global_id,j,k)];
322 for(
int k=0;k<m_N;++k)
323 m_y[_ij(global_id,i,k)] *= m_LU[_ijk(block_id,i,i)+local_id];
329 MatrixInternal(ProfileType
const* profile,
int blk_size=1);
333 bool setMatrixValues(ValueType
const* values,
bool only_host);
334 bool setMatrixValuesFromHost();
336 bool setMatrixValues(ValueBufferType& values);
337 bool setMatrixValues(ValueBufferType& values,
338 ValueBufferType& ext_values);
340 bool copy(std::size_t nb_blocks,
342 ValueBufferType& rhs_values,
343 Integer rhs_block_size);
345 bool copy(std::size_t nb_blocks,
347 ValueBufferType& rhs_values,
348 ValueBufferType& rhs_ext_values,
349 Integer rhs_block_size);
352 void notifyChanges();
356 void multN(ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const
358 auto device = queue.get_device();
360 auto num_groups = queue.get_device().get_info<sycl::info::device::max_compute_units>();
362 auto max_work_group_size = queue.get_device().get_info<sycl::info::device::max_work_group_size>();
366 std::size_t pack_size = ellpack_size;
367 auto nrows = m_profile->getNRows();
368 auto nnz = m_profile->getNnz();
370 auto internal_profile = m_profile->internal();
371 auto& kcol = internal_profile->getKCol();
372 auto& block_row_offset = internal_profile->getBlockRowOffset();
373 auto& block_cols = internal_profile->getBlockCols();
375 auto blocks_needed = (nrows + pack_size - 1) / pack_size;
376 auto blocks_target = std::max(blocks_needed, num_groups * 4UL);
377 auto total_threads = blocks_target * pack_size;
378 std::size_t wg_size = std::min<std::size_t>(pack_size, 128);
381 [&](sycl::handler& cgh)
383 auto access_block_row_offset = block_row_offset.template get_access<sycl::access::mode::read>(cgh);
384 auto access_cols = block_cols.template get_access<sycl::access::mode::read>(cgh);
385 auto access_values = m_values.template get_access<sycl::access::mode::read>(cgh);
387 auto access_x = x.template get_access<sycl::access::mode::read>(cgh);
388 auto access_y = y.template get_access<sycl::access::mode::discard_write>(cgh);
390 auto tile = TileT<N>() ;
393 sycl::nd_range<1> r{sycl::range<1>{total_threads},sycl::range<1>{wg_size}};
394 cgh.parallel_for<MultNKernel<N>>(r,
395 [=](sycl::nd_item<1> item_id)
398 const std::size_t global_id = item_id.get_global_id(0);
399 const std::size_t stride = item_id.get_global_range(0);
401 for (
auto i = global_id; i < nrows; i += stride)
403 std::size_t block_id = i / pack_size ;
404 std::size_t local_id = i % pack_size;
406 int begin = access_block_row_offset[block_id] ;
407 int end = access_block_row_offset[block_id+1] ;
411 for (
int ieq = 0; ieq < N; ++ieq)
414 for (
int k = begin; k < end; ++k)
416 const int col = access_cols[k * pack_size + local_id];
421 for (
int ju = 0; ju < N; ++ju)
422 xl[ju] = access_x[col * N + ju];
425 for (
int ieq = 0; ieq < N; ++ieq)
428 for (
int ju = 0; ju < N; ++ju)
429 value[ieq] += access_values[tile.ijk(k, ieq, ju) + local_id] * xl[ju];
435 for (
int ieq = 0; ieq < N; ++ieq)
436 access_y[i * N + ieq] = value[ieq];
442 void mult(ValueBufferType& x, ValueBufferType& y)
const;
443 void mult(ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const;
446 void addExtMultN(ValueType alpha,
449 QueueType& queue)
const
451 auto device = queue.get_device();
453 auto num_groups = queue.get_device().get_info<sycl::info::device::max_compute_units>();
455 auto max_work_group_size = queue.get_device().get_info<sycl::info::device::max_work_group_size>();
457 const std::size_t pack_size = ellpack_size;
458 const std::size_t interface_nrow = m_ext_profile->getNRows();
460 auto ext_profile = m_ext_profile->internal();
461 auto& block_row_offset = ext_profile->getBlockRowOffset();
462 auto& block_cols = ext_profile->getBlockCols();
464 const std::size_t blocks_needed = (interface_nrow + pack_size - 1) / pack_size;
465 const std::size_t blocks_target = std::max<std::size_t>(blocks_needed, num_groups * 4);
466 const std::size_t total_threads = blocks_target * pack_size;
467 const std::size_t wg_size = std::min<std::size_t>(pack_size, 128);
469 queue.submit([&](sycl::handler& cgh)
471 auto access_block_row_offset = block_row_offset.template get_access<sycl::access::mode::read>(cgh);
472 auto access_cols = block_cols.template get_access<sycl::access::mode::read>(cgh);
473 auto access_values = m_ext_values->template get_access<sycl::access::mode::read>(cgh);
474 auto access_row_ids = m_interface_row_ids->template get_access<sycl::access::mode::read>(cgh);
475 auto access_x = x.template get_access<sycl::access::mode::read>(cgh);
476 auto access_y = y.template get_access<sycl::access::mode::read_write>(cgh);
480 cgh.parallel_for<AddExtMultNKernel<N>>(
481 sycl::nd_range<1>{ sycl::range<1>{total_threads}, sycl::range<1>{wg_size} },
482 [=](sycl::nd_item<1> item)
484 const std::size_t stride = item.get_global_range(0);
485 for (std::size_t i = item.get_global_id(0); i < interface_nrow; i += stride)
487 const std::size_t block_id = i / pack_size;
488 const std::size_t local_id = i % pack_size;
490 const int begin = access_block_row_offset[block_id];
491 const int end = access_block_row_offset[block_id + 1];
495 for (
int e = 0; e < N; ++e) value[e] = 0;
497 for (
int k = begin; k < end; ++k)
499 const int col = access_cols[k * pack_size + local_id];
504 for (
int ju = 0; ju < N; ++ju) xl[ju] = access_x[col * N + ju];
506 for (
int ieq = 0; ieq < N; ++ieq)
508 for (
int ju = 0; ju < N; ++ju)
509 value[ieq] += access_values[tile.ijk(k, ieq, ju) + local_id] * xl[ju];
512 const std::size_t row = access_row_ids[i];
514 for (
int e = 0; e < N; ++e) access_y[row * N + e] += alpha * value[e];
520 void addExtMult(ValueBufferType& x, ValueBufferType& y)
const;
521 void addExtMult(ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const;
524 void addLMultN(ValueType alpha, ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const
526 auto device = queue.get_device();
528 auto num_groups = queue.get_device().get_info<sycl::info::device::max_compute_units>();
530 auto max_work_group_size = queue.get_device().get_info<sycl::info::device::max_work_group_size>();
533 std::size_t pack_size = ellpack_size;
534 auto nrows = m_profile->getNRows();
535 auto nnz = m_profile->getNnz();
537 auto internal_profile = m_profile->internal();
538 auto& kcol = internal_profile->getKCol();
539 auto& block_row_offset = internal_profile->getBlockRowOffset();
540 auto& block_cols = internal_profile->getBlockCols();
542 auto& mask = internal_profile->getLowerMask();
546 [&](sycl::handler& cgh)
548 auto access_block_row_offset = block_row_offset.template get_access<sycl::access::mode::read>(cgh);
549 auto access_cols = block_cols.template get_access<sycl::access::mode::read>(cgh);
550 auto access_mask = mask.template get_access<sycl::access::mode::read>(cgh);
551 auto access_values = m_values.template get_access<sycl::access::mode::read>(cgh);
554 auto access_x = x.template get_access<sycl::access::mode::read>(cgh);
555 auto access_y = y.template get_access<sycl::access::mode::read_write>(cgh);
557 auto blocks_needed = (nrows + pack_size - 1) / pack_size;
558 auto blocks_target = std::max(blocks_needed, num_groups * 4UL);
559 auto total_threads = blocks_target * pack_size;
560 std::size_t wg_size = std::min<std::size_t>(pack_size, 128);
564 sycl::nd_range<1> r{sycl::range<1>{total_threads},sycl::range<1>{wg_size}};
565 cgh.parallel_for<AddLMultNKernel<N>>(r,
566 [=](sycl::nd_item<1> item_id)
568 const std::size_t global_id = item_id.get_global_id(0);
569 const std::size_t stride = item_id.get_global_range(0);
571 for (
auto i = global_id; i < nrows; i += stride)
573 auto block_id = i / pack_size ;
574 auto local_id = i % pack_size ;
576 int begin = access_block_row_offset[block_id] ;
577 int end = access_block_row_offset[block_id+1] ;
581 for (
int ieq = 0; ieq < N; ++ieq)
584 for (
int k = begin; k < end; ++k)
586 const int col = access_cols[k * pack_size + local_id];
587 if (col >= 0 && access_mask[k * pack_size + local_id])
591 for (
int ju = 0; ju < N; ++ju)
592 xl[ju] = access_x[col * N + ju];
595 for (
int ieq = 0; ieq < N; ++ieq)
598 for (
int ju = 0; ju < N; ++ju)
599 value[ieq] += access_values[tile.ijk(k, ieq, ju) + local_id] * xl[ju];
605 for (
int ieq = 0; ieq < N; ++ieq)
606 access_y[i * N + ieq] += alpha * value[ieq];
638 void addUMultN(ValueType alpha, ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const
640 auto device = queue.get_device();
642 auto num_groups = queue.get_device().get_info<sycl::info::device::max_compute_units>();
644 auto max_work_group_size = queue.get_device().get_info<sycl::info::device::max_work_group_size>();
649 std::size_t pack_size = ellpack_size;
650 auto nrows = m_profile->getNRows() ;
651 auto nnz = m_profile->getNnz() ;
653 auto blocks_needed = (nrows + pack_size - 1) / pack_size;
654 auto blocks_target = std::max(blocks_needed, num_groups * 4UL);
655 auto total_threads = blocks_target * pack_size;
656 std::size_t wg_size = std::min<std::size_t>(pack_size, 128);
658 auto internal_profile = m_profile->internal() ;
659 auto& kcol = internal_profile->getKCol() ;
660 auto& block_row_offset = internal_profile->getBlockRowOffset() ;
661 auto& block_cols = internal_profile->getBlockCols() ;
662 auto& mask = internal_profile->getUpperMask() ;
665 [&](sycl::handler& cgh)
667 auto access_block_row_offset = block_row_offset.template get_access<sycl::access::mode::read>(cgh);
668 auto access_cols = block_cols.template get_access<sycl::access::mode::read>(cgh);
669 auto access_mask = mask.template get_access<sycl::access::mode::read>(cgh);
670 auto access_values = m_values.template get_access<sycl::access::mode::read>(cgh);
673 auto access_x = x.template get_access<sycl::access::mode::read>(cgh);
674 auto access_y = y.template get_access<sycl::access::mode::read_write>(cgh);
678 sycl::nd_range<1> r{sycl::range<1>{total_threads},sycl::range<1>{wg_size}};
679 cgh.parallel_for<AddUMultNKernel<N>>(
681 [=](sycl::nd_item<1> item_id)
684 const std::size_t local_id = item_id.get_local_id(0);
685 const std::size_t global_id = item_id.get_global_id(0);
686 const std::size_t stride = item_id.get_global_range(0);
688 for (
auto i = global_id; i < nrows; i += stride)
690 auto block_id = i / pack_size ;
692 auto begin = access_block_row_offset[block_id] ;
693 auto end = access_block_row_offset[block_id+1] ;
697 for (
int ieq = 0; ieq < N; ++ieq)
700 for (
int k = begin; k < end; ++k)
702 const int col = access_cols[k * pack_size + local_id];
703 if (col >= 0 && access_mask[k * pack_size + local_id])
707 for (
int ju = 0; ju < N; ++ju)
708 xl[ju] = access_x[col * N + ju];
711 for (
int ieq = 0; ieq < N; ++ieq)
714 for (
int ju = 0; ju < N; ++ju)
715 value[ieq] += access_values[tile.ijk(k, ieq, ju) + local_id] * xl[ju];
721 for (
int ieq = 0; ieq < N; ++ieq)
722 access_y[i * N + ieq] += alpha * value[ieq];
751 void addLMult(ValueType alpha, ValueBufferType& x, ValueBufferType& y)
const;
752 void addUMult(ValueType alpha, ValueBufferType& x, ValueBufferType& y)
const;
754 void addLMult(ValueType alpha, ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const;
755 void addUMult(ValueType alpha, ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const;
759 void addExtLMultN(ValueType alpha, ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const
761 auto device = queue.get_device();
763 auto num_groups = queue.get_device().get_info<sycl::info::device::max_compute_units>();
765 auto max_work_group_size = queue.get_device().get_info<sycl::info::device::max_work_group_size>();
769 std::size_t pack_size = ellpack_size;
771 auto nrows = m_profile->getNRows();
772 auto nnz = m_profile->getNnz();
774 auto interface_nrow = m_ext_profile->getNRows();
775 auto first_upper_ghost = m_first_upper_ghost_index ;
776 auto ext_profile = m_ext_profile->internal();
777 auto& kcol = ext_profile->getKCol();
778 auto& block_row_offset = ext_profile->getBlockRowOffset();
779 auto& block_cols = ext_profile->getBlockCols();
781 auto blocks_needed = (interface_nrow + pack_size - 1) / pack_size;
782 auto blocks_target = std::max(blocks_needed, num_groups * 4UL);
783 auto total_threads = blocks_target * pack_size;
784 std::size_t wg_size = std::min<std::size_t>(pack_size, 128);
789 queue.submit([&](sycl::handler& cgh)
791 auto access_block_row_offset = block_row_offset.template get_access<sycl::access::mode::read>(cgh);
792 auto access_cols = block_cols.template get_access<sycl::access::mode::read>(cgh);
793 auto access_values = m_ext_values->template get_access<sycl::access::mode::read>(cgh);
795 auto access_row_ids = m_interface_row_ids->template get_access<sycl::access::mode::read>(cgh);
797 auto access_x = x.template get_access<sycl::access::mode::read>(cgh);
798 auto access_y = y.template get_access<sycl::access::mode::read_write>(cgh);
802 sycl::nd_range<1> r{sycl::range<1>{total_threads},sycl::range<1>{wg_size}};
803 cgh.parallel_for<
class compute_ext_lmult>(
805 [=] (sycl::nd_item<1> item_id)
807 const std::size_t global_id = item_id.get_global_id(0);
808 const std::size_t stride = item_id.get_global_range(0);
810 for (
auto i = global_id; i < interface_nrow; i += stride)
812 auto block_id = i / pack_size ;
813 auto local_id = i % pack_size ;
815 auto begin = access_block_row_offset[block_id] ;
816 auto end = access_block_row_offset[block_id+1] ;
821 for (
int ieq = 0; ieq < N; ++ieq)
825 for (
int k = begin; k < end; ++k)
827 const int col = access_cols[k * pack_size + local_id];
828 if (col >= 0 && col < first_upper_ghost)
832 for (
int ju = 0; ju < N; ++ju)
833 xl[ju] = access_x[col * N + ju];
836 for (
int ieq = 0; ieq < N; ++ieq)
839 for (
int ju = 0; ju < N; ++ju)
840 value[ieq] += access_values[tile.ijk(k, ieq, ju) + local_id] * xl[ju];
846 for (
int ieq = 0; ieq < N; ++ieq)
847 access_y[access_row_ids[i] * N + ieq] += alpha * value[ieq];
874 void addExtLMult(ValueType alpha, ValueBufferType& x, ValueBufferType& y)
const;
875 void addExtLMult(ValueType alpha, ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const;
878 void addExtUMultN(ValueType alpha, ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const
880 auto device = queue.get_device();
882 auto num_groups = queue.get_device().get_info<sycl::info::device::max_compute_units>();
884 auto max_work_group_size = queue.get_device().get_info<sycl::info::device::max_work_group_size>();
888 std::size_t pack_size = ellpack_size;
891 auto nrows = m_profile->getNRows();
892 auto nnz = m_profile->getNnz();
894 auto interface_nrow = m_ext_profile->getNRows();
895 auto first_upper_ghost = m_first_upper_ghost_index ;
896 auto ext_profile = m_ext_profile->internal();
897 auto& kcol = ext_profile->getKCol();
898 auto& block_row_offset = ext_profile->getBlockRowOffset();
899 auto& block_cols = ext_profile->getBlockCols();
901 auto blocks_needed = (interface_nrow + ellpack_size - 1) / ellpack_size;
902 auto blocks_target = std::max(blocks_needed, num_groups * 4UL);
903 auto total_threads = blocks_target * ellpack_size;
907 queue.submit([&](sycl::handler& cgh)
909 auto access_block_row_offset = block_row_offset.template get_access<sycl::access::mode::read>(cgh);
910 auto access_cols = block_cols.template get_access<sycl::access::mode::read>(cgh);
911 auto access_values = m_ext_values->template get_access<sycl::access::mode::read>(cgh);
913 auto access_row_ids = m_interface_row_ids->template get_access<sycl::access::mode::read>(cgh);
915 auto access_x = x.template get_access<sycl::access::mode::read>(cgh);
916 auto access_y = y.template get_access<sycl::access::mode::read_write>(cgh);
919 sycl::nd_range<1> r{sycl::range<1>{total_threads},sycl::range<1>{pack_size}};
920 cgh.parallel_for<
class compute_ext_lmult>(
922 [=] (sycl::nd_item<1> item_id)
924 const std::size_t global_id = item_id.get_global_id(0);
925 const std::size_t stride = item_id.get_global_range(0);
927 for (
auto i = global_id; i < interface_nrow; i += stride)
929 auto block_id = i / pack_size ;
930 auto local_id = i % pack_size ;
933 auto begin = access_block_row_offset[block_id] ;
934 auto end = access_block_row_offset[block_id+1] ;
939 for (
int ieq = 0; ieq < N; ++ieq)
943 for (
int k = begin; k < end; ++k)
945 const int col = access_cols[k * pack_size + local_id];
946 if (col >= 0 && col >= first_upper_ghost)
950 for (
int ju = 0; ju < N; ++ju)
951 xl[ju] = access_x[col * N + ju];
954 for (
int ieq = 0; ieq < N; ++ieq)
957 for (
int ju = 0; ju < N; ++ju)
958 value[ieq] += access_values[tile.ijk(k, ieq, ju) + local_id] * xl[ju];
964 for (
int ieq = 0; ieq < N; ++ieq)
965 access_y[access_row_ids[i] * N + ieq] += alpha * value[ieq];
994 void addExtUMult(ValueType alpha, ValueBufferType& x, ValueBufferType& y)
const;
995 void addExtUMult(ValueType alpha, ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const;
997 void multDiag(ValueBufferType& x, ValueBufferType& y)
const;
998 void multDiag(ValueBufferType& x, ValueBufferType& y, QueueType& queue)
const;
1000 void multDiag(ValueBufferType& y)
const;
1001 void multDiag(ValueBufferType& y, QueueType& queue)
const;
1003 void computeDiag(ValueBufferType& y)
const;
1004 void computeDiag(ValueBufferType& y, QueueType& queue)
const;
1006 void computeBlockDiag(ValueBufferType& y)
const;
1007 void computeBlockDiag(ValueBufferType& y, QueueType& queue)
const;
1009 void multInvDiag(ValueBufferType& y)
const;
1010 void multInvDiag(ValueBufferType& y, QueueType& queue)
const;
1012 void computeInvDiag(ValueBufferType& y)
const;
1013 void computeInvDiag(ValueBufferType& y, QueueType& queue)
const;
1015 void computeInvBlockDiag(ValueBufferType& y)
const;
1016 void computeInvBlockDiag(ValueBufferType& y, QueueType& queue)
const;
1018 void scal(ValueBufferType& y);
1020 void scal(ValueBufferType& y, QueueType& queue);
1022 void copyDevicePointers(
int local_offset,
1028 ValueT* values)
const ;
1030 ValueBufferType& getValues() {
return m_values; }
1032 ValueBufferType
const getValues()
const {
return m_values; }
1036 ProfileType
const* getProfile()
const {
return m_profile; }
1038 ValueType
const* getHCsrData()
const
1040 return m_h_csr_values.data();
1043 ValueType* getHCsrData()
1045 return m_h_csr_values.data();
1048 IndexBufferType& getSendIds()
const
1052 IndexBufferType& getRecvIds()
const
1060 ProfileType
const* m_profile =
nullptr;
1061 ProfileType
const* m_ext_profile =
nullptr;
1062 int m_first_upper_ghost_index = 0 ;
1064 std::vector<ValueType> m_h_csr_values ;
1065 std::vector<ValueType> m_h_values ;
1066 mutable ValueBufferType m_values ;
1068 std::vector<ValueType> m_h_csr_ext_values ;
1069 std::vector<ValueType> m_h_ext_values ;
1070 mutable ValueBufferPtrType m_ext_values ;
1071 bool m_values_is_update = false ;
1073 int const* m_h_interface_row_ids =
nullptr;
1074 mutable IndexBufferPtrType m_interface_row_ids ;
1075 mutable IndexBufferPtrType m_send_ids ;
1076 mutable IndexBufferPtrType m_recv_ids ;
1077 mutable IndexBufferPtrType m_recv_uids ;