11#ifndef EBGEOMETRY_LABELID_HPP
12#define EBGEOMETRY_LABELID_HPP
54 constexpr explicit
LabelId(const uint32_t a_value) noexcept :
m_value(a_value)
99 return m_value == a_other.m_value;
111 return m_value != a_other.m_value;
127static_assert(std::is_trivially_copyable_v<SurfaceLabelId> &&
sizeof(
SurfaceLabelId) ==
sizeof(uint32_t),
128 "SurfaceLabelId must be a plain 32-bit value, for copies to a device");
143static_assert(std::is_trivially_copyable_v<MaterialLabelId> &&
sizeof(
MaterialLabelId) ==
sizeof(uint32_t),
144 "MaterialLabelId must be a plain 32-bit value, for copies to a device");
GPU portability layer: host/device decoration macros and backend detection.
#define EBGEOMETRY_HOST_DEVICE
Mark a function as callable from both host and device code (no-op on host compilers).
Definition EBGeometry_GPU.hpp:80
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
LabelId< SurfaceLabelTag > SurfaceLabelId
The number of a surface label: SurfaceLabel() names surfaces, and the tape and ExprIndex number the n...
Definition EBGeometry_LabelId.hpp:125
LabelId< MaterialLabelTag > MaterialLabelId
The number of a material label: MaterialLabel() names the material of a region (see Overlay()),...
Definition EBGeometry_LabelId.hpp:141
The number of a label, typed by what it labels, so that a number of one kind cannot index a table of ...
Definition EBGeometry_LabelId.hpp:33
constexpr uint32_t value() const noexcept
The number, for indexing an array of your own.
Definition EBGeometry_LabelId.hpp:74
constexpr bool isNone() const noexcept
Whether this is no label.
Definition EBGeometry_LabelId.hpp:85
constexpr bool operator!=(const LabelId &a_other) const noexcept
Inequality.
Definition EBGeometry_LabelId.hpp:109
static constexpr LabelId none() noexcept
No label.
Definition EBGeometry_LabelId.hpp:63
uint32_t m_value
The number.
Definition EBGeometry_LabelId.hpp:42
static constexpr uint32_t NoneValue
The number of no label.
Definition EBGeometry_LabelId.hpp:37
constexpr bool operator==(const LabelId &a_other) const noexcept
Equality.
Definition EBGeometry_LabelId.hpp:97
constexpr LabelId() noexcept=default
No label.
The tag of material labels (MaterialLabel()).
Definition EBGeometry_LabelId.hpp:134
The tag of surface labels (SurfaceLabel()).
Definition EBGeometry_LabelId.hpp:119