Loading...
Searching...
No Matches
gpr::linalg::kokkos_joint::JointRows< ExecSpace > Struct Template Reference

#include <gpr/linalg/KokkosJointKernel.h>

Public Member Functions

KOKKOS_INLINE_FUNCTION bool indexed () const
KOKKOS_INLINE_FUNCTION int atoms () const
KOKKOS_INLINE_FUNCTION double value (index_type row, int pair) const
KOKKOS_INLINE_FUNCTION double derivative (index_type row, int pair) const
index_type rows () const
index_type features () const

Public Attributes

Views< ExecSpace >::const_matrix q
Views< ExecSpace >::const_matrix J
Views< ExecSpace >::const_ivector channel
Views< ExecSpace >::const_ivector geometry
Views< ExecSpace >::const_ivector first
Views< ExecSpace >::const_ivector second
Kokkos::View< const double ***, Kokkos::LayoutLeft, typename Views< ExecSpace >::memory_space > spatial
Views< ExecSpace >::const_ivector atom_offsets
Views< ExecSpace >::const_ivector atom_pairs
Views< ExecSpace >::const_ivector shared_pair
Views< ExecSpace >::const_ivector pair_types

Detailed Description

template<class ExecSpace>
struct gpr::linalg::kokkos_joint::JointRows< ExecSpace >

Definition at line 37 of file KokkosJointKernel.h.

Member Function Documentation

◆ atoms()

template<class ExecSpace>
KOKKOS_INLINE_FUNCTION int gpr::linalg::kokkos_joint::JointRows< ExecSpace >::atoms ( ) const
inline

Definition at line 65 of file KokkosJointKernel.h.

66 {
67 return static_cast<int>(atom_offsets.extent(0)) - 1;
68 }
Views< ExecSpace >::const_ivector atom_offsets

◆ derivative()

template<class ExecSpace>
KOKKOS_INLINE_FUNCTION double gpr::linalg::kokkos_joint::JointRows< ExecSpace >::derivative ( index_type row,
int pair ) const
inline

Definition at line 74 of file KokkosJointKernel.h.

75 {
76 if (!geometry.extent(0)) return J(row, pair);
77 const int coordinate = channel(row) - 1;
78 if (coordinate < 0) return 0.0;
79 const int atom = coordinate / 3;
80 const double sign = atom == first(pair) ? 1.0
81 : atom == second(pair) ? -1.0
82 : 0.0;
83 return sign * spatial(geometry(row), pair, coordinate % 3);
84 }
Views< ExecSpace >::const_ivector channel
Views< ExecSpace >::const_ivector geometry
Views< ExecSpace >::const_matrix J
Views< ExecSpace >::const_ivector first
Kokkos::View< const double ***, Kokkos::LayoutLeft, typename Views< ExecSpace >::memory_space > spatial
Views< ExecSpace >::const_ivector second

◆ features()

template<class ExecSpace>
index_type gpr::linalg::kokkos_joint::JointRows< ExecSpace >::features ( ) const
inline

Definition at line 89 of file KokkosJointKernel.h.

90 {
91 return static_cast<index_type>(q.extent(1));
92 }
Views< ExecSpace >::const_matrix q

◆ indexed()

template<class ExecSpace>
KOKKOS_INLINE_FUNCTION bool gpr::linalg::kokkos_joint::JointRows< ExecSpace >::indexed ( ) const
inline

Definition at line 61 of file KokkosJointKernel.h.

62 {
63 return atom_offsets.extent(0) != 0;
64 }

◆ rows()

template<class ExecSpace>
index_type gpr::linalg::kokkos_joint::JointRows< ExecSpace >::rows ( ) const
inline

Definition at line 85 of file KokkosJointKernel.h.

86 {
87 return static_cast<index_type>(channel.extent(0));
88 }

◆ value()

template<class ExecSpace>
KOKKOS_INLINE_FUNCTION double gpr::linalg::kokkos_joint::JointRows< ExecSpace >::value ( index_type row,
int pair ) const
inline

Definition at line 70 of file KokkosJointKernel.h.

71 {
72 return q(geometry.extent(0) ? geometry(row) : row, pair);
73 }

Member Data Documentation

◆ atom_offsets

template<class ExecSpace>
Views<ExecSpace>::const_ivector gpr::linalg::kokkos_joint::JointRows< ExecSpace >::atom_offsets

Definition at line 58 of file KokkosJointKernel.h.

◆ atom_pairs

template<class ExecSpace>
Views<ExecSpace>::const_ivector gpr::linalg::kokkos_joint::JointRows< ExecSpace >::atom_pairs

Definition at line 58 of file KokkosJointKernel.h.

◆ channel

template<class ExecSpace>
Views<ExecSpace>::const_ivector gpr::linalg::kokkos_joint::JointRows< ExecSpace >::channel

Definition at line 40 of file KokkosJointKernel.h.

◆ first

template<class ExecSpace>
Views<ExecSpace>::const_ivector gpr::linalg::kokkos_joint::JointRows< ExecSpace >::first

Definition at line 44 of file KokkosJointKernel.h.

◆ geometry

template<class ExecSpace>
Views<ExecSpace>::const_ivector gpr::linalg::kokkos_joint::JointRows< ExecSpace >::geometry

Definition at line 44 of file KokkosJointKernel.h.

◆ J

template<class ExecSpace>
Views<ExecSpace>::const_matrix gpr::linalg::kokkos_joint::JointRows< ExecSpace >::J

Definition at line 39 of file KokkosJointKernel.h.

◆ pair_types

template<class ExecSpace>
Views<ExecSpace>::const_ivector gpr::linalg::kokkos_joint::JointRows< ExecSpace >::pair_types

Definition at line 59 of file KokkosJointKernel.h.

◆ q

template<class ExecSpace>
Views<ExecSpace>::const_matrix gpr::linalg::kokkos_joint::JointRows< ExecSpace >::q

Definition at line 38 of file KokkosJointKernel.h.

◆ second

template<class ExecSpace>
Views<ExecSpace>::const_ivector gpr::linalg::kokkos_joint::JointRows< ExecSpace >::second

Definition at line 44 of file KokkosJointKernel.h.

◆ shared_pair

template<class ExecSpace>
Views<ExecSpace>::const_ivector gpr::linalg::kokkos_joint::JointRows< ExecSpace >::shared_pair

Definition at line 59 of file KokkosJointKernel.h.

◆ spatial

template<class ExecSpace>
Kokkos::View<const double***, Kokkos::LayoutLeft, typename Views<ExecSpace>::memory_space> gpr::linalg::kokkos_joint::JointRows< ExecSpace >::spatial

Definition at line 47 of file KokkosJointKernel.h.


The documentation for this struct was generated from the following file: