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

Go to the source code of this file.

Classes

struct  is_dfad< T >
 
struct  is_dfad< Sacado::Fad::Exp::DFad< T > >
 
struct  AddTag
 
struct  SubTag
 
struct  MulTag
 
struct  DivTag
 
struct  MaxTag
 
struct  MinTag
 
struct  AtomicKernel< ViewType, ScalarViewType, OperFetch >
 

Macros

#define GLOBAL_FAD_SIZE   5
 
#define VIEW_FAD_TESTS_FLD(F, L, D)
 
#define VIEW_FAD_TESTS_FD(F, D)
 
#define VIEW_FAD_TESTS_D(D)   /* */
 

Typedefs

typedef Kokkos::LayoutContiguous< Kokkos::LayoutLeft > LeftContiguous
 
typedef Kokkos::LayoutContiguous< Kokkos::LayoutRight > RightContiguous
 

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)
 
template<typename FadType , typename Layout , typename Device , bool OperFetch, typename TagType >
bool testAtomic (const TagType &tag, Teuchos::FancyOStream &out)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicAddFetch, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicSubFetch, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicMulFetch, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicDivFetch, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicMaxFetch, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicMinFetch, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicFetchAdd, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicFetchSub, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicFetchMul, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicFetchDiv, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicFetchMax, FadType, Layout, Device)
 
 TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL (Kokkos_View_Fad, AtomicFetchMin, FadType, Layout, Device)
 

Variables

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

Macro Definition Documentation

◆ GLOBAL_FAD_SIZE

#define GLOBAL_FAD_SIZE   5

Definition at line 84 of file Fad_KokkosAtomicTests.hpp.

◆ VIEW_FAD_TESTS_FLD

#define VIEW_FAD_TESTS_FLD (   F,
  L,
  D 
)
Value:
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicAddFetch, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicSubFetch, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicMulFetch, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicDivFetch, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicMaxFetch, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicMinFetch, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicFetchAdd, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicFetchSub, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicFetchMul, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicFetchDiv, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicFetchMax, F, L, D ) \
TEUCHOS_UNIT_TEST_TEMPLATE_3_INSTANT( Kokkos_View_Fad, AtomicFetchMin, F, L, D )
#define D
Definition: Sacado_rad.hpp:577

Definition at line 379 of file Fad_KokkosAtomicTests.hpp.

◆ VIEW_FAD_TESTS_FD

#define VIEW_FAD_TESTS_FD (   F,
  D 
)
Value:
VIEW_FAD_TESTS_FLD( F, LayoutLeft, D ) \
VIEW_FAD_TESTS_FLD( F, LayoutRight, D ) \
VIEW_FAD_TESTS_FLD( F, LeftContiguous, D ) \
VIEW_FAD_TESTS_FLD( F, RightContiguous, D )
#define VIEW_FAD_TESTS_FLD(F, L, D)
#define D
Definition: Sacado_rad.hpp:577

Definition at line 398 of file Fad_KokkosAtomicTests.hpp.

◆ VIEW_FAD_TESTS_D

#define VIEW_FAD_TESTS_D (   D)    /* */

Definition at line 423 of file Fad_KokkosAtomicTests.hpp.

Typedef Documentation

◆ LeftContiguous

typedef Kokkos::LayoutContiguous<Kokkos::LayoutLeft> LeftContiguous

Definition at line 395 of file Fad_KokkosAtomicTests.hpp.

◆ RightContiguous

typedef Kokkos::LayoutContiguous<Kokkos::LayoutRight> RightContiguous

Definition at line 396 of file Fad_KokkosAtomicTests.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 44 of file Fad_KokkosAtomicTests.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 64 of file Fad_KokkosAtomicTests.hpp.

◆ testAtomic()

template<typename FadType , typename Layout , typename Device , bool OperFetch, typename TagType >
bool testAtomic ( const TagType &  tag,
Teuchos::FancyOStream &  out 
)

Definition at line 251 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [1/12]

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

Definition at line 305 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [2/12]

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

Definition at line 311 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [3/12]

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

Definition at line 317 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [4/12]

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

Definition at line 323 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [5/12]

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

Definition at line 329 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [6/12]

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

Definition at line 335 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [7/12]

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

Definition at line 343 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [8/12]

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

Definition at line 349 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [9/12]

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

Definition at line 355 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [10/12]

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

Definition at line 361 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [11/12]

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

Definition at line 367 of file Fad_KokkosAtomicTests.hpp.

◆ TEUCHOS_UNIT_TEST_TEMPLATE_3_DECL() [12/12]

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

Definition at line 373 of file Fad_KokkosAtomicTests.hpp.

Variable Documentation

◆ global_num_rows

const int global_num_rows = 11

Definition at line 86 of file Fad_KokkosAtomicTests.hpp.

◆ global_num_cols

const int global_num_cols = 7

Definition at line 87 of file Fad_KokkosAtomicTests.hpp.

◆ global_fad_size

const int global_fad_size = GLOBAL_FAD_SIZE

Definition at line 88 of file Fad_KokkosAtomicTests.hpp.