1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
/*
* GridTools
*
* Copyright (c) 2014-2023, ETH Zurich
* All rights reserved.
*
* Please, refer to the LICENSE file in the root directory.
* SPDX-License-Identifier: BSD-3-Clause
*/
#pragma once
#include "timer_select.hpp"
#if defined(GT_STORAGE_GPU)
#include <gridtools/storage/gpu.hpp>
namespace {
using storage_traits_t = gridtools::storage::gpu;
}
#elif defined(GT_STORAGE_CPU_KFIRST)
#include <gridtools/storage/cpu_kfirst.hpp>
namespace {
using storage_traits_t = gridtools::storage::cpu_kfirst;
}
#elif defined(GT_STORAGE_CPU_IFIRST)
#include <gridtools/storage/cpu_ifirst.hpp>
namespace {
using storage_traits_t = gridtools::storage::cpu_ifirst;
}
#endif
namespace gridtools {
namespace storage {
struct gpu;
struct cpu_kfirst;
struct cpu_ifirst;
gpu backend_storage_traits(gpu const &);
cpu_kfirst backend_storage_traits(cpu_kfirst const &);
cpu_ifirst backend_storage_traits(cpu_ifirst const &);
timer_omp backend_timer_impl(cpu_kfirst const &);
timer_omp backend_timer_impl(cpu_ifirst const &);
timer_cuda backend_timer_impl(gpu const &);
inline char const *backend_name(cpu_kfirst const &) { return "cpu_kfirst"; }
inline char const *backend_name(cpu_ifirst const &) { return "cpu_ifirst"; }
inline char const *backend_name(gpu const &) { return "gpu"; }
} // namespace storage
} // namespace gridtools
|