Sacado Package Browser (Single Doxygen Collection)  Version of the Day
Classes | Macros | Typedefs | Functions | Variables
Fad_KokkosTests.hpp File Reference
#include "Teuchos_TestingHelpers.hpp"
#include "Sacado.hpp"
#include "Kokkos_DynRankView_Fad.hpp"
Include dependency graph for Fad_KokkosTests.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MultiplyKernel< InputViewType1, InputViewType2, OutputViewType >
 
struct  ScalarAssignKernel< ViewType, ScalarType >
 
struct  AssignRank2Rank1Kernel< InputViewType, OutputViewType >
 

Macros

#define VIEW_FAD_TESTS_FLD(F, L, D)
 
#define VIEW_FAD_TESTS_SFLD(F, L, D)   TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, SFadNoSizeArg, F, L, D )
 
#define VIEW_FAD_TESTS_FD(F, D)
 
#define VIEW_FAD_TESTS_SFD(F, D)
 
#define VIEW_FAD_TESTS_D(D)
 

Typedefs

typedef Sacado::Fad::DFad< double > DFadType
 
typedef Sacado::Fad::SLFad< double, 2 *global_fad_sizeSLFadType
 
typedef Sacado::Fad::SFad< double, global_fad_sizeSFadType
 

Functions

template<typename FadType1 , typename FadType2 >
bool checkFads (const FadType1 &x, const FadType2 &x2, Teuchos::FancyOStream &out, double tol=1.0e-15)
 
template<typename fadtype , typename ordinal >
fadtype generate_fad (const ordinal num_rows, const ordinal num_cols, const ordinal fad_size, const ordinal row, const ordinal col)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, Size, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, DeepCopy, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, DeepCopy_ConstantScalar, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, DeepCopy_ConstantZero, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, DeepCopy_ConstantFad, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, DeepCopy_ConstantFadFull, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, ScalarAssign, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, Multiply, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, MultiplyUpdate, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, MultiplyConst, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, MultiplyMixed, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, Rank8, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, Roger, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AssignDifferentStrides, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, DynRankDimensionScalar, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, DynRankMultiply, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, SubdynrankviewCol, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, SubdynrankviewRow, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, SubdynrankviewScalar, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, Subview, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, ShmemSize, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, Unmanaged, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, Unmanaged2, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, UnmanagedConst, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, UnmanagedConst2, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, SFadNoSizeArg, FadType, Layout, Device)
 

Variables

const int global_num_rows = 11
 
const int global_num_cols = 7
 
const int global_fad_size = 5
 

Macro Definition Documentation

◆ VIEW_FAD_TESTS_FLD

#define VIEW_FAD_TESTS_FLD (   F,
  L,
  D 
)
Value:
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, Size, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, DeepCopy, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, DeepCopy_ConstantScalar, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, DeepCopy_ConstantZero, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, DeepCopy_ConstantFad, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, DeepCopy_ConstantFadFull, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, ScalarAssign, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, Unmanaged, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, Unmanaged2, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, UnmanagedConst, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, UnmanagedConst2, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, Multiply, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, MultiplyUpdate, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, MultiplyConst, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, MultiplyMixed, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, Rank8, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, Roger, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AssignDifferentStrides, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, DynRankDimensionScalar, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, DynRankMultiply, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, SubdynrankviewCol, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, SubdynrankviewRow, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, SubdynrankviewScalar, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, Subview, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, ShmemSize, F, L, D )
#define D
Definition: Sacado_rad.hpp:577

Definition at line 1200 of file Fad_KokkosTests.hpp.

◆ VIEW_FAD_TESTS_SFLD

#define VIEW_FAD_TESTS_SFLD (   F,
  L,
  D 
)    TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, SFadNoSizeArg, F, L, D )

Definition at line 1227 of file Fad_KokkosTests.hpp.

◆ VIEW_FAD_TESTS_FD

