Document the new DPF surfaces in one command set, and test the field, half-tree, and multipoint edges.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
0d8a5a8131
commit
0dff6df8ed
250 changed files with 12199 additions and 1981 deletions
|
|
@ -1,6 +1,5 @@
|
|||
/// @file dpf/leaf_node.hpp
|
||||
/// @brief
|
||||
/// @details
|
||||
/// @brief The packed leaf image of one output group.
|
||||
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
|
||||
/// @author Christopher Jiang <christopher.jiang@ucalgary.ca>
|
||||
/// @copyright Copyright (c) 2019-2024 Ryan Henry and [others](@ref authors)
|
||||
|
|
@ -136,10 +135,13 @@ struct const_max_size<Only>
|
|||
static constexpr std::size_t value = Only;
|
||||
};
|
||||
|
||||
/// PRG position span covering output indices `Is...` of `OutputsTuple`.
|
||||
/// `is_contiguous` is true when the selected outputs occupy a hole-free
|
||||
/// @brief PRG position span covering output indices `Is...` of `OutputsTuple`.
|
||||
/// @details `is_contiguous` is true when the selected outputs occupy a hole-free
|
||||
/// range, so one `ExteriorPRG::eval(..., count, pos_min)` produces every
|
||||
/// leaf mask.
|
||||
/// @tparam NodeT GGM node type
|
||||
/// @tparam OutputsTuple outputs tuple
|
||||
/// @tparam Is is
|
||||
template <typename NodeT,
|
||||
typename OutputsTuple,
|
||||
std::size_t ...Is>
|
||||
|
|
@ -268,8 +270,12 @@ auto make_naked_leaf(InputT x, OutputT y) noexcept
|
|||
return Y;
|
||||
}
|
||||
|
||||
/// Address of the first `NodeT` block inside a leaf.
|
||||
/// A one-block leaf *is* a `NodeT`; a longer leaf is `std::array<NodeT, N>`.
|
||||
/// @brief Address of the first `NodeT` block inside a leaf.
|
||||
/// @details A one-block leaf *is* a `NodeT`; a longer leaf is `std::array<NodeT, N>`.
|
||||
/// @tparam NodeT GGM node type
|
||||
/// @tparam LeafT leaf type
|
||||
/// @param leaf the leaf value
|
||||
/// @return Address of the first `NodeT` block inside a leaf
|
||||
template <typename NodeT, typename LeafT>
|
||||
HEDLEY_NO_THROW
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
|
|
@ -314,6 +320,7 @@ auto make_leaf_mask(const InteriorBlock & seed0, const InteriorBlock & seed1,
|
|||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
using output_type = concrete_type_t<std::tuple_element_t<I, OutputsTuple>>;
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
|
||||
auto mask0 = make_leaf_mask_inner<ExteriorPRG, I, OutputsTuple, InteriorBlock>(
|
||||
seed0, pos_base);
|
||||
|
|
@ -321,7 +328,6 @@ HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
|||
seed1, pos_base);
|
||||
|
||||
return dpf::subtract_leaf<output_type>(mask1, mask0);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
}
|
||||
|
||||
template <typename ExteriorPRG,
|
||||
|
|
@ -340,6 +346,7 @@ auto make_leaf(InputT x, const ExteriorBlock & seed0, const ExteriorBlock & seed
|
|||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
using node_type = typename ExteriorPRG::block_type;
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
|
||||
return sign ? dpf::subtract_leaf<output_type>(
|
||||
make_naked_leaf<node_type>(x, Y),
|
||||
|
|
@ -349,7 +356,6 @@ HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
|||
make_leaf_mask<ExteriorPRG, I, output_tuple_type, ExteriorBlock>(
|
||||
seed0, seed1, pos_base),
|
||||
make_naked_leaf<node_type>(x, Y));
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
}
|
||||
|
||||
template <typename ExteriorPRG,
|
||||
|
|
@ -475,9 +481,9 @@ HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
|||
}, return_tuple.first.first);
|
||||
}, leaves);
|
||||
}, std::make_tuple(y, ys...));
|
||||
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
|
||||
|
||||
return return_tuple;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue