Sacado Package Browser (Single Doxygen Collection)
Version of the Day
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
Sacado_DisableKokkosCuda.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Sacado Package
4
//
5
// Copyright 2006 NTESS and the Sacado contributors.
6
// SPDX-License-Identifier: LGPL-2.1-or-later
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef SACADO_DISABLE_KOKKOS_CUDA_HPP
11
#define SACADO_DISABLE_KOKKOS_CUDA_HPP
12
13
//
14
// Include this file in any translation unit to disable the use of Sacado
15
// classes on Cuda. Several Sacado classes (e.g., Sacado::Fad::GeneralFad)
16
// are setup to work with Kokkos, but don't work with Cuda with some choices
17
// of their template parameters. However
18
// if Cuda is enabled then __device__ is added to the KOKKOS_*_FUNCTION macros
19
// which prevents these classes from compiling. By including this file, the
20
// __device__ annotation will be removed allowing these classes to be compiled
21
// by NVCC for host code.
22
//
23
24
// Include definitions of KOKKOS_*_FUNCTION macros
25
#include "
Sacado_ConfigDefs.h
"
26
27
// Redefine KOKKOS_*_FUNCTION macros to not include __device__
28
#if defined(HAVE_SACADO_KOKKOS) && ( defined(KOKKOS_ENABLE_CUDA) || defined(KOKKOS_ENABLE_HIP) )
29
// TODO double check me
30
#if 1
31
#undef SACADO_FUNCTION
32
#undef SACADO_INLINE_FUNCTION
33
#undef SACADO_FORCEINLINE_FUNCTION
34
35
#define SACADO_FUNCTION
/* */
36
#define SACADO_INLINE_FUNCTION inline
37
#define SACADO_FORCEINLINE_FUNCTION inline
38
#endif
39
#define SACADO_DISABLE_CUDA_IN_KOKKOS 1
40
41
#endif
42
43
44
#endif // SACADO_NO_KOKKOS_HPP
Sacado_ConfigDefs.h
Generated on Fri Dec 20 2024 09:23:40 for Sacado Package Browser (Single Doxygen Collection) by
1.8.5