Intrepid2
Public Member Functions | Private Types | Private Attributes | List of all members
Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank > Class Template Reference

Implementation of a general sum factorization algorithm, abstracted from the algorithm described by Mora and Demkowicz, for integration. Uses hierarchical parallelism. More...

#include <Intrepid2_IntegrationToolsDef.hpp>

Public Member Functions

 F_Integrate (Data< Scalar, DeviceType > integralData, TensorData< Scalar, DeviceType > leftComponent, Data< Scalar, DeviceType > composedTransform, TensorData< Scalar, DeviceType > rightComponent, TensorData< Scalar, DeviceType > cellMeasures, int a_offset, int b_offset, int leftFieldOrdinalOffset, int rightFieldOrdinalOffset, bool forceNonSpecialized)
 
template<size_t maxComponents, size_t numComponents = maxComponents>
KOKKOS_INLINE_FUNCTION int incrementArgument (Kokkos::Array< int, maxComponents > &arguments, const Kokkos::Array< int, maxComponents > &bounds) const
 
KOKKOS_INLINE_FUNCTION int incrementArgument (Kokkos::Array< int, Parameters::MaxTensorComponents > &arguments, const Kokkos::Array< int, Parameters::MaxTensorComponents > &bounds, const int &numComponents) const
 runtime-sized variant of incrementArgument; gets used by approximate flop count.
 
template<size_t maxComponents, size_t numComponents = maxComponents>
KOKKOS_INLINE_FUNCTION int nextIncrementResult (const Kokkos::Array< int, maxComponents > &arguments, const Kokkos::Array< int, maxComponents > &bounds) const
 
KOKKOS_INLINE_FUNCTION int nextIncrementResult (const Kokkos::Array< int, Parameters::MaxTensorComponents > &arguments, const Kokkos::Array< int, Parameters::MaxTensorComponents > &bounds, const int &numComponents) const
 runtime-sized variant of nextIncrementResult; gets used by approximate flop count.
 
template<size_t maxComponents, size_t numComponents = maxComponents>
KOKKOS_INLINE_FUNCTION int relativeEnumerationIndex (const Kokkos::Array< int, maxComponents > &arguments, const Kokkos::Array< int, maxComponents > &bounds, const int startIndex) const
 
KOKKOS_INLINE_FUNCTION void runSpecialized3 (const TeamMember &teamMember) const
 runSpecialized implementations are hand-coded variants of run() for a particular number of components. To allow comparisons with the generic implementation (both in terms of performance and for verification), we use the member variable forceNonSpecialized_ to determine whether runSpecialized is selected when a specialized implementation is available.
 
template<size_t numTensorComponents>
KOKKOS_INLINE_FUNCTION void run (const TeamMember &teamMember) const
 
KOKKOS_INLINE_FUNCTION void operator() (const TeamMember &teamMember) const
 
long approximateFlopCountPerCell () const
 returns an estimate of the number of floating point operations per cell (counting sums, subtractions, divisions, and multiplies, each of which counts as one operation).
 
int teamSize (const int &maxTeamSizeFromKokkos) const
 returns the team size that should be provided to the policy constructor, based on the Kokkos maximum and the amount of thread parallelism we have available.
 
size_t team_shmem_size (int team_size) const
 Provide the shared memory capacity.
 

Private Types

using ExecutionSpace = typename DeviceType::execution_space
 
using TeamPolicy = Kokkos::TeamPolicy<ExecutionSpace>
 
using TeamMember = typename TeamPolicy::member_type
 
using IntegralViewType = Kokkos::View<typename RankExpander<Scalar, integralViewRank>::value_type, DeviceType>
 

Private Attributes

IntegralViewType integralView_
 
TensorData< Scalar, DeviceType > leftComponent_
 
Data< Scalar, DeviceType > composedTransform_
 
TensorData< Scalar, DeviceType > rightComponent_
 
TensorData< Scalar, DeviceType > cellMeasures_
 
int a_offset_
 
int b_offset_
 
int leftComponentSpan_
 
int rightComponentSpan_
 
int numTensorComponents_
 
int leftFieldOrdinalOffset_
 
