DDC 0.5.0
Loading...
Searching...
No Matches
trivial_space.hpp
1// Copyright (C) The DDC development team, see COPYRIGHT.md file
2//
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
7#include "ddc/discrete_domain.hpp"
8#include "ddc/discrete_vector.hpp"
9
10namespace ddc {
11
12/** Construct a dimension without attributes.
13 *
14 * @param n number of elements
15 * @return a DiscreteDomain of size `n`
16 */
17template <class DDim>
18DiscreteDomain<DDim> init_trivial_space(DiscreteVector<DDim> const n) noexcept
19{
20 return DiscreteDomain<DDim>(DiscreteElement<DDim>(0), n);
21}
22
23} // namespace ddc
friend class DiscreteDomain
KOKKOS_FUNCTION constexpr bool operator!=(DiscreteVector< OTags... > const &rhs) const noexcept
The top-level namespace of DDC.
DiscreteDomain< DDim > init_trivial_space(DiscreteVector< DDim > const n) noexcept
Construct a dimension without attributes.