diff --git a/cpp/benchmarks/CMakeLists.txt b/cpp/benchmarks/CMakeLists.txt index 99f90eec0..d153b63ab 100644 --- a/cpp/benchmarks/CMakeLists.txt +++ b/cpp/benchmarks/CMakeLists.txt @@ -80,6 +80,7 @@ ConfigureBench(HAUSDORFF_BENCH distance/hausdorff_benchmark.cpp) ConfigureNVBench(DISTANCES_BENCH + distance/pairwise_point_polygon_distance.cu distance/pairwise_linestring_distance.cu) ConfigureNVBench(QUADTREE_ON_POINTS_BENCH diff --git a/cpp/benchmarks/distance/pairwise_point_polygon_distance.cu b/cpp/benchmarks/distance/pairwise_point_polygon_distance.cu new file mode 100644 index 000000000..c3f84da70 --- /dev/null +++ b/cpp/benchmarks/distance/pairwise_point_polygon_distance.cu @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2023, NVIDIA CORPORATION. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include + +#include +#include + +#include +#include + +using namespace cuspatial; +using namespace cuspatial::test; + +template +void pairwise_point_polygon_distance_benchmark(nvbench::state& state, nvbench::type_list) +{ + // TODO: to be replaced by nvbench fixture once it's ready + cuspatial::rmm_pool_raii rmm_pool; + rmm::cuda_stream_view stream{rmm::cuda_stream_default}; + + auto const num_pairs{static_cast(state.get_int64("num_pairs"))}; + + auto const num_polygons_per_multipolygon{ + static_cast(state.get_int64("num_polygons_per_multipolygon"))}; + auto const num_holes_per_polygon{ + static_cast(state.get_int64("num_holes_per_polygon"))}; + auto const num_edges_per_ring{static_cast(state.get_int64("num_edges_per_ring"))}; + + auto const num_points_per_multipoint{ + static_cast(state.get_int64("num_points_per_multipoint"))}; + + auto mpoly_generator_param = multipolygon_generator_parameter{ + num_pairs, num_polygons_per_multipolygon, num_holes_per_polygon, num_edges_per_ring}; + + auto mpoint_generator_param = multipoint_generator_parameter{ + num_pairs, num_points_per_multipoint, vec_2d{-1, -1}, vec_2d{0, 0}}; + + auto multipolygons = generate_multipolygon_array(mpoly_generator_param, stream); + auto multipoints = generate_multipoint_array(mpoint_generator_param, stream); + + auto distances = rmm::device_vector(num_pairs); + auto out_it = distances.begin(); + + auto mpoly_view = multipolygons.range(); + auto mpoint_view = multipoints.range(); + + state.add_element_count(num_pairs, "NumPairs"); + state.add_element_count(mpoly_generator_param.num_polygons(), "NumPolygons"); + state.add_element_count(mpoly_generator_param.num_rings(), "NumRings"); + state.add_element_count(mpoly_generator_param.num_coords(), "NumPoints (in mpoly)"); + state.add_element_count(static_cast(mpoly_generator_param.num_coords() * + mpoly_generator_param.num_rings() * + mpoly_generator_param.num_polygons()), + "Multipolygon Complexity"); + state.add_element_count(mpoint_generator_param.num_points(), "NumPoints (in multipoints)"); + + state.add_global_memory_reads( + mpoly_generator_param.num_coords() + mpoint_generator_param.num_points(), + "CoordinatesReadSize"); + state.add_global_memory_reads( + (mpoly_generator_param.num_rings() + 1) + (mpoly_generator_param.num_polygons() + 1) + + (mpoly_generator_param.num_multipolygons + 1) + (mpoint_generator_param.num_multipoints + 1), + "OffsetsDataSize"); + + state.add_global_memory_writes(num_pairs); + + state.exec(nvbench::exec_tag::sync, + [&mpoly_view, &mpoint_view, &out_it, &stream](nvbench::launch& launch) { + pairwise_point_polygon_distance(mpoint_view, mpoly_view, out_it, stream); + }); +} + +using floating_point_types = nvbench::type_list; + +// Benchmark scalability with simple multipolygon (3 sides, 0 hole, 1 poly) +NVBENCH_BENCH_TYPES(pairwise_point_polygon_distance_benchmark, + NVBENCH_TYPE_AXES(floating_point_types)) + .set_type_axes_names({"CoordsType"}) + .add_int64_axis("num_pairs", {1, 1'00, 10'000, 1'000'000, 100'000'000}) + .add_int64_axis("num_polygons_per_multipolygon", {1}) + .add_int64_axis("num_holes_per_polygon", {0}) + .add_int64_axis("num_edges_per_ring", {3}) + .add_int64_axis("num_points_per_multipoint", {1}) + .set_name("point_polygon_distance_benchmark_simple_polygon"); + +// Benchmark scalability with complex multipolygon (100 sides, 10 holes, 3 polys) +NVBENCH_BENCH_TYPES(pairwise_point_polygon_distance_benchmark, + NVBENCH_TYPE_AXES(floating_point_types)) + .set_type_axes_names({"CoordsType"}) + .add_int64_axis("num_pairs", {1'000, 10'000, 100'000, 1'000'000}) + .add_int64_axis("num_polygons_per_multipolygon", {2}) + .add_int64_axis("num_holes_per_polygon", {3}) + .add_int64_axis("num_edges_per_ring", {50}) + .add_int64_axis("num_points_per_multipoint", {1}) + .set_name("point_polygon_distance_benchmark_complex_polygon"); + +// // Benchmark impact of rings (100K pairs, 1 polygon, 3 sides) +NVBENCH_BENCH_TYPES(pairwise_point_polygon_distance_benchmark, + NVBENCH_TYPE_AXES(floating_point_types)) + .set_type_axes_names({"CoordsType"}) + .add_int64_axis("num_pairs", {10'000}) + .add_int64_axis("num_polygons_per_multipolygon", {1}) + .add_int64_axis("num_holes_per_polygon", {0, 10, 100, 1000}) + .add_int64_axis("num_edges_per_ring", {3}) + .add_int64_axis("num_points_per_multipoint", {1}) + .set_name("point_polygon_distance_benchmark_ring_numbers"); + +// Benchmark impact of rings (1M pairs, 1 polygon, 0 holes, 3 sides) +NVBENCH_BENCH_TYPES(pairwise_point_polygon_distance_benchmark, + NVBENCH_TYPE_AXES(floating_point_types)) + .set_type_axes_names({"CoordsType"}) + .add_int64_axis("num_pairs", {100}) + .add_int64_axis("num_polygons_per_multipolygon", {1}) + .add_int64_axis("num_holes_per_polygon", {0}) + .add_int64_axis("num_edges_per_ring", {3}) + .add_int64_axis("num_points_per_multipoint", {50, 5'00, 5'000, 50'000, 500'000}) + .set_name("point_polygon_distance_benchmark_points_in_multipoint"); diff --git a/cpp/include/cuspatial/detail/nvtx/ranges.hpp b/cpp/include/cuspatial/detail/nvtx/ranges.hpp index 1757ae1e5..855221aa0 100644 --- a/cpp/include/cuspatial/detail/nvtx/ranges.hpp +++ b/cpp/include/cuspatial/detail/nvtx/ranges.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, NVIDIA CORPORATION. + * Copyright (c) 2020-2023, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,17 +20,12 @@ namespace cuspatial { /** - * @brief Tag type for libcudf's NVTX domain. + * @brief Tag type for libcuspatial's NVTX domain. */ struct libcuspatial_domain { - static constexpr char const* name{"libcuspatial"}; ///< Name of the libcudf domain + static constexpr char const* name{"libcuspatial"}; ///< Name of the libcuspatial domain }; -/** - * @brief Alias for an NVTX range in the libcudf domain. - */ -using thread_range = ::nvtx3::domain_thread_range; - } // namespace cuspatial /** diff --git a/cpp/include/cuspatial_test/geometry_generator.cuh b/cpp/include/cuspatial_test/geometry_generator.cuh index 4dd2dc73a..2e3ab27c4 100644 --- a/cpp/include/cuspatial_test/geometry_generator.cuh +++ b/cpp/include/cuspatial_test/geometry_generator.cuh @@ -16,6 +16,7 @@ #pragma once +#include #include #include @@ -251,5 +252,60 @@ auto generate_multipolygon_array(multipolygon_generator_parameter params, std::move(coordinates)); } +/** + * @brief Struct to store the parameters of the multipoint aray + * + * @tparam T Type of the coordinates + */ +template +struct multipoint_generator_parameter { + using element_t = T; + + std::size_t num_multipoints; + std::size_t num_points_per_multipoints; + vec_2d lower_left; + vec_2d upper_right; + + CUSPATIAL_HOST_DEVICE std::size_t num_points() + { + return num_multipoints * num_points_per_multipoints; + } +}; + +/** + * @brief Helper to generate random multipoints within a range + * + * @tparam T The floating point type for the coordinates + * @param params Parameters to specify for the multipoints + * @param stream The CUDA stream to use for device memory operations and kernel launches + * @return a cuspatial::test::multipoint_array object + */ +template +auto generate_multipoint_array(multipoint_generator_parameter params, + rmm::cuda_stream_view stream) +{ + rmm::device_uvector> coordinates(params.num_points(), stream); + rmm::device_uvector offsets(params.num_multipoints + 1, stream); + + thrust::sequence(rmm::exec_policy(stream), + offsets.begin(), + offsets.end(), + std::size_t{0}, + params.num_points_per_multipoints); + + auto engine_x = deterministic_engine(params.num_points()); + auto engine_y = deterministic_engine(2 * params.num_points()); + + auto x_dist = make_uniform_dist(params.lower_left.x, params.upper_right.x); + auto y_dist = make_uniform_dist(params.lower_left.y, params.upper_right.y); + + auto point_gen = + point_generator(params.lower_left, params.upper_right, engine_x, engine_y, x_dist, y_dist); + + thrust::tabulate(rmm::exec_policy(stream), coordinates.begin(), coordinates.end(), point_gen); + + return make_multipoint_array(std::move(offsets), std::move(coordinates)); +} + } // namespace test } // namespace cuspatial diff --git a/cpp/include/cuspatial_test/random.cuh b/cpp/include/cuspatial_test/random.cuh index 8cd6b71e2..d2a65af3b 100644 --- a/cpp/include/cuspatial_test/random.cuh +++ b/cpp/include/cuspatial_test/random.cuh @@ -154,14 +154,21 @@ struct value_generator { template struct point_generator { using Cart2D = cuspatial::vec_2d; - value_generator vgen; - - point_generator(T lower_bound, T upper_bound, thrust::minstd_rand& engine, Generator gen) - : vgen(lower_bound, upper_bound, engine, gen) + value_generator vgenx; + value_generator vgeny; + + point_generator(vec_2d lower_left, + vec_2d upper_right, + thrust::minstd_rand& engine_x, + thrust::minstd_rand& engine_y, + Generator gen_x, + Generator gen_y) + : vgenx(lower_left.x, upper_right.x, engine_x, gen_x), + vgeny(lower_left.y, upper_right.y, engine_y, gen_y) { } - __device__ Cart2D operator()(size_t n) { return {vgen(n), vgen(n)}; } + __device__ Cart2D operator()(size_t n) { return {vgenx(n), vgeny(n)}; } }; /** diff --git a/cpp/include/cuspatial_test/vector_factories.cuh b/cpp/include/cuspatial_test/vector_factories.cuh index 020645f94..14c363b30 100644 --- a/cpp/include/cuspatial_test/vector_factories.cuh +++ b/cpp/include/cuspatial_test/vector_factories.cuh @@ -309,11 +309,22 @@ auto make_multilinestring_array(std::initializer_list geometry_inl, template class multipoint_array { public: - multipoint_array(GeometryArray geometry_offsets_array, CoordinateArray coordinate_array) + using geometry_t = typename GeometryArray::value_type; + using coord_t = typename CoordinateArray::value_type; + + multipoint_array(thrust::device_vector geometry_offsets_array, + thrust::device_vector coordinate_array) : _geometry_offsets(geometry_offsets_array), _coordinates(coordinate_array) { } + multipoint_array(rmm::device_uvector&& geometry_offsets_array, + rmm::device_uvector&& coordinate_array) + : _geometry_offsets(std::move(geometry_offsets_array)), + _coordinates(std::move(coordinate_array)) + { + } + /// Return the number of multipoints auto size() { return _geometry_offsets.size() - 1; } @@ -337,9 +348,15 @@ class multipoint_array { * coordinates */ template -auto make_multipoints_array(GeometryRange geometry_inl, CoordRange coordinates_inl) +auto make_multipoint_array(GeometryRange geometry_inl, CoordRange coordinates_inl) { - return multipoint_array{make_device_vector(geometry_inl), make_device_vector(coordinates_inl)}; + using IndexType = typename GeometryRange::value_type; + using CoordType = typename CoordRange::value_type; + using DeviceIndexVector = thrust::device_vector; + using DeviceCoordVector = thrust::device_vector; + + return multipoint_array{ + make_device_vector(geometry_inl), make_device_vector(coordinates_inl)}; } /** @@ -347,17 +364,17 @@ auto make_multipoints_array(GeometryRange geometry_inl, CoordRange coordinates_i * * Example: Construct an array of 2 multipoints, each with 2, 0, 1 points: * using P = vec_2d; - * make_multipoints_array({{P{0.0, 1.0}, P{2.0, 0.0}}, {}, {P{3.0, 4.0}}}); + * make_multipoint_array({{P{0.0, 1.0}, P{2.0, 0.0}}, {}, {P{3.0, 4.0}}}); * * Example: Construct an empty multilinestring array: - * make_multipoints_array({}); // Explicit parameter required to deduce type. + * make_multipoint_array({}); // Explicit parameter required to deduce type. * * @tparam T Type of coordinate * @param inl List of multipoints * @return multipoints_array object */ template -auto make_multipoints_array(std::initializer_list>> inl) +auto make_multipoint_array(std::initializer_list>> inl) { std::vector offsets{0}; std::transform(inl.begin(), inl.end(), std::back_inserter(offsets), [](auto multipoint) { @@ -371,8 +388,20 @@ auto make_multipoints_array(std::initializer_list(offsets), - rmm::device_vector>(coordinates)}; + return multipoint_array, rmm::device_vector>>{ + rmm::device_vector(offsets), rmm::device_vector>(coordinates)}; +} + +/** + * @brief Factory method to construct multipoint array by moving the offsets and coordinates from + * `rmm::device_uvector`. + */ +template +auto make_multipoint_array(rmm::device_uvector geometry_offsets, + rmm::device_uvector> coords) +{ + return multipoint_array, rmm::device_uvector>>{ + std::move(geometry_offsets), std::move(coords)}; } } // namespace test diff --git a/cpp/tests/distance/point_distance_test.cu b/cpp/tests/distance/point_distance_test.cu index 573c5232a..72476ee19 100644 --- a/cpp/tests/distance/point_distance_test.cu +++ b/cpp/tests/distance/point_distance_test.cu @@ -14,9 +14,8 @@ * limitations under the License. */ -#include - #include +#include #include #include @@ -59,7 +58,8 @@ struct PairwisePointDistanceTest : public ::testing::Test { { auto engine = cuspatial::test::deterministic_engine(0); auto uniform = cuspatial::test::make_normal_dist(0.0, 1.0); - auto pgen = cuspatial::test::point_generator(T{0.0}, T{1.0}, engine, uniform); + auto pgen = cuspatial::test::point_generator( + vec_2d{0.0, 0.0}, vec_2d{1.0, 1.0}, engine, engine, uniform, uniform); rmm::device_vector> points(num_points); auto counting_iter = thrust::make_counting_iterator(seed); thrust::transform( diff --git a/cpp/tests/distance/point_polygon_distance_test.cu b/cpp/tests/distance/point_polygon_distance_test.cu index 2cee8da4b..c16d324e0 100644 --- a/cpp/tests/distance/point_polygon_distance_test.cu +++ b/cpp/tests/distance/point_polygon_distance_test.cu @@ -61,7 +61,7 @@ struct PairwisePointPolygonDistanceTest : public ::testing::Test { std::vector> const& multipolygon_coordinates, std::initializer_list expected) { - auto d_multipoints = make_multipoints_array(multipoints); + auto d_multipoints = make_multipoint_array(multipoints); auto d_multipolygons = make_multipolygon_array( range{multipolygon_geometry_offsets.begin(), multipolygon_geometry_offsets.end()}, range{multipolygon_part_offsets.begin(), multipolygon_part_offsets.end()}, diff --git a/cpp/tests/equality/pairwise_multipoint_equals_count_test.cu b/cpp/tests/equality/pairwise_multipoint_equals_count_test.cu index a12420858..a7d5f57de 100644 --- a/cpp/tests/equality/pairwise_multipoint_equals_count_test.cu +++ b/cpp/tests/equality/pairwise_multipoint_equals_count_test.cu @@ -32,8 +32,8 @@ struct PairwiseMultipointEqualsCountTest : public BaseFixture { std::initializer_list>> rhs_coordinates, std::initializer_list expected) { - auto larray = make_multipoints_array(lhs_coordinates); - auto rarray = make_multipoints_array(rhs_coordinates); + auto larray = make_multipoint_array(lhs_coordinates); + auto rarray = make_multipoint_array(rhs_coordinates); auto lhs = larray.range(); auto rhs = rarray.range(); diff --git a/cpp/tests/find/find_duplicate_points_test.cu b/cpp/tests/find/find_duplicate_points_test.cu index f4185227c..49bc86bb9 100644 --- a/cpp/tests/find/find_duplicate_points_test.cu +++ b/cpp/tests/find/find_duplicate_points_test.cu @@ -41,7 +41,7 @@ TYPED_TEST(FindDuplicatePointsTest, simple) using T = TypeParam; using P = vec_2d; - auto multipoints = make_multipoints_array({{P{0.0, 0.0}, P{1.0, 0.0}, P{0.0, 0.0}}}); + auto multipoints = make_multipoint_array({{P{0.0, 0.0}, P{1.0, 0.0}, P{0.0, 0.0}}}); rmm::device_vector flags(multipoints.range().num_points()); std::vector expected_flags{0, 0, 1}; @@ -56,7 +56,7 @@ TYPED_TEST(FindDuplicatePointsTest, empty) using T = TypeParam; using P = vec_2d; - auto multipoints = make_multipoints_array({}); + auto multipoints = make_multipoint_array({}); rmm::device_vector flags(multipoints.range().num_points()); std::vector expected_flags{}; @@ -71,7 +71,7 @@ TYPED_TEST(FindDuplicatePointsTest, multi) using T = TypeParam; using P = vec_2d; - auto multipoints = make_multipoints_array( + auto multipoints = make_multipoint_array( {{P{0.0, 0.0}, P{1.0, 0.0}, P{0.0, 0.0}, P{0.0, 0.0}, P{1.0, 0.0}, P{2.0, 0.0}}, {P{5.0, 5.0}, P{5.0, 5.0}}, {P{0.0, 0.0}}}); diff --git a/cpp/tests/find/find_points_on_segments_test.cu b/cpp/tests/find/find_points_on_segments_test.cu index 8981986bc..4296f6479 100644 --- a/cpp/tests/find/find_points_on_segments_test.cu +++ b/cpp/tests/find/find_points_on_segments_test.cu @@ -41,7 +41,7 @@ struct FindPointOnSegmentTest : public BaseFixture { std::initializer_list> segments, std::initializer_list expected_flags) { - auto d_multipoints = make_multipoints_array(multipoints); + auto d_multipoints = make_multipoint_array(multipoints); auto d_segment_offsets = make_device_vector(segment_offsets); auto d_segments = make_device_vector>(segments); diff --git a/cpp/tests/join/quadtree_point_in_polygon_test_large.cu b/cpp/tests/join/quadtree_point_in_polygon_test_large.cu index 14a956016..8da2a2aed 100644 --- a/cpp/tests/join/quadtree_point_in_polygon_test_large.cu +++ b/cpp/tests/join/quadtree_point_in_polygon_test_large.cu @@ -58,7 +58,12 @@ inline auto generate_points( { auto engine = cuspatial::test::deterministic_engine(0); auto uniform = cuspatial::test::make_normal_dist(0.0, 1.0); - auto pgen = cuspatial::test::point_generator(T{0.0}, T{1.0}, engine, uniform); + auto pgen = cuspatial::test::point_generator(cuspatial::vec_2d{0.0, 0.0}, + cuspatial::vec_2d{1.0, 1.0}, + engine, + engine, + uniform, + uniform); auto num_points = quads.size() * points_per_quad; rmm::device_uvector> points(num_points, stream, mr); diff --git a/cpp/tests/point_in_polygon/point_in_polygon_test.cu b/cpp/tests/point_in_polygon/point_in_polygon_test.cu index d958a9a97..00e4229ed 100644 --- a/cpp/tests/point_in_polygon/point_in_polygon_test.cu +++ b/cpp/tests/point_in_polygon/point_in_polygon_test.cu @@ -383,7 +383,7 @@ TYPED_TEST(PointInPolygonTest, ContainsButCollinearWithBoundary) { using T = TypeParam; - auto point = cuspatial::test::make_multipoints_array({{{0.5, 0.5}}}); + auto point = cuspatial::test::make_multipoint_array({{{0.5, 0.5}}}); auto polygon = cuspatial::test::make_multipolygon_array( {0, 1}, {0, 1}, diff --git a/cpp/tests/range/multilinestring_range_test.cu b/cpp/tests/range/multilinestring_range_test.cu index 0d00d5c5f..ec374ef8f 100644 --- a/cpp/tests/range/multilinestring_range_test.cu +++ b/cpp/tests/range/multilinestring_range_test.cu @@ -128,7 +128,7 @@ struct MultilinestringRangeTest : public BaseFixture { thrust::device_vector> got_coordinates(multipoint_range.point_begin(), multipoint_range.point_end()); - auto expected_multipoint = make_multipoints_array(expected); + auto expected_multipoint = make_multipoint_array(expected); auto expected_range = expected_multipoint.range(); thrust::device_vector expected_geometry_offset(expected_range.offsets_begin(), diff --git a/cpp/tests/range/multipolygon_range_test.cu b/cpp/tests/range/multipolygon_range_test.cu index 0f1b08809..90ffa7e18 100644 --- a/cpp/tests/range/multipolygon_range_test.cu +++ b/cpp/tests/range/multipolygon_range_test.cu @@ -140,10 +140,10 @@ struct MultipolygonRangeTest : public BaseFixture { multipolygon_coordinates); auto rng = multipolygon_array.range().as_multipoint_range(); - auto got = make_multipoints_array(range(rng.offsets_begin(), rng.offsets_end()), - range(rng.point_begin(), rng.point_end())); + auto got = make_multipoint_array(range(rng.offsets_begin(), rng.offsets_end()), + range(rng.point_begin(), rng.point_end())); - auto expected = make_multipoints_array( + auto expected = make_multipoint_array( range(multipoint_geometry_offset.begin(), multipoint_geometry_offset.end()), range(multipoint_coordinates.begin(), multipoint_coordinates.end())); diff --git a/cpp/tests/utility_test/test_multipoint_factory.cu b/cpp/tests/utility_test/test_multipoint_factory.cu index f7b1ba0a4..ad800cf98 100644 --- a/cpp/tests/utility_test/test_multipoint_factory.cu +++ b/cpp/tests/utility_test/test_multipoint_factory.cu @@ -34,7 +34,7 @@ TYPED_TEST(MultiPointFactoryTest, simple) using P = vec_2d; auto multipoints = - make_multipoints_array({{P{0.0, 0.0}, P{1.0, 0.0}}, {P{2.0, 0.0}, P{2.0, 2.0}}}); + make_multipoint_array({{P{0.0, 0.0}, P{1.0, 0.0}}, {P{2.0, 0.0}, P{2.0, 2.0}}}); auto [offsets, coords] = multipoints.release(); @@ -51,7 +51,7 @@ TYPED_TEST(MultiPointFactoryTest, empty) using T = TypeParam; using P = vec_2d; - auto multipoints = make_multipoints_array({}); + auto multipoints = make_multipoint_array({}); auto [offsets, coords] = multipoints.release(); @@ -67,7 +67,7 @@ TYPED_TEST(MultiPointFactoryTest, mixed_empty_multipoint) using T = TypeParam; using P = vec_2d; - auto multipoints = make_multipoints_array({{P{1.0, 0.0}}, {}, {P{2.0, 3.0}, P{4.0, 5.0}}}); + auto multipoints = make_multipoint_array({{P{1.0, 0.0}}, {}, {P{2.0, 3.0}, P{4.0, 5.0}}}); auto [offsets, coords] = multipoints.release(); @@ -83,7 +83,7 @@ TYPED_TEST(MultiPointFactoryTest, mixed_empty_multipoint2) using T = TypeParam; using P = vec_2d; - auto multipoints = make_multipoints_array({{}, {P{1.0, 0.0}}, {P{2.0, 3.0}, P{4.0, 5.0}}}); + auto multipoints = make_multipoint_array({{}, {P{1.0, 0.0}}, {P{2.0, 3.0}, P{4.0, 5.0}}}); auto [offsets, coords] = multipoints.release(); @@ -99,7 +99,7 @@ TYPED_TEST(MultiPointFactoryTest, mixed_empty_multipoint3) using T = TypeParam; using P = vec_2d; - auto multipoints = make_multipoints_array({{P{1.0, 0.0}}, {P{2.0, 3.0}, P{4.0, 5.0}}, {}}); + auto multipoints = make_multipoint_array({{P{1.0, 0.0}}, {P{2.0, 3.0}, P{4.0, 5.0}}, {}}); auto [offsets, coords] = multipoints.release();