Sacado Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
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 at line 395 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)

Definition at line 414 of file Fad_KokkosAtomicTests.hpp.

◆ VIEW_FAD_TESTS_D

#define VIEW_FAD_TESTS_D ( D)    /* */

Definition at line 439 of file Fad_KokkosAtomicTests.hpp.

Typedef Documentation

◆ LeftContiguous

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

Definition at line 411 of file Fad_KokkosAtomicTests.hpp.

◆ RightContiguous

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

Definition at line 412 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 261 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 321 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 327 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 333 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 339 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 345 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 351 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 359 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 365 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 371 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 377 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 383 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 389 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.