int rightFieldOrdinalOffset_
 
bool forceNonSpecialized_
 
size_t fad_size_output_ = 0
 
Kokkos::Array< int, 7 > offsetsForComponentOrdinal_
 
Kokkos::Array< int, Parameters::MaxTensorComponentsleftFieldBounds_
 
Kokkos::Array< int, Parameters::MaxTensorComponentsrightFieldBounds_
 
Kokkos::Array< int, Parameters::MaxTensorComponentspointBounds_
 
Kokkos::Array< int, Parameters::MaxTensorComponentsleftFieldRelativeEnumerationSpans_
 
Kokkos::Array< int, Parameters::MaxTensorComponentsrightFieldRelativeEnumerationSpans_
 
int maxFieldsLeft_
 
int maxFieldsRight_
 
int maxPointCount_
 

Detailed Description

template<class Scalar, class DeviceType, int integralViewRank>
class Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >

Implementation of a general sum factorization algorithm, abstracted from the algorithm described by Mora and Demkowicz, for integration. Uses hierarchical parallelism.

Definition at line 65 of file Intrepid2_IntegrationToolsDef.hpp.

Member Typedef Documentation

◆ ExecutionSpace

template<class Scalar , class DeviceType , int integralViewRank>
using Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::ExecutionSpace = typename DeviceType::execution_space
private

Definition at line 67 of file Intrepid2_IntegrationToolsDef.hpp.

◆ IntegralViewType

template<class Scalar , class DeviceType , int integralViewRank>
using Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::IntegralViewType = Kokkos::View<typename RankExpander<Scalar, integralViewRank>::value_type, DeviceType>
private

Definition at line 71 of file Intrepid2_IntegrationToolsDef.hpp.

◆ TeamMember

template<class Scalar , class DeviceType , int integralViewRank>
using Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::TeamMember = typename TeamPolicy::member_type
private

Definition at line 69 of file Intrepid2_IntegrationToolsDef.hpp.

◆ TeamPolicy

template<class Scalar , class DeviceType , int integralViewRank>
using Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::TeamPolicy = Kokkos::TeamPolicy<ExecutionSpace>
private

Definition at line 68 of file Intrepid2_IntegrationToolsDef.hpp.

Constructor & Destructor Documentation

◆ F_Integrate()

template<class Scalar , class DeviceType , int integralViewRank>
Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::F_Integrate ( Data< Scalar, DeviceType > integralData,
TensorData< Scalar, DeviceType > leftComponent,
Data< Scalar, DeviceType > composedTransform,
TensorData< Scalar, DeviceType > rightComponent,
TensorData< Scalar, DeviceType > cellMeasures,
int a_offset,
int b_offset,
int leftFieldOrdinalOffset,
int rightFieldOrdinalOffset,
bool forceNonSpecialized )
inline

Definition at line 103 of file Intrepid2_IntegrationToolsDef.hpp.

Member Function Documentation

◆ approximateFlopCountPerCell()

template<class Scalar , class DeviceType , int integralViewRank>
long Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::approximateFlopCountPerCell ( ) const
inline

returns an estimate of the number of floating point operations per cell (counting sums, subtractions, divisions, and multiplies, each of which counts as one operation).

Definition at line 872 of file Intrepid2_IntegrationToolsDef.hpp.

◆ incrementArgument() [1/2]

template<class Scalar , class DeviceType , int integralViewRank>
template<size_t maxComponents, size_t numComponents = maxComponents>
KOKKOS_INLINE_FUNCTION int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::incrementArgument ( Kokkos::Array< int, maxComponents > & arguments,
const Kokkos::Array< int, maxComponents > & bounds ) const
inline

Definition at line 188 of file Intrepid2_IntegrationToolsDef.hpp.

◆ incrementArgument() [2/2]

template<class Scalar , class DeviceType , int integralViewRank>
KOKKOS_INLINE_FUNCTION int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::incrementArgument ( Kokkos::Array< int, Parameters::MaxTensorComponents > & arguments,
const Kokkos::Array< int, Parameters::MaxTensorComponents > & bounds,
const int & numComponents ) const
inline

runtime-sized variant of incrementArgument; gets used by approximate flop count.

