15#include <Kokkos_Macros.hpp>
17#include "detail/macros.hpp"
18#include "detail/utils.hpp"
26template <concepts::discrete_dimension...>
34template <
concepts::discrete_dimension... Tags>
45concept discrete_element = is_discrete_element_v<T>;
51template <ddc::concepts::discrete_dimension... Tags>
52struct ToTypeSeq<DiscreteElement<Tags...>>
60
61using DiscreteElementType = std::size_t;
63template <
concepts::discrete_dimension Tag>
64KOKKOS_FUNCTION
constexpr DiscreteElementType
const&
uid(DiscreteElement<Tag>
const& tuple)
noexcept
69template <
concepts::discrete_dimension Tag>
70KOKKOS_FUNCTION
constexpr DiscreteElementType&
uid(DiscreteElement<Tag>& tuple)
noexcept
75template <
concepts::discrete_dimension QueryTag,
concepts::discrete_dimension... Tags>
76KOKKOS_FUNCTION
constexpr DiscreteElementType
const&
uid(
77 DiscreteElement<Tags...>
const& tuple)
noexcept
79 return tuple.
template uid<QueryTag>();
82template <
concepts::discrete_dimension QueryTag,
concepts::discrete_dimension... Tags>
83KOKKOS_FUNCTION
constexpr DiscreteElementType&
uid(DiscreteElement<Tags...>& tuple)
noexcept
85 return tuple.
template uid<QueryTag>();
88template <
concepts::discrete_dimension QueryTag,
concepts::discrete_dimension... Tags>
89KOKKOS_FUNCTION
constexpr DiscreteElement<QueryTag>
select_or(
90 DiscreteElement<Tags...>
const& arr,
91 DiscreteElement<QueryTag>
const& default_value)
noexcept
93 if constexpr (in_tags_v<QueryTag,
TypeSeq<Tags...>>) {
94 return DiscreteElement<QueryTag>(arr);
100template <
concepts::discrete_dimension... QueryTags,
concepts::discrete_dimension... Tags>
101KOKKOS_FUNCTION
constexpr DiscreteElement<QueryTags...>
select(
102 DiscreteElement<Tags...>
const& arr)
noexcept
104 return DiscreteElement<QueryTags...>(arr);
107template <
concepts::discrete_dimension... QueryTags,
concepts::discrete_dimension... Tags>
108KOKKOS_FUNCTION
constexpr DiscreteElement<QueryTags...>
select(
109 DiscreteElement<Tags...>&& arr)
noexcept
111 return DiscreteElement<QueryTags...>(std::move(arr));
116 concepts::discrete_dimension QueryTag,
117 concepts::discrete_element HeadDElem,
118 concepts::discrete_element... TailDElems>
119KOKKOS_FUNCTION
constexpr auto const&
take(HeadDElem
const& head, TailDElems
const&... tail)
121 DDC_IF_NVCC_THEN_PUSH_AND_SUPPRESS(implicit_return_from_non_void_function)
122 if constexpr (type_seq_contains_v<
TypeSeq<QueryTag>, to_type_seq_t<HeadDElem>>) {
124 (!type_seq_contains_v<
TypeSeq<QueryTag>, to_type_seq_t<TailDElems>> && ...),
125 "ERROR: tag redundant");
128 static_assert(
sizeof...(TailDElems) > 0,
"ERROR: tag not found");
129 return take<QueryTag>(tail...);
137template <ddc::concepts::discrete_dimension... Tags>
138KOKKOS_FUNCTION
constexpr std::array<DiscreteElementType,
sizeof...(Tags)>& array(
139 DiscreteElement<Tags...>& v)
noexcept
145template <ddc::concepts::discrete_dimension... Tags>
146KOKKOS_FUNCTION
constexpr std::array<DiscreteElementType,
sizeof...(Tags)>
const& array(
147 DiscreteElement<Tags...>
const& v)
noexcept
154template <
concepts::discrete_dimension DDim>
157 return DiscreteElement<DDim>(0);
161
162
163
164template <concepts::discrete_dimension... Tags>
167 using tags_seq =
TypeSeq<Tags...>;
170 type_seq_is_unique_v<tags_seq>,
171 "The dimensions of a DiscreteElement must be unique");
173 friend KOKKOS_FUNCTION
constexpr std::array<DiscreteElementType,
sizeof...(Tags)>& detail::
174 array<Tags...>(DiscreteElement<Tags...>& v)
noexcept;
176 friend KOKKOS_FUNCTION
constexpr std::array<DiscreteElementType,
sizeof...(Tags)>
const&
177 detail::array<Tags...>(DiscreteElement<Tags...>
const& v)
noexcept;
180 std::array<DiscreteElementType,
sizeof...(Tags)> m_values;
183 using value_type = DiscreteElementType;
185 static KOKKOS_FUNCTION
constexpr std::size_t
size()
noexcept
187 return sizeof...(Tags);
193 KOKKOS_DEFAULTED_FUNCTION
constexpr DiscreteElement(DiscreteElement
const&) =
default;
195 KOKKOS_DEFAULTED_FUNCTION
constexpr DiscreteElement(DiscreteElement&&) =
default;
197 template <
concepts::discrete_element... DElems>
198 KOKKOS_FUNCTION
constexpr explicit DiscreteElement(DElems
const&... delems)
noexcept
199 : m_values {take<Tags>(delems...).
template uid<Tags>()...}
203 template <
std::convertible_to<DiscreteElementType> IntegerType>
205 std::array<IntegerType,
sizeof...(Tags)>
const& values)
noexcept
207 detail::convert_array_to<
208 DiscreteElementType>(values, std::make_index_sequence<
sizeof...(Tags)>()))
212 template <
std::convertible_to<DiscreteElementType>... Params>
213 KOKKOS_FUNCTION
constexpr explicit DiscreteElement(Params
const&... params)
noexcept
214 requires((!is_discrete_element_v<Params> && ...) &&
sizeof...(Params) ==
sizeof...(Tags))
215 : m_values {
static_cast<DiscreteElementType>(params)...}
221 KOKKOS_DEFAULTED_FUNCTION DiscreteElement&
operator=(DiscreteElement
const& other) =
default;
223 KOKKOS_DEFAULTED_FUNCTION DiscreteElement&
operator=(DiscreteElement&& other) =
default;
225 template <
concepts::discrete_dimension QueryTag>
226 KOKKOS_FUNCTION
constexpr value_type&
uid()
noexcept
228 static_assert(in_tags_v<QueryTag, tags_seq>,
"requested Tag absent from DiscreteElement");
229 return m_values[type_seq_rank_v<QueryTag, tags_seq>];
232 template <
concepts::discrete_dimension QueryTag>
233 KOKKOS_FUNCTION
constexpr value_type
const&
uid()
const noexcept
235 static_assert(in_tags_v<QueryTag, tags_seq>,
"requested Tag absent from DiscreteElement");
236 return m_values[type_seq_rank_v<QueryTag, tags_seq>];
239 KOKKOS_FUNCTION
constexpr value_type& uid()
noexcept
240 requires(
sizeof...(Tags) == 1)
245 KOKKOS_FUNCTION
constexpr value_type
const& uid()
const noexcept
246 requires(
sizeof...(Tags) == 1)
251 KOKKOS_FUNCTION
constexpr DiscreteElement& operator++()
252 requires(
sizeof...(Tags) == 1)
258 KOKKOS_FUNCTION
constexpr DiscreteElement
operator++(
int)
259 requires(
sizeof...(Tags) == 1)
261 DiscreteElement
const tmp = *
this;
266 KOKKOS_FUNCTION
constexpr DiscreteElement& operator--()
267 requires(
sizeof...(Tags) == 1)
273 KOKKOS_FUNCTION
constexpr DiscreteElement
operator--(
int)
274 requires(
sizeof...(Tags) == 1)
276 DiscreteElement
const tmp = *
this;
281 template <
concepts::discrete_dimension... OTags>
284 static_assert((type_seq_contains_v<
TypeSeq<OTags>, tags_seq> && ...));
285 ((m_values[type_seq_rank_v<OTags, tags_seq>] += rhs.
template get<OTags>()), ...);
289 template <
std::integral IntegralType>
290 KOKKOS_FUNCTION
constexpr DiscreteElement&
operator+=(IntegralType
const& rhs)
291 requires(
sizeof...(Tags) == 1)
297 template <
concepts::discrete_dimension... OTags>
300 static_assert((type_seq_contains_v<
TypeSeq<OTags>, tags_seq> && ...));
301 ((m_values[type_seq_rank_v<OTags, tags_seq>] -= rhs.
template get<OTags>()), ...);
305 template <
std::integral IntegralType>
306 KOKKOS_FUNCTION
constexpr DiscreteElement&
operator-=(IntegralType
const& rhs)
307 requires(
sizeof...(Tags) == 1)
316void print_discrete_element(std::ostream& os, std::span<DiscreteElementType
const> view);
320template <concepts::discrete_dimension... Tags>
321std::ostream& operator<<(std::ostream& os, DiscreteElement<Tags...>
const& arr)
323 detail::print_discrete_element(os, detail::array(arr));
328template <
concepts::discrete_dimension... Tags,
concepts::discrete_dimension... OTags>
329KOKKOS_FUNCTION
constexpr bool operator==(
330 DiscreteElement<Tags...>
const& lhs,
331 DiscreteElement<OTags...>
const& rhs)
noexcept
333 return ((lhs.
template uid<Tags>() == rhs.
template uid<Tags>()) && ...);
336#if !defined(__cpp_impl_three_way_comparison
) || __cpp_impl_three_way_comparison
< 201902L
347template <
concepts::discrete_dimension Tag>
348KOKKOS_FUNCTION
constexpr bool operator<(
349 DiscreteElement<Tag>
const& lhs,
350 DiscreteElement<Tag>
const& rhs)
352 return lhs.uid() < rhs.uid();
355template <
concepts::discrete_dimension Tag>
356KOKKOS_FUNCTION
constexpr bool operator<=(
357 DiscreteElement<Tag>
const& lhs,
358 DiscreteElement<Tag>
const& rhs)
360 return lhs.uid() <= rhs.uid();
363template <
concepts::discrete_dimension Tag>
364KOKKOS_FUNCTION
constexpr bool operator>(
365 DiscreteElement<Tag>
const& lhs,
366 DiscreteElement<Tag>
const& rhs)
368 return lhs.uid() > rhs.uid();
371template <
concepts::discrete_dimension Tag>
372KOKKOS_FUNCTION
constexpr bool operator>=(
373 DiscreteElement<Tag>
const& lhs,
374 DiscreteElement<Tag>
const& rhs)
376 return lhs.uid() >= rhs.uid();
381template <
concepts::discrete_dimension... Tags,
concepts::discrete_dimension... OTags>
382KOKKOS_FUNCTION
constexpr DiscreteElement<Tags...>
operator+(
383 DiscreteElement<Tags...>
const& lhs,
386 static_assert((type_seq_contains_v<
TypeSeq<OTags>,
TypeSeq<Tags...>> && ...));
387 DiscreteElement<Tags...> result(lhs);
392template <
concepts::discrete_dimension Tag,
std::integral IntegralType>
393KOKKOS_FUNCTION
constexpr DiscreteElement<Tag>
operator+(
394 DiscreteElement<Tag>
const& lhs,
395 IntegralType
const& rhs)
396 requires(!is_discrete_vector_v<IntegralType>)
398 DiscreteElement<Tag> result(lhs);
403template <
concepts::discrete_dimension... Tags,
concepts::discrete_dimension... OTags>
404KOKKOS_FUNCTION
constexpr DiscreteElement<Tags...>
operator-(
405 DiscreteElement<Tags...>
const& lhs,
408 static_assert((type_seq_contains_v<
TypeSeq<OTags>,
TypeSeq<Tags...>> && ...));
409 DiscreteElement<Tags...> result(lhs);
414template <
concepts::discrete_dimension Tag,
std::integral IntegralType>
415KOKKOS_FUNCTION
constexpr DiscreteElement<Tag>
operator-(
416 DiscreteElement<Tag>
const& lhs,
417 IntegralType
const& rhs)
418 requires(!is_discrete_vector_v<IntegralType>)
420 DiscreteElement<Tag> result(lhs);
427template <
concepts::discrete_dimension... Tags,
concepts::discrete_dimension... OTags>
429 DiscreteElement<Tags...>
const& lhs,
430 DiscreteElement<OTags...>
const& rhs)
432 static_assert(type_seq_same_v<
TypeSeq<Tags...>,
TypeSeq<OTags...>>);
433 return DiscreteVector<Tags...>((uid<Tags>(lhs) - uid<Tags>(rhs))...);
KOKKOS_FUNCTION constexpr ChunkCommon(ElementType *ptr, SupportType const &domain)
Constructs a new ChunkCommon from scratch.
KOKKOS_FUNCTION constexpr bool is_strided() const noexcept
KOKKOS_DEFAULTED_FUNCTION ~ChunkCommon() noexcept=default
KOKKOS_FUNCTION constexpr ElementType * data_handle() const
Access to the underlying allocation pointer.
KOKKOS_DEFAULTED_FUNCTION constexpr ChunkCommon()=default
Empty ChunkCommon.
allocation_mdspan_type m_allocation_mdspan
The raw view of the data.
KOKKOS_FUNCTION constexpr SupportType domain() const noexcept
Provide access to the domain on which this chunk is defined.
static KOKKOS_FUNCTION constexpr bool is_always_strided() noexcept
KOKKOS_FUNCTION constexpr allocation_mdspan_type allocation_mdspan() const
Provide a modifiable view of the data.
KOKKOS_FUNCTION constexpr ChunkCommon(allocation_mdspan_type allocation_mdspan, SupportType const &domain) noexcept
Constructs a new ChunkCommon from scratch.
KOKKOS_DEFAULTED_FUNCTION constexpr ChunkCommon(ChunkCommon const &other)=default
Constructs a new ChunkCommon by copy, yields a new view to the same data.
static KOKKOS_FUNCTION constexpr bool is_always_unique() noexcept
KOKKOS_FUNCTION constexpr DiscreteDomain< QueryDDims... > domain() const noexcept
Provide access to the domain on which this chunk is defined.
KOKKOS_DEFAULTED_FUNCTION constexpr ChunkCommon & operator=(ChunkCommon const &other)=default
Copy-assigns a new value to this ChunkCommon, yields a new view to the same data.
KOKKOS_DEFAULTED_FUNCTION constexpr ChunkCommon(ChunkCommon &&other) noexcept=default
Constructs a new ChunkCommon by move.
KOKKOS_DEFAULTED_FUNCTION constexpr ChunkCommon & operator=(ChunkCommon &&other) noexcept=default
Move-assigns a new value to this ChunkCommon.
KOKKOS_FUNCTION constexpr size_type extent() const noexcept
KOKKOS_FUNCTION constexpr size_type stride() const
KOKKOS_FUNCTION constexpr bool is_exhaustive() const noexcept
KOKKOS_FUNCTION constexpr mapping_type mapping() const noexcept
static KOKKOS_FUNCTION constexpr int rank() noexcept
KOKKOS_FUNCTION constexpr bool is_unique() const noexcept
KOKKOS_FUNCTION constexpr accessor_type accessor() const
KOKKOS_FUNCTION constexpr SupportType::discrete_vector_type extents() const noexcept
KOKKOS_FUNCTION constexpr size_type size() const noexcept
SupportType m_domain
The mesh on which this chunk is defined.
static KOKKOS_FUNCTION constexpr int rank_dynamic() noexcept
static KOKKOS_FUNCTION constexpr size_type static_extent(std::size_t r) noexcept
static KOKKOS_FUNCTION constexpr bool is_always_exhaustive() noexcept
auto operator[](DiscreteElement< QueryDDims... > const &slice_spec) const
Slice out some dimensions.
auto operator[](DiscreteVector< QueryDDims... > const &slice_spec) const
Slice out some dimensions.
char const * label() const
Returns the label of the Chunk.
const_allocation_mdspan_type allocation_mdspan() const
Provide a mdspan on the memory allocation.
ElementType const * data_handle() const
Access to the underlying allocation pointer.
auto allocation_kokkos_view()
Provide an unmanaged Kokkos::View on the memory allocation.
auto operator[](DiscreteDomain< QueryDDims... > const &odomain)
Slice out some dimensions.
auto allocation_kokkos_view() const
Provide an unmanaged Kokkos::View on the memory allocation.
Chunk(SupportType const &domain, Allocator allocator=Allocator())
Construct a Chunk on a domain with uninitialized values.
Chunk & operator=(Chunk const &other)=delete
Deleted: use deepcopy instead.
allocation_mdspan_type allocation_mdspan()
Provide a mdspan on the memory allocation.
ElementType * data_handle()
Access to the underlying allocation pointer.
view_type span_cview() const
Chunk(Chunk const &other)=delete
Deleted: use deepcopy instead.
Chunk(std::string const &label, SupportType const &domain, Allocator allocator=Allocator())
Construct a labeled Chunk on a domain with uninitialized values.
element_type & operator()(DElems const &... delems) noexcept
Element access using a list of DiscreteElement.
Chunk()=default
Empty Chunk.
Chunk & operator=(Chunk &&other) noexcept
Move-assigns a new value to this field.
Chunk(Chunk &&other) noexcept
Constructs a new Chunk by move.
view_type span_view() const
auto operator[](DiscreteDomain< QueryDDims... > const &odomain) const
Slice out some dimensions.
element_type const & operator()(DElems const &... delems) const noexcept
Element access using a list of DiscreteElement.
auto operator[](DiscreteVector< QueryDDims... > const &slice_spec)
Slice out some dimensions.
auto operator[](DiscreteElement< QueryDDims... > const &slice_spec)
Slice out some dimensions.
static KOKKOS_FUNCTION constexpr discrete_vector_type extents() noexcept
KOKKOS_DEFAULTED_FUNCTION ~DiscreteDomain()=default
KOKKOS_FUNCTION constexpr DiscreteDomain(discrete_element_type const &element_begin, discrete_vector_type const &size)
Construct a DiscreteDomain starting from element_begin with size points.
KOKKOS_FUNCTION constexpr DiscreteDomain(DDoms const &...)
Construct a DiscreteDomain by copies and merge of domains.
KOKKOS_FUNCTION constexpr DiscreteDomain take_last(discrete_vector_type) const
KOKKOS_FUNCTION constexpr bool operator==(DiscreteDomain const &) const
KOKKOS_FUNCTION constexpr DiscreteDomain remove(discrete_vector_type, discrete_vector_type) const
static KOKKOS_FUNCTION constexpr std::size_t rank()
KOKKOS_FUNCTION constexpr DiscreteDomain remove_last(discrete_vector_type) const
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain(DiscreteDomain const &x)=default
static KOKKOS_FUNCTION bool contains() noexcept
KOKKOS_DEFAULTED_FUNCTION constexpr DiscreteDomain()=default
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain & operator=(DiscreteDomain &&x)=default
KOKKOS_FUNCTION constexpr operator bool()
static KOKKOS_FUNCTION constexpr std::size_t size()
static KOKKOS_FUNCTION constexpr bool empty() noexcept
static KOKKOS_FUNCTION bool contains(DiscreteElement<>) noexcept
static KOKKOS_FUNCTION constexpr discrete_element_type back() noexcept
KOKKOS_FUNCTION constexpr DiscreteDomain restrict_with(DiscreteDomain< ODDims... > const &) const
static KOKKOS_FUNCTION DiscreteVector distance_from_front(DiscreteElement<>) noexcept
KOKKOS_FUNCTION constexpr DiscreteDomain remove_first(discrete_vector_type) const
static KOKKOS_FUNCTION constexpr discrete_element_type front() noexcept
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain & operator=(DiscreteDomain const &x)=default
KOKKOS_FUNCTION constexpr DiscreteDomain take_first(discrete_vector_type) const
KOKKOS_FUNCTION constexpr DiscreteElement operator()(DiscreteVector<> const &) const noexcept
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain(DiscreteDomain &&x)=default
static KOKKOS_FUNCTION DiscreteVector distance_from_front() noexcept
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain(DiscreteDomain const &x)=default
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain(DiscreteDomain &&x)=default
KOKKOS_FUNCTION constexpr DiscreteDomain remove_last(discrete_vector_type n) const
KOKKOS_FUNCTION bool contains(DElems const &... delems) const noexcept
KOKKOS_FUNCTION constexpr DiscreteDomain take_last(discrete_vector_type n) const
KOKKOS_FUNCTION constexpr DiscreteDomain(DDoms const &... domains)
Construct a DiscreteDomain by copies and merge of domains.
KOKKOS_FUNCTION constexpr decltype(auto) operator[](std::size_t n)
KOKKOS_FUNCTION constexpr DiscreteDomain remove(discrete_vector_type n1, discrete_vector_type n2) const
KOKKOS_FUNCTION constexpr decltype(auto) operator[](std::size_t n) const
KOKKOS_FUNCTION constexpr auto restrict_with(DiscreteDomain< ODDims... > const &odomain) const
static KOKKOS_FUNCTION constexpr std::size_t rank()
KOKKOS_FUNCTION constexpr bool empty() const noexcept
KOKKOS_FUNCTION constexpr std::size_t size() const
friend class DiscreteDomain
KOKKOS_FUNCTION constexpr discrete_vector_type extents() const noexcept
KOKKOS_FUNCTION constexpr DiscreteVector< QueryDDim > extent() const noexcept
KOKKOS_FUNCTION constexpr discrete_element_type front() const noexcept
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain & operator=(DiscreteDomain &&x)=default
KOKKOS_FUNCTION constexpr DiscreteDomain remove_first(discrete_vector_type n) const
KOKKOS_FUNCTION constexpr DiscreteDomain take_first(discrete_vector_type n) const
KOKKOS_DEFAULTED_FUNCTION ~DiscreteDomain()=default
KOKKOS_FUNCTION DiscreteVector< DDims... > distance_from_front(DElems const &... delems) const noexcept
KOKKOS_FUNCTION constexpr discrete_element_type back() const noexcept
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain & operator=(DiscreteDomain const &x)=default
KOKKOS_FUNCTION constexpr DiscreteElement< DDims... > operator()(DiscreteVector< DDims... > const &dvect) const noexcept
KOKKOS_FUNCTION constexpr bool operator==(DiscreteDomain< ODDims... > const &other) const
KOKKOS_DEFAULTED_FUNCTION DiscreteDomain()=default
KOKKOS_FUNCTION constexpr operator bool()
KOKKOS_FUNCTION constexpr DiscreteDomain(discrete_element_type const &element_begin, discrete_vector_type const &size)
Construct a DiscreteDomain starting from element_begin with size points.
KOKKOS_FUNCTION constexpr DiscreteElement & operator+=(DiscreteVector< OTags... > const &rhs)
KOKKOS_FUNCTION constexpr value_type const & uid() const noexcept
KOKKOS_FUNCTION constexpr value_type & uid() noexcept
KOKKOS_DEFAULTED_FUNCTION ~DiscreteElement()=default
KOKKOS_FUNCTION constexpr DiscreteElement(DElems const &... delems) noexcept
KOKKOS_FUNCTION constexpr DiscreteElement & operator+=(IntegralType const &rhs)
KOKKOS_DEFAULTED_FUNCTION constexpr DiscreteElement(DiscreteElement const &)=default
KOKKOS_FUNCTION constexpr DiscreteElement operator--(int)
KOKKOS_FUNCTION constexpr DiscreteElement & operator-=(IntegralType const &rhs)
KOKKOS_FUNCTION constexpr DiscreteElement & operator-=(DiscreteVector< OTags... > const &rhs)
KOKKOS_DEFAULTED_FUNCTION constexpr DiscreteElement()=default
KOKKOS_FUNCTION constexpr DiscreteElement operator++(int)
KOKKOS_DEFAULTED_FUNCTION DiscreteElement & operator=(DiscreteElement const &other)=default
static KOKKOS_FUNCTION constexpr std::size_t size() noexcept
KOKKOS_FUNCTION constexpr DiscreteElement(std::array< IntegerType, sizeof...(Tags)> const &values) noexcept
KOKKOS_DEFAULTED_FUNCTION DiscreteElement & operator=(DiscreteElement &&other)=default
KOKKOS_DEFAULTED_FUNCTION constexpr DiscreteElement(DiscreteElement &&)=default
KOKKOS_FUNCTION constexpr bool operator!=(DiscreteVector< OTags... > const &rhs) const noexcept
KOKKOS_DEFAULTED_FUNCTION constexpr DiscreteVector()=default
#define DDC_BUILD_DEPRECATED_CODE
#define DDC_BUILD_DOUBLE_PRECISION
The top-level namespace of DDC.
constexpr bool is_borrowed_chunk_v
KOKKOS_FUNCTION constexpr bool operator<(DiscreteElement< Tag > const &lhs, DiscreteElement< Tag > const &rhs)
KOKKOS_FUNCTION auto get_domain(ChunkType const &chunk) noexcept
Access the domain (or subdomain) of a view.
constexpr bool enable_chunk< Chunk< ElementType, SupportType, Allocator > >
KOKKOS_FUNCTION constexpr DiscreteElement< Tag > operator+(DiscreteElement< Tag > const &lhs, IntegralType const &rhs)
KOKKOS_FUNCTION constexpr DiscreteElement< QueryDDims... > back(DiscreteDomain< DDims... > const &domain) noexcept
constexpr bool enable_borrowed_chunk
constexpr bool enable_chunk
KOKKOS_FUNCTION constexpr bool operator==(DiscreteElement< Tags... > const &lhs, DiscreteElement< OTags... > const &rhs) noexcept
KOKKOS_FUNCTION constexpr DiscreteElement< QueryTags... > select(DiscreteElement< Tags... > &&arr) noexcept
constexpr DiscreteElement< DDim > create_reference_discrete_element() noexcept
constexpr bool is_chunk_v
KOKKOS_FUNCTION constexpr DiscreteElement< QueryTags... > select(DiscreteElement< Tags... > const &arr) noexcept
KOKKOS_FUNCTION constexpr auto const & take(HeadDElem const &head, TailDElems const &... tail)
Returns a reference towards the DiscreteElement that contains the QueryTag.
KOKKOS_FUNCTION constexpr auto remove_dims_of(DiscreteDomain< DDimsA... > const &DDom_a, DiscreteDomain< DDimsB... > const &) noexcept
KOKKOS_FUNCTION constexpr auto remove_dims_of(DiscreteDomain< DDimsA... > const &DDom_a) noexcept
Remove the dimensions DDimsB from DDom_a.
KOKKOS_FUNCTION constexpr DiscreteVector< Tags... > operator-(DiscreteElement< Tags... > const &lhs, DiscreteElement< OTags... > const &rhs)
binary operator: -
KOKKOS_FUNCTION constexpr DiscreteElement< QueryDDims... > front(DiscreteDomain< DDims... > const &domain) noexcept
KOKKOS_FUNCTION constexpr DiscreteElement< QueryTag > select_or(DiscreteElement< Tags... > const &arr, DiscreteElement< QueryTag > const &default_value) noexcept
constexpr bool is_writable_chunk_v
KOKKOS_FUNCTION constexpr DiscreteElementType const & uid(DiscreteElement< Tag > const &tuple) noexcept
KOKKOS_FUNCTION constexpr DiscreteElement< Tags... > operator+(DiscreteElement< Tags... > const &lhs, DiscreteVector< OTags... > const &rhs)
right external binary operators: +, -
constexpr bool is_discrete_element_v
KOKKOS_FUNCTION constexpr DiscreteVector< QueryDDims... > extents(DiscreteDomain< DDims... > const &domain) noexcept
Chunk(SupportType const &, Allocator) -> Chunk< typename Allocator::value_type, SupportType, Allocator >
KOKKOS_FUNCTION constexpr bool operator>=(DiscreteElement< Tag > const &lhs, DiscreteElement< Tag > const &rhs)
KOKKOS_FUNCTION constexpr auto replace_dim_of(DiscreteDomain< DDimsA... > const &DDom_a, DiscreteDomain< DDimsB... > const &DDom_b) noexcept
KOKKOS_FUNCTION constexpr bool operator<=(DiscreteElement< Tag > const &lhs, DiscreteElement< Tag > const &rhs)
KOKKOS_FUNCTION constexpr DiscreteElementType & uid(DiscreteElement< Tags... > &tuple) noexcept
Chunk(std::string const &, SupportType const &, Allocator) -> Chunk< typename Allocator::value_type, SupportType, Allocator >
KOKKOS_FUNCTION constexpr bool operator>(DiscreteElement< Tag > const &lhs, DiscreteElement< Tag > const &rhs)
KOKKOS_FUNCTION constexpr DiscreteElementType & uid(DiscreteElement< Tag > &tuple) noexcept
constexpr bool is_discrete_domain_v
KOKKOS_FUNCTION constexpr DiscreteElement< Tag > operator-(DiscreteElement< Tag > const &lhs, IntegralType const &rhs)
KOKKOS_FUNCTION constexpr DiscreteElement< Tags... > operator-(DiscreteElement< Tags... > const &lhs, DiscreteVector< OTags... > const &rhs)
KOKKOS_FUNCTION constexpr DiscreteElementType const & uid(DiscreteElement< Tags... > const &tuple) noexcept
KOKKOS_FUNCTION constexpr DiscreteDomain< QueryDDims... > select(DiscreteDomain< DDims... > const &domain)
A compile-time sequence of types.
KOKKOS_FUNCTION constexpr DiscreteDomainIterator operator--(int)
friend KOKKOS_FUNCTION constexpr bool operator<=(DiscreteDomainIterator const &xx, DiscreteDomainIterator const &yy)
KOKKOS_FUNCTION constexpr DiscreteElement< DDim > operator*() const noexcept
friend KOKKOS_FUNCTION constexpr bool operator>=(DiscreteDomainIterator const &xx, DiscreteDomainIterator const &yy)
KOKKOS_DEFAULTED_FUNCTION DiscreteDomainIterator()=default
KOKKOS_FUNCTION constexpr DiscreteElement< DDim > operator[](difference_type n) const
KOKKOS_FUNCTION constexpr DiscreteDomainIterator & operator--()
KOKKOS_FUNCTION constexpr DiscreteDomainIterator operator++(int)
friend KOKKOS_FUNCTION constexpr DiscreteDomainIterator operator-(DiscreteDomainIterator i, difference_type n)
friend KOKKOS_FUNCTION constexpr DiscreteDomainIterator operator+(DiscreteDomainIterator i, difference_type n)
friend KOKKOS_FUNCTION constexpr bool operator>(DiscreteDomainIterator const &xx, DiscreteDomainIterator const &yy)
friend KOKKOS_FUNCTION constexpr bool operator!=(DiscreteDomainIterator const &xx, DiscreteDomainIterator const &yy)
friend KOKKOS_FUNCTION constexpr bool operator<(DiscreteDomainIterator const &xx, DiscreteDomainIterator const &yy)
KOKKOS_FUNCTION constexpr DiscreteDomainIterator & operator+=(difference_type n)
KOKKOS_FUNCTION constexpr DiscreteDomainIterator & operator++()
friend KOKKOS_FUNCTION constexpr DiscreteDomainIterator operator+(difference_type n, DiscreteDomainIterator i)
friend KOKKOS_FUNCTION constexpr bool operator==(DiscreteDomainIterator const &xx, DiscreteDomainIterator const &yy)
KOKKOS_FUNCTION constexpr DiscreteDomainIterator(DiscreteElement< DDim > value)
KOKKOS_FUNCTION constexpr DiscreteDomainIterator & operator-=(difference_type n)
friend KOKKOS_FUNCTION constexpr difference_type operator-(DiscreteDomainIterator const &xx, DiscreteDomainIterator const &yy)