deal.II version GIT relicensing-6917-gb466a1809f 2026-10-16 06:30:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Classes | Functions
Portable::internal::batched Namespace Reference

Classes

struct  EvaluatorTensorProduct
 
struct  EvaluatorTensorProduct< evaluate_general, dim, n_rows, n_columns, Number >
 

Functions

template<int n_rows, int n_columns, bool contract_over_rows, bool add, int stride_in, int stride_out, typename TypeMatrix , typename TypeIn , typename TypeOut >
void apply_matrix_vector_product (const TypeMatrix matrix, const TypeIn in, TypeOut out)
 
template<int n_rows, int n_columns, bool contract_over_rows, bool add, typename TypeMatrix , typename TypeIn , typename TypeOut >
void apply_matrix_vector_product (const TypeMatrix matrix, const TypeIn in, TypeOut out, const int stride_in, const int stride_out)
 
template<int dim, int direction, int n_rows, int n_columns, bool contract_over_rows, bool add, typename ViewTypeMatrix , typename ViewTypeIn , typename ViewTypeOut , typename = std::enable_if_t<Kokkos::is_view<ViewTypeOut>::value>>
void apply (const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &team_member, const ViewTypeMatrix shape_data, const ViewTypeIn in, ViewTypeOut out, const int batch_size=1)
 
template<bool add, typename ViewTypeOut , typename ViewTypeIn , typename = std::enable_if_t<Kokkos::is_view<ViewTypeOut>::value>>
void populate_view (const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &team_member, ViewTypeOut dst, const ViewTypeIn src, const int N)
 

Function Documentation

◆ apply_matrix_vector_product() [1/2]

template<int n_rows, int n_columns, bool contract_over_rows, bool add, int stride_in, int stride_out, typename TypeMatrix , typename TypeIn , typename TypeOut >
void Portable::internal::batched::apply_matrix_vector_product ( const TypeMatrix  matrix,
const TypeIn  in,
TypeOut  out 
)
inline

One-dimensional kernel for use by the generic tensor product interpolation as provided by the class batched::EvaluatorTensorProduct, implementing a matrix-vector product along this dimension, controlled by the number of rows and columns and the stride in the input and output arrays, which are embedded into some lexicographic ordering of unknowns in a tensor-product arrangement.

TypeMatrix, TypeIn and TypeOut can be any 1-dimensional array type compatible with execution on device, including Kokkos::View and raw pointer arrays.

Definition at line 693 of file portable_tensor_product_kernels.h.

◆ apply_matrix_vector_product() [2/2]

template<int n_rows, int n_columns, bool contract_over_rows, bool add, typename TypeMatrix , typename TypeIn , typename TypeOut >
void Portable::internal::batched::apply_matrix_vector_product ( const TypeMatrix  matrix,
const TypeIn  in,
TypeOut  out,
const int  stride_in,
const int  stride_out 
)
inline

Specialized version of apply_matrix_vector_product() that takes the strides as arguments, rather than as template parameters.

Definition at line 740 of file portable_tensor_product_kernels.h.

◆ apply()

template<int dim, int direction, int n_rows, int n_columns, bool contract_over_rows, bool add, typename ViewTypeMatrix , typename ViewTypeIn , typename ViewTypeOut , typename = std::enable_if_t<Kokkos::is_view<ViewTypeOut>::value>>
void Portable::internal::batched::apply ( const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &  team_member,
const ViewTypeMatrix  shape_data,
const ViewTypeIn  in,
ViewTypeOut  out,
const int  batch_size = 1 
)
inline

Helper function that applies sum factorization in a specified direction using batched kernel and apply_matrix_vector_product().

Sizes of the input and output vectors in 1D:

direction | contract_over_rows | !contract_over_rows

0 | m -> n | n -> m

Sizes of the input and output vectors in 2D:

direction | contract_over_rows | !contract_over_rows

0 | m x m -> n x m | n x m -> m x m

1 | n x m -> n x n | n x n -> n x m

Sizes of the input and output vectors in 3D:

direction | contract_over_rows | !contract_over_rows

0 | m x m x m -> n x m x m | n x m x m -> m x m x m

1 | n x m x m -> n x n x m | n x n x m -> n x m x m

2 | n x n x m -> n x n x n | n x n x n -> n x n x m

Definition at line 820 of file portable_tensor_product_kernels.h.

◆ populate_view()

template<bool add, typename ViewTypeOut , typename ViewTypeIn , typename = std::enable_if_t<Kokkos::is_view<ViewTypeOut>::value>>
void Portable::internal::batched::populate_view ( const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &  team_member,
ViewTypeOut  dst,
const ViewTypeIn  src,
const int  N 
)
inline

Helper function that copies or adds the first N entries of src to dst, depending on the template argument "add".

Definition at line 898 of file portable_tensor_product_kernels.h.