Definition at line 211 of file Intrepid2_IntegrationToolsDef.hpp.

◆ nextIncrementResult() [1/2]

template<class Scalar , class DeviceType , int integralViewRank>
template<size_t maxComponents, size_t numComponents = maxComponents>
KOKKOS_INLINE_FUNCTION int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::nextIncrementResult ( const Kokkos::Array< int, maxComponents > & arguments,
const Kokkos::Array< int, maxComponents > & bounds ) const
inline

Definition at line 229 of file Intrepid2_IntegrationToolsDef.hpp.

◆ nextIncrementResult() [2/2]

template<class Scalar , class DeviceType , int integralViewRank>
KOKKOS_INLINE_FUNCTION int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::nextIncrementResult ( const Kokkos::Array< int, Parameters::MaxTensorComponents > & arguments,
const Kokkos::Array< int, Parameters::MaxTensorComponents > & bounds,
const int & numComponents ) const
inline

runtime-sized variant of nextIncrementResult; gets used by approximate flop count.

Definition at line 250 of file Intrepid2_IntegrationToolsDef.hpp.

◆ operator()()

template<class Scalar , class DeviceType , int integralViewRank>
KOKKOS_INLINE_FUNCTION void Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::operator() ( const TeamMember & teamMember) const
inline

Definition at line 848 of file Intrepid2_IntegrationToolsDef.hpp.

◆ relativeEnumerationIndex()

template<class Scalar , class DeviceType , int integralViewRank>
template<size_t maxComponents, size_t numComponents = maxComponents>
KOKKOS_INLINE_FUNCTION int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::relativeEnumerationIndex ( const Kokkos::Array< int, maxComponents > & arguments,
const Kokkos::Array< int, maxComponents > & bounds,
const int startIndex ) const
inline

Definition at line 266 of file Intrepid2_IntegrationToolsDef.hpp.

◆ run()

template<class Scalar , class DeviceType , int integralViewRank>
template<size_t numTensorComponents>
KOKKOS_INLINE_FUNCTION void Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::run ( const TeamMember & teamMember) const
inline

Definition at line 582 of file Intrepid2_IntegrationToolsDef.hpp.

◆ runSpecialized3()

template<class Scalar , class DeviceType , int integralViewRank>
KOKKOS_INLINE_FUNCTION void Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::runSpecialized3 ( const TeamMember & teamMember) const
inline

runSpecialized implementations are hand-coded variants of run() for a particular number of components. To allow comparisons with the generic implementation (both in terms of performance and for verification), we use the member variable forceNonSpecialized_ to determine whether runSpecialized is selected when a specialized implementation is available.

Definition at line 299 of file Intrepid2_IntegrationToolsDef.hpp.

◆ team_shmem_size()

template<class Scalar , class DeviceType , int integralViewRank>
size_t Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::team_shmem_size ( int team_size) const
inline

Provide the shared memory capacity.

Definition at line 959 of file Intrepid2_IntegrationToolsDef.hpp.

◆ teamSize()

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::teamSize ( const int & maxTeamSizeFromKokkos) const
inline

returns the team size that should be provided to the policy constructor, based on the Kokkos maximum and the amount of thread parallelism we have available.

Definition at line 951 of file Intrepid2_IntegrationToolsDef.hpp.

Member Data Documentation

◆ a_offset_

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::a_offset_
private

Definition at line 77 of file Intrepid2_IntegrationToolsDef.hpp.

◆ b_offset_

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::b_offset_
private

Definition at line 78 of file Intrepid2_IntegrationToolsDef.hpp.

◆ cellMeasures_

template<class Scalar , class DeviceType , int integralViewRank>
TensorData<Scalar,DeviceType> Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::cellMeasures_
private

Definition at line 76 of file Intrepid2_IntegrationToolsDef.hpp.

◆ composedTransform_

template<class Scalar , class DeviceType , int integralViewRank>
Data<Scalar,DeviceType> Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::composedTransform_
private

Definition at line 74 of file Intrepid2_IntegrationToolsDef.hpp.

◆ fad_size_output_

template<class Scalar , class DeviceType , int integralViewRank>
size_t Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::fad_size_output_ = 0
private