#define VIEW_FAD_TESTS_FD (   F,
  D 
)
Value:
using Kokkos::LayoutLeft; \
using Kokkos::LayoutRight; \
VIEW_FAD_TESTS_FLD( F, LayoutLeft, D) \
VIEW_FAD_TESTS_FLD( F, LayoutRight, D)
#define D
Definition: Sacado_rad.hpp:577

Definition at line 1230 of file Fad_KokkosTests.hpp.

◆ VIEW_FAD_TESTS_SFD

#define VIEW_FAD_TESTS_SFD (   F,
  D 
)
Value:
using Kokkos::LayoutLeft; \
using Kokkos::LayoutRight; \
VIEW_FAD_TESTS_SFLD( F, LayoutLeft, D) \
VIEW_FAD_TESTS_SFLD( F, LayoutRight, D)
#define D
Definition: Sacado_rad.hpp:577

Definition at line 1236 of file Fad_KokkosTests.hpp.

◆ VIEW_FAD_TESTS_D

#define VIEW_FAD_TESTS_D (   D)
Value:
VIEW_FAD_TESTS_FD( SLFadType, D )
#define VIEW_FAD_TESTS_FD(F, D)
#define D
Definition: Sacado_rad.hpp:577

Definition at line 1287 of file Fad_KokkosTests.hpp.

Typedef Documentation

◆ DFadType

typedef Sacado::Fad::DFad<double> DFadType

Definition at line 1244 of file Fad_KokkosTests.hpp.

◆ SLFadType

Definition at line 1245 of file Fad_KokkosTests.hpp.

◆ SFadType

Definition at line 1246 of file Fad_KokkosTests.hpp.

Function Documentation

◆ checkFads()

template<typename FadType1 , typename FadType2 >
bool checkFads ( const FadType1 &  x,
const FadType2 &  x2,
Teuchos::FancyOStream &  out,
double  tol = 1.0e-15 
)

Definition at line 35 of file Fad_KokkosTests.hpp.

◆ generate_fad()

template<typename fadtype , typename ordinal >
fadtype generate_fad ( const ordinal  num_rows,
const ordinal  num_cols,
const ordinal  fad_size,
const ordinal  row,
const ordinal  col 
)
inline

Definition at line 55 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [1/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
Size  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 177 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [2/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
DeepCopy  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 191 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [3/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
DeepCopy_ConstantScalar  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 224 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [4/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
DeepCopy_ConstantZero  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 263 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [5/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
DeepCopy_ConstantFad  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 302 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [6/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
DeepCopy_ConstantFadFull  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 340 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [7/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
ScalarAssign  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 375 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [8/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
Multiply  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 411 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [9/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
MultiplyUpdate  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 454 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [10/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
MultiplyConst  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 498 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [11/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
MultiplyMixed  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 545 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [12/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
Rank8  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 571 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [13/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
Roger  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 594 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [14/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
AssignDifferentStrides  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 615 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [15/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
DynRankDimensionScalar  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 854 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [16/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
DynRankMultiply  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 856 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [17/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
SubdynrankviewCol  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 858 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [18/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
SubdynrankviewRow  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 860 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [19/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
SubdynrankviewScalar  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 862 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [20/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
Subview  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 867 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [21/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
ShmemSize  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 1162 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [22/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
Unmanaged  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 1183 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [23/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
Unmanaged2  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 1186 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [24/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
UnmanagedConst  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 1189 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [25/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
UnmanagedConst2  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 1192 of file Fad_KokkosTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [26/26]

TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL ( Kokkos_View_Fad  ,
SFadNoSizeArg  ,
FadType  ,
Layout  ,
Device   
)

Definition at line 1195 of file Fad_KokkosTests.hpp.

Variable Documentation

◆ global_num_rows

const int global_num_rows = 11

Definition at line 74 of file Fad_KokkosTests.hpp.

◆ global_num_cols

const int global_num_cols = 7

Definition at line 75 of file Fad_KokkosTests.hpp.

◆ global_fad_size

const int global_fad_size = 5

Definition at line 76 of file Fad_KokkosTests.hpp.