1#ifndef AMREX_EB2_IF_INTERSECTION_H_
2#define AMREX_EB2_IF_INTERSECTION_H_
3#include <AMReX_Config.H>
29 return std::forward<F>(f)(p);
32 template <
typename F,
typename... Fs>
35 return amrex::min(std::forward<F>(f)(p), do_min(p, std::forward<Fs>(fs)...));
45 template <
typename F,
typename... Fs>
64 return op_impl(p, std::make_index_sequence<
sizeof...(Fs)>());
67 template <
class U=
IntersectionIF<Fs...>, std::enable_if_t<IsGPUable<U>::value,
int> = 0>
76 template <std::size_t... Is>
79 return IIF_detail::do_min(p, amrex::get<Is>(*this)...);
82 template <std::size_t... Is>
86 return IIF_detail::do_min(
AMREX_D_DECL(
x,
y,
z), amrex::get<Is>(*this)...);
90template <
class Head,
class... Tail>
#define AMREX_FORCE_INLINE
Definition AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition AMReX_GpuQualifiers.H:20
#define AMREX_D_DECL(a, b, c)
Definition AMReX_SPACE.H:171
Implicit function that evaluates the intersection of multiple objects.
Definition AMReX_EB2_IF_Intersection.H:58
__host__ __device__ Real op_impl(Real x, Real y, Real z, std::index_sequence< Is... >) const noexcept
Definition AMReX_EB2_IF_Intersection.H:84
Real operator()(const RealArray &p) const noexcept
Definition AMReX_EB2_IF_Intersection.H:62
Real op_impl(const RealArray &p, std::index_sequence< Is... >) const noexcept
Definition AMReX_EB2_IF_Intersection.H:77
GPU-compatible tuple.
Definition AMReX_Tuple.H:98
__host__ __device__ constexpr GpuTuple()=default
amrex_real Real
Floating Point Type for Fields.
Definition AMReX_REAL.H:79
Definition AMReX_FabArrayBase.H:33
constexpr IntersectionIF< std::decay_t< Fs > ... > makeIntersection(Fs &&... fs)
Definition AMReX_EB2_IF_Intersection.H:100
__host__ __device__ constexpr const T & min(const T &a, const T &b) noexcept
Definition AMReX_Algorithm.H:24
Array< Real, 3 > RealArray
Definition AMReX_Array.H:28
Type trait that reports whether a functor derives from GPUable.
Definition AMReX_EB2_IF_Base.H:24