| 1 |
/* |
| 2 |
* (C) Copyright 2013 ECMWF. |
| 3 |
* |
| 4 |
* This software is licensed under the terms of the Apache Licence Version 2.0 |
| 5 |
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
| 6 |
* In applying this licence, ECMWF does not waive the privileges and immunities |
| 7 |
* granted to it by virtue of its status as an intergovernmental organisation |
| 8 |
* nor does it submit to any jurisdiction. |
| 9 |
*/ |
| 10 |
|
| 11 |
#pragma once |
| 12 |
|
| 13 |
#include <cstddef> |
| 14 |
|
| 15 |
#include "eckit/eckit.h" |
| 16 |
|
| 17 |
#include "atlas/atlas_ecbuild_config.h" |
| 18 |
#include "atlas/library/defines.h" |
| 19 |
#include "hic/hic_config.h" |
| 20 |
|
| 21 |
#ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 22 |
#define DOXYGEN_HIDE(X) X |
| 23 |
#endif |
| 24 |
|
| 25 |
#define ATLAS_HAVE_TRACE 1 |
| 26 |
#define ATLAS_HAVE_TRACE_BARRIERS 1 |
| 27 |
|
| 28 |
#define ATLAS_HIC_COMPILER HIC_COMPILER |
| 29 |
#define ATLAS_HOST_COMPILE HIC_HOST_COMPILE |
| 30 |
#define ATLAS_DEVICE_COMPILE HIC_DEVICE_COMPILE |
| 31 |
#define ATLAS_HOST_DEVICE HIC_HOST_DEVICE |
| 32 |
#define ATLAS_DEVICE HIC_DEVICE |
| 33 |
#define ATLAS_HOST HIC_HOST |
| 34 |
#define ATLAS_GLOBAL HIC_GLOBAL |
| 35 |
|
| 36 |
#if HIC_BACKEND_CUDA || HIC_BACKEND_HIP |
| 37 |
#define ATLAS_HAVE_GPU 1 |
| 38 |
#else |
| 39 |
#define ATLAS_HAVE_GPU 0 |
| 40 |
#endif |
| 41 |
|
| 42 |
|
| 43 |
namespace atlas { |
| 44 |
|
| 45 |
/// @typedef gidx_t |
| 46 |
/// Integer type for global indices |
| 47 |
#if ATLAS_BITS_GLOBAL == 32 |
| 48 |
using gidx_t = int; |
| 49 |
#else |
| 50 |
using gidx_t = long; |
| 51 |
#endif |
| 52 |
|
| 53 |
/// @typedef idx_t |
| 54 |
/// Integer type for indices in connectivity tables |
| 55 |
#if (ATLAS_BITS_LOCAL == 32) |
| 56 |
using idx_t = int; |
| 57 |
#else |
| 58 |
using idx_t = long; |
| 59 |
#endif |
| 60 |
|
| 61 |
/// @typedef uidx_t |
| 62 |
/// Integer type for unique indices |
| 63 |
typedef gidx_t uidx_t; |
| 64 |
|
| 65 |
#define ATLAS_ECKIT_VERSION_AT_LEAST(x, y, z) (ATLAS_ECKIT_VERSION_INT >= x * 10000 + y * 100 + z) |
| 66 |
|
| 67 |
#if ATLAS_ECKIT_VERSION_AT_LEAST(1, 19, 0) |
| 68 |
#define ATLAS_ECKIT_HAVE_ECKIT_585 1 |
| 69 |
#else |
| 70 |
#define ATLAS_ECKIT_HAVE_ECKIT_585 0 |
| 71 |
#endif |
| 72 |
|
| 73 |
#define ATLAS_ECTRANS_VERSION_AT_LEAST(x, y, z) (ATLAS_ECTRANS_VERSION_INT >= x * 10000 + y * 100 + z) |
| 74 |
|
| 75 |
} // namespace atlas |