Cabana 0.8.0-dev
 
Loading...
Searching...
No Matches
Cabana_Utils.hpp
Go to the documentation of this file.
1/****************************************************************************
2 * Copyright (c) 2018-2022 by the Cabana authors *
3 * All rights reserved. *
4 * *
5 * This file is part of the Cabana library. Cabana is distributed under a *
6 * BSD 3-clause license. For the licensing terms see the LICENSE file in *
7 * the top-level directory. *
8 * *
9 * SPDX-License-Identifier: BSD-3-Clause *
10 ****************************************************************************/
11
16#ifndef CABANA_UTILS_HPP
17#define CABANA_UTILS_HPP
18
19#include <Cabana_Core_Config.hpp>
20
21#include <type_traits>
22
23namespace Cabana
24{
25namespace Impl
26{
28
29// Custom warning for switch from device_type to memory_space.
30constexpr bool deprecated( std::false_type ) { return true; }
31
32[[deprecated(
33 "Template parameter should be converted from Kokkos device type to "
34 "Kokkos memory space." )]] constexpr bool
35deprecated( std::true_type )
36{
37 return true;
38}
39
40// Custom warning.
41#ifdef Cabana_DISABLE_DEPRECATION_WARNINGS
42#define CABANA_DEPRECATED
43#else
44#define CABANA_DEPRECATED [[deprecated( "Cabana deprecation." )]]
45#endif
46
48
49} // namespace Impl
50} // namespace Cabana
51
52#endif
Core: particle data structures and algorithms.
Definition Cabana_AoSoA.hpp:36