Definition at line 86 of file Intrepid2_IntegrationToolsDef.hpp.

◆ forceNonSpecialized_

template<class Scalar , class DeviceType , int integralViewRank>
bool Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::forceNonSpecialized_
private

Definition at line 84 of file Intrepid2_IntegrationToolsDef.hpp.

◆ integralView_

template<class Scalar , class DeviceType , int integralViewRank>
IntegralViewType Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::integralView_
private

Definition at line 72 of file Intrepid2_IntegrationToolsDef.hpp.

◆ leftComponent_

template<class Scalar , class DeviceType , int integralViewRank>
TensorData<Scalar,DeviceType> Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::leftComponent_
private

Definition at line 73 of file Intrepid2_IntegrationToolsDef.hpp.

◆ leftComponentSpan_

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::leftComponentSpan_
private

Definition at line 79 of file Intrepid2_IntegrationToolsDef.hpp.

◆ leftFieldBounds_

template<class Scalar , class DeviceType , int integralViewRank>
Kokkos::Array<int,Parameters::MaxTensorComponents> Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::leftFieldBounds_
private

Definition at line 92 of file Intrepid2_IntegrationToolsDef.hpp.

◆ leftFieldOrdinalOffset_

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::leftFieldOrdinalOffset_
private

Definition at line 82 of file Intrepid2_IntegrationToolsDef.hpp.

◆ leftFieldRelativeEnumerationSpans_

template<class Scalar , class DeviceType , int integralViewRank>
Kokkos::Array<int,Parameters::MaxTensorComponents> Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::leftFieldRelativeEnumerationSpans_
private

Definition at line 96 of file Intrepid2_IntegrationToolsDef.hpp.

◆ maxFieldsLeft_

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::maxFieldsLeft_
private

Definition at line 99 of file Intrepid2_IntegrationToolsDef.hpp.

◆ maxFieldsRight_

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::maxFieldsRight_
private

Definition at line 100 of file Intrepid2_IntegrationToolsDef.hpp.

◆ maxPointCount_

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::maxPointCount_
private

Definition at line 101 of file Intrepid2_IntegrationToolsDef.hpp.

◆ numTensorComponents_

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::numTensorComponents_
private

Definition at line 81 of file Intrepid2_IntegrationToolsDef.hpp.

◆ offsetsForComponentOrdinal_

template<class Scalar , class DeviceType , int integralViewRank>
Kokkos::Array<int, 7> Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::offsetsForComponentOrdinal_
private

Definition at line 88 of file Intrepid2_IntegrationToolsDef.hpp.

◆ pointBounds_

template<class Scalar , class DeviceType , int integralViewRank>
Kokkos::Array<int,Parameters::MaxTensorComponents> Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::pointBounds_
private

Definition at line 94 of file Intrepid2_IntegrationToolsDef.hpp.

◆ rightComponent_

template<class Scalar , class DeviceType , int integralViewRank>
TensorData<Scalar,DeviceType> Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::rightComponent_
private

Definition at line 75 of file Intrepid2_IntegrationToolsDef.hpp.

◆ rightComponentSpan_

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::rightComponentSpan_
private

Definition at line 80 of file Intrepid2_IntegrationToolsDef.hpp.

◆ rightFieldBounds_

template<class Scalar , class DeviceType , int integralViewRank>
Kokkos::Array<int,Parameters::MaxTensorComponents> Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::rightFieldBounds_
private

Definition at line 93 of file Intrepid2_IntegrationToolsDef.hpp.

◆ rightFieldOrdinalOffset_

template<class Scalar , class DeviceType , int integralViewRank>
int Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::rightFieldOrdinalOffset_
private

Definition at line 83 of file Intrepid2_IntegrationToolsDef.hpp.

◆ rightFieldRelativeEnumerationSpans_

template<class Scalar , class DeviceType , int integralViewRank>
Kokkos::Array<int,Parameters::MaxTensorComponents> Intrepid2::Impl::F_Integrate< Scalar, DeviceType, integralViewRank >::rightFieldRelativeEnumerationSpans_
private

Definition at line 97 of file Intrepid2_IntegrationToolsDef.hpp.


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