./
Coverage:
low: ≥ 0%
medium: ≥ 75.0%
high: ≥ 90.0%
Lines:
255 / 257
99.2%
Branches:
196 / 229
85.6%
Functions:
48 / 49, 2 excl
98.0%

include/terraingen/raster/cell_loops.h
Line Branch Exec Source
1 // SPDX-License-Identifier: BSD-3-Clause
2
3 /// @file
4 /// @brief Parallel loops over a raster's cells: every cell, or the windows around features.
5 #pragma once
6
7 #include "terraingen/geometry/geometry.h"
8 #include "terraingen/geometry/surface.h"
9 #include "terraingen/raster/grid.h"
10 #include "terraingen/raster/raster.h"
11 #include "terraingen/util/bits.h"
12 #include "terraingen/util/parallel.h"
13
14 #include <algorithm>
15 #include <cstddef>
16 #include <utility>
17 #include <vector>
18
19 namespace terraingen {
20
21 /// A block of a raster's cells: columns [`colBegin`, `colEnd`) and rows [`rowBegin`,
22 /// `rowEnd`).
23 struct PixelWindow {
24 std::size_t colBegin = 0; ///< First column.
25 std::size_t colEnd = 0; ///< One past the last column.
26 std::size_t rowBegin = 0; ///< First row.
27 std::size_t rowEnd = 0; ///< One past the last row.
28
29 /// Whether the window holds no cell, either range being empty.
30 50421 bool Empty() const {
31
19/24
✓ Branch 0 taken 81 times.
✓ Branch 0 taken 29852 times.
✓ Branch 1 taken 8 times.
✓ Branch 1 taken 15337 times.
✓ Branch 2 taken 80 times.
✓ Branch 2 taken 28317 times.
✓ Branch 3 taken 1 time.
✓ Branch 3 taken 1535 times.
✓ Branch 4 taken 3 times.
✓ Branch 4 taken 424 times.
✓ Branch 4 taken 2360 times.
✓ Branch 5 taken 1 time.
✓ Branch 5 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 3 times.
✓ Branch 6 taken 423 times.
✓ Branch 6 taken 2360 times.
✗ Branch 7 not taken.
✓ Branch 7 taken 1 time.
✗ Branch 7 not taken.
✓ Branch 8 taken 2360 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 2360 times.
✗ Branch 11 not taken.
50424 return colBegin >= colEnd || rowBegin >= rowEnd;
32 }
33
34 /// The number of columns; 0 for none.
35 4131813 std::size_t Width() const {
36
6/12
✓ Branch 0 taken 13 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 24 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 24 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 5720 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 2062880 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 2063152 times.
✗ Branch 11 not taken.
4131813 return colEnd > colBegin ? colEnd - colBegin : 0;
37 }
38
39 /// The number of rows; 0 for none.
40 4125908 std::size_t Height() const {
41
8/16
<unknown function 30>:
✓ Branch 0 taken 30 times.
✗ Branch 1 not taken.
<unknown function 35>:
✓ Branch 0 taken 13 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 24 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 24 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2057212 times.
✗ Branch 7 not taken.
✓ Branch 8 taken 5688 times.
✗ Branch 9 not taken.
✓ Branch 10 taken 2057212 times.
✗ Branch 11 not taken.
✓ Branch 12 taken 5705 times.
✗ Branch 13 not taken.
4125908 return rowEnd > rowBegin ? rowEnd - rowBegin : 0;
42 }
43
44 /// Memberwise equality.
45 434 bool operator==(const PixelWindow& other) const {
46
6/6
✓ Branch 0 taken 388 times.
✓ Branch 1 taken 46 times.
✓ Branch 2 taken 328 times.
✓ Branch 3 taken 60 times.
✓ Branch 4 taken 326 times.
✓ Branch 5 taken 2 times.
434 return colBegin == other.colBegin && colEnd == other.colEnd && rowBegin == other.rowBegin &&
47
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 326 times.
326 rowEnd == other.rowEnd;
48 }
49 bool operator!=(const PixelWindow& other) const {
50 return !(*this == other);
51 }
52 };
53
54 /// The possibly empty window of a grid's pixels whose extent meets a world-coordinate box,
55 /// clamped to the grid.
56 /// @throws std::domain_error if the grid's transform is not invertible.
57 PixelWindow PixelWindowIn(const RasterGrid& grid, const Bounds2d& box);
58
59 /// The window of every cell of a grid.
60 792 inline PixelWindow WholeWindow(const RasterGrid& grid) {
61
2/2
✓ Branch 1 taken 317 times.
✓ Branch 2 taken 108 times.
792 return {0, grid.width, 0, grid.height};
62 }
63
64 /// The grid of the cells `cells` of `grid`, on its lattice: its transform starts at the window's
65 /// first cell, and is `grid`'s own when that is the first cell of `grid`.
66 RasterGrid Subgrid(const RasterGrid& grid, const PixelWindow& cells);
67
68 /// The cells of tile (`tx`, `ty`) of `tileWidth` x `tileHeight` cells that lie in `window`.
69 39740 inline PixelWindow TileWindow(std::size_t tx, std::size_t ty, std::size_t tileWidth,
70 std::size_t tileHeight, const PixelWindow& window) {
71 39740 return {
72
2/2
✓ Branch 0 taken 29946 times.
✓ Branch 1 taken 9794 times.
39740 std::max(window.colBegin, tx * tileWidth), std::min(window.colEnd, (tx + 1) * tileWidth),
73
6/6
✓ Branch 0 taken 29960 times.
✓ Branch 1 taken 9780 times.
✓ Branch 2 taken 29756 times.
✓ Branch 3 taken 9984 times.
✓ Branch 4 taken 29776 times.
✓ Branch 5 taken 9964 times.
99456 std::max(window.rowBegin, ty * tileHeight), std::min(window.rowEnd, (ty + 1) * tileHeight)};
74 }
75
76 /// Calls `visit(tx, ty, cells)` for each tile (`tx`, `ty`) of `tileWidth` x `tileHeight` cells
77 /// that a non-empty `window` meets, row by row of tiles, with its cells in the window
78 /// (`TileWindow`).
79 template <typename Visit>
80 27805 void ForEachTileIn(const PixelWindow& window, std::size_t tileWidth, std::size_t tileHeight,
81 const Visit& visit) {
82
22/22
void terraingen::ForEachTileIn<ForEachTileIn_VisitsTheTilesAWindowMeetsClippedToIt_Test::TestBody()::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, ForEachTileIn_VisitsTheTilesAWindowMeetsClippedToIt_Test::TestBody()::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
void terraingen::ForEachTileIn<terraingen::(anonymous namespace)::TileLists(terraingen::Raster<float> const&, std::vector<std::vector<terraingen::PixelWindow, std::allocator<terraingen::PixelWindow> >, std::allocator<std::vector<terraingen::PixelWindow, std::allocator<terraingen::PixelWindow> > > > const&, bool)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::(anonymous namespace)::TileLists(terraingen::Raster<float> const&, std::vector<std::vector<terraingen::PixelWindow, std::allocator<terraingen::PixelWindow> >, std::allocator<std::vector<terraingen::PixelWindow, std::allocator<terraingen::PixelWindow> > > > const&, bool)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 65420 times.
✓ Branch 1 taken 22591 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<double, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<double, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 1841 times.
✓ Branch 1 taken 1628 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 12 times.
✓ Branch 1 taken 11 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<double, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<double, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 42 times.
✓ Branch 1 taken 34 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<float, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<float, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 12 times.
✓ Branch 1 taken 6 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 3655 times.
✓ Branch 1 taken 3196 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
void terraingen::ForEachTileIn<terraingen::ReadGeoTiffWindow(std::filesystem::__cxx11::path const&, unsigned long, terraingen::PixelWindow const&)::{lambda()#1}::operator()() const::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ReadGeoTiffWindow(std::filesystem::__cxx11::path const&, unsigned long, terraingen::PixelWindow const&)::{lambda()#1}::operator()() const::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 430 times.
✓ Branch 1 taken 331 times.
99222 for (std::size_t ty = window.rowBegin / tileHeight; ty <= (window.rowEnd - 1) / tileHeight;
83 ++ty) {
84
22/22
void terraingen::ForEachTileIn<ForEachTileIn_VisitsTheTilesAWindowMeetsClippedToIt_Test::TestBody()::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, ForEachTileIn_VisitsTheTilesAWindowMeetsClippedToIt_Test::TestBody()::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 6 times.
✓ Branch 1 taken 2 times.
void terraingen::ForEachTileIn<terraingen::(anonymous namespace)::TileLists(terraingen::Raster<float> const&, std::vector<std::vector<terraingen::PixelWindow, std::allocator<terraingen::PixelWindow> >, std::allocator<std::vector<terraingen::PixelWindow, std::allocator<terraingen::PixelWindow> > > > const&, bool)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::(anonymous namespace)::TileLists(terraingen::Raster<float> const&, std::vector<std::vector<terraingen::PixelWindow, std::allocator<terraingen::PixelWindow> >, std::allocator<std::vector<terraingen::PixelWindow, std::allocator<terraingen::PixelWindow> > > > const&, bool)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 301949 times.
✓ Branch 1 taken 65420 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<double, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<double, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 2059 times.
✓ Branch 1 taken 1841 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 14 times.
✓ Branch 1 taken 12 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<double, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<double, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 49 times.
✓ Branch 1 taken 42 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<float, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<float, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 12 times.
✓ Branch 1 taken 12 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 4304 times.
✓ Branch 1 taken 3655 times.
void terraingen::ForEachTileIn<terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
void terraingen::ForEachTileIn<terraingen::ReadGeoTiffWindow(std::filesystem::__cxx11::path const&, unsigned long, terraingen::PixelWindow const&)::{lambda()#1}::operator()() const::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}>(terraingen::PixelWindow const&, unsigned long, unsigned long, terraingen::ReadGeoTiffWindow(std::filesystem::__cxx11::path const&, unsigned long, terraingen::PixelWindow const&)::{lambda()#1}::operator()() const::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1} const&):
✓ Branch 0 taken 688 times.
✓ Branch 1 taken 428 times.
380503 for (std::size_t tx = window.colBegin / tileWidth; tx <= (window.colEnd - 1) / tileWidth;
85 ++tx) {
86 309086 visit(tx, ty, TileWindow(tx, ty, tileWidth, tileHeight, window));
87 }
88 }
89 27803 }
90
91 /// Calls `visit(tile)` for each tile of up to `side` x `side` cells of a `width` x `height` grid,
92 /// row by row of tiles, the tiles split over threads.
93 /// @param threads Threads to split the tiles over; 0 for every hardware thread.
94 template <typename Visit>
95 976 void ForEachTile(std::size_t width, std::size_t height, std::size_t side, unsigned threads,
96 const Visit& visit) {
97 976 const std::size_t tilesX = CeilDiv(width, side);
98
9/9
terraingen::ForEachTile<terraingen::(anonymous namespace)::ShapeTilesOnCpu(terraingen::Raster<float>&, unsigned int, terraingen::CraterShapeKernel const&, terraingen::CraterKernelBatch const&, std::vector<terraingen::CraterFrame, std::allocator<terraingen::CraterFrame> > const&, terraingen::(anonymous namespace)::CraterTiles const&, terraingen::Surface const&)::{lambda(terraingen::PixelWindow const&)#1}>(unsigned long, unsigned long, unsigned long, unsigned int, terraingen::(anonymous namespace)::ShapeTilesOnCpu(terraingen::Raster<float>&, unsigned int, terraingen::CraterShapeKernel const&, terraingen::CraterKernelBatch const&, std::vector<terraingen::CraterFrame, std::allocator<terraingen::CraterFrame> > const&, terraingen::(anonymous namespace)::CraterTiles const&, terraingen::Surface const&)::{lambda(terraingen::PixelWindow const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 2 taken 438 times.
terraingen::ForEachTile<terraingen::detail::FillByTiles<terraingen::DiamondSquareUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, terraingen::DiamondSquareUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1}>(unsigned long, unsigned long, unsigned long, unsigned int, terraingen::detail::FillByTiles<terraingen::DiamondSquareUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, terraingen::DiamondSquareUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 2 taken 115 times.
terraingen::ForEachTile<terraingen::detail::FillByTiles<terraingen::KernelUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, terraingen::KernelUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1}>(unsigned long, unsigned long, unsigned long, unsigned int, terraingen::detail::FillByTiles<terraingen::KernelUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, terraingen::KernelUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 2 taken 246 times.
terraingen::ForEachTile<terraingen::detail::FillByTiles<terraingen::ShapeModelSource::FillSamples(terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, terraingen::ShapeModelSource::FillSamples(terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1}>(unsigned long, unsigned long, unsigned long, unsigned int, terraingen::detail::FillByTiles<terraingen::ShapeModelSource::FillSamples(terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, terraingen::ShapeModelSource::FillSamples(terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 2 taken 12 times.
terraingen::ForEachTile<terraingen::detail::FillByTiles<terraingen::SyntheticSource::FillSamples(terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, terraingen::SyntheticSource::FillSamples(terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1}>(unsigned long, unsigned long, unsigned long, unsigned int, terraingen::detail::FillByTiles<terraingen::SyntheticSource::FillSamples(terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, terraingen::SyntheticSource::FillSamples(terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 2 taken 159 times.
void terraingen::ForEachTile<ForEachTile_CoversEveryCellOnceInTilesOfTheSide_Test::TestBody()::{lambda(terraingen::PixelWindow const&)#1}>(unsigned long, unsigned long, unsigned long, unsigned int, ForEachTile_CoversEveryCellOnceInTilesOfTheSide_Test::TestBody()::{lambda(terraingen::PixelWindow const&)#1} const&):
✓ Branch 2 taken 1 time.
void terraingen::ForEachTile<ForEachTile_CoversEveryCellOnceInTilesOfTheSide_Test::TestBody()::{lambda(terraingen::PixelWindow const&)#2}>(unsigned long, unsigned long, unsigned long, unsigned int, ForEachTile_CoversEveryCellOnceInTilesOfTheSide_Test::TestBody()::{lambda(terraingen::PixelWindow const&)#2} const&):
✓ Branch 2 taken 1 time.
void terraingen::ForEachTile<terraingen::detail::FillByTiles<(anonymous namespace)::MeanUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, (anonymous namespace)::MeanUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1}>(unsigned long, unsigned long, unsigned long, unsigned int, terraingen::detail::FillByTiles<(anonymous namespace)::MeanUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, (anonymous namespace)::MeanUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1} const&):
✓ Branch 2 taken 2 times.
void terraingen::ForEachTile<terraingen::detail::FillByTiles<(anonymous namespace)::ThreadNotingUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, (anonymous namespace)::ThreadNotingUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1}>(unsigned long, unsigned long, unsigned long, unsigned int, terraingen::detail::FillByTiles<(anonymous namespace)::ThreadNotingUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1}>(terraingen::SampleBlock&, unsigned int, (anonymous namespace)::ThreadNotingUpsampler::FillSamples(terraingen::PostLattice const&, terraingen::SampleBlock&, double, unsigned int) const::{lambda(terraingen::Span<terraingen::Vec2d const>, terraingen::Span<float>)#1} const&)::{lambda(terraingen::PixelWindow const&)#1} const&):
✓ Branch 2 taken 2 times.
976 ParallelFor(tilesX * CeilDiv(height, side), threads, [&](std::size_t tile) {
99 32021 visit(TileWindow(tile % tilesX, tile / tilesX, side, side, {0, width, 0, height}));
100 });
101 976 }
102
103 /// The non-empty windows of a grid (in `surface`'s coordinates) covering a box: one on a plane,
104 /// up to three on a sphere, none off the grid.
105 /// @param box The box: on a sphere a longitude-latitude box, which is also taken a turn either way
106 /// so a grid running past the antimeridian is covered on both sides.
107 /// @throws std::domain_error if the grid's transform is not invertible.
108 std::vector<PixelWindow> PixelWindowsIn(const RasterGrid& grid, const Bounds2d& box,
109 const Surface& surface);
110
111 /// One cell `ForEachFeatureCell` visits.
112 struct FeatureCell {
113 std::size_t feature = 0; ///< Index of the feature.
114 std::size_t col = 0; ///< Column of the cell.
115 std::size_t row = 0; ///< Row of the cell.
116 Vec2d center{}; ///< World coordinates of the cell's center.
117 };
118
119 /// Side in cells of the tiles `ForEachFeatureCell` sorts features into.
120 inline constexpr std::size_t kFeatureTileCells = 32;
121
122 /// Visits the cells holding data of each feature's box (`PixelWindowsIn` on `surface`), feature by
123 /// feature: the boxes are sorted into tiles of `kFeatureTileCells` cells, which run over several
124 /// threads and visit their features in order, so every cell sees the features in the same order
125 /// whatever `threads` is.
126 /// @param threads Threads to split the tiles over; 0 for every hardware thread.
127 /// @param visit `visit(cell, at)`, `cell` the value to read and update and `at` its `FeatureCell`.
128 template <typename T, typename Visit>
129 127 void ForEachFeatureCell(Raster<T>& raster, unsigned threads, const std::vector<Bounds2d>& boxes,
130 const Surface& surface, const Visit& visit) {
131 127 constexpr std::size_t kSide = kFeatureTileCells;
132 127 const RasterGrid& grid = raster.Grid();
133 127 const std::size_t tilesX = CeilDiv(raster.Width(), kSide);
134 127 std::vector<std::vector<std::pair<std::size_t, PixelWindow>>> tiles(
135 127 tilesX * CeilDiv(raster.Height(), kSide));
136
16/16
void terraingen::ForEachFeatureCell<double, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
void terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 0 taken 1628 times.
✓ Branch 1 taken 9 times.
void terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2} const&):
✓ Branch 0 taken 11 times.
✓ Branch 1 taken 9 times.
void terraingen::ForEachFeatureCell<double, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 0 taken 119 times.
✓ Branch 1 taken 2 times.
void terraingen::ForEachFeatureCell<float, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 0 taken 6 times.
✓ Branch 1 taken 2 times.
void terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
void terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 0 taken 3214 times.
✓ Branch 1 taken 101 times.
void terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 2 times.
5110 for (std::size_t n = 0; n < boxes.size(); ++n) {
137
24/24
void terraingen::ForEachFeatureCell<double, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 2 times.
void terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 1628 times.
✓ Branch 3 taken 1628 times.
✓ Branch 4 taken 1628 times.
void terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2} const&):
✓ Branch 1 taken 11 times.
✓ Branch 3 taken 11 times.
✓ Branch 4 taken 11 times.
void terraingen::ForEachFeatureCell<double, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 119 times.
✓ Branch 3 taken 34 times.
✓ Branch 4 taken 119 times.
void terraingen::ForEachFeatureCell<float, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 6 times.
✓ Branch 3 taken 6 times.
✓ Branch 4 taken 6 times.
void terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 2 times.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 2 times.
void terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 3214 times.
✓ Branch 3 taken 3196 times.
✓ Branch 4 taken 3214 times.
void terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 1 time.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 1 time.
9863 for (const PixelWindow& window : PixelWindowsIn(grid, boxes[n], surface)) {
138 4880 ForEachTileIn(window, kSide, kSide,
139
8/8
terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long, unsigned long, terraingen::PixelWindow const&)#1}::operator()(unsigned long, unsigned long, terraingen::PixelWindow const&) const:
✓ Branch 1 taken 2 times.
void terraingen::ForEachFeatureCell<double, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 2 times.
void terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 1628 times.
void terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2} const&):
✓ Branch 1 taken 11 times.
void terraingen::ForEachFeatureCell<double, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 34 times.
void terraingen::ForEachFeatureCell<float, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 6 times.
void terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 3196 times.
void terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 1 time.
4880 [&](std::size_t tx, std::size_t ty, const PixelWindow& cells) {
140 2 tiles[ty * tilesX + tx].emplace_back(n, cells);
141 });
142 }
143 }
144
16/16
terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, DrawFeatures_DrawsEachFeatureOverItsBoxFromTheHeightBefore_Test::TestBody()::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
void terraingen::ForEachFeatureCell<double, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsTheCellsOfEachFeaturesBox_Test::TestBody()::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
void terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
void terraingen::ForEachFeatureCell<double, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#2} const&):
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
void terraingen::ForEachFeatureCell<double, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<double>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
void terraingen::ForEachFeatureCell<float, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, ForEachFeatureCell_VisitsEachFeaturesCellsInOrderOnAnyNumberOfThreads_Test::TestBody()::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
void terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::BoulderLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 101 times.
✓ Branch 4 taken 101 times.
void terraingen::ForEachFeatureCell<float, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1}>(terraingen::Raster<float>&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::DrawFeatures<terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1}>(terraingen::SampleBlock&, unsigned int, std::vector<terraingen::Bounds2d, std::allocator<terraingen::Bounds2d> > const&, terraingen::Surface const&, terraingen::SandShadowLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, float, terraingen::Vec2d const&, unsigned long)#1} const&)::{lambda(float&, terraingen::FeatureCell const&)#1} const&):
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
127 ParallelFor(tiles.size(), threads, [&](std::size_t tile) {
145
2/2
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 1 time.
3 for (const auto& [feature, cells] : tiles[tile]) {
146
2/2
✓ Branch 0 taken 4 times.
✓ Branch 1 taken 2 times.
6 for (std::size_t row = cells.rowBegin; row < cells.rowEnd; ++row) {
147
2/2
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 4 times.
12 for (std::size_t col = cells.colBegin; col < cells.colEnd; ++col) {
148 8 T& cell = raster(col, row);
149
1/4
✗ Branch 0 not taken.
✓ Branch 1 taken 8 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
8 if (!raster.IsNoData(cell)) {
150 8 visit(cell, FeatureCell{feature, col, row, raster.CellCenter(col, row)});
151 }
152 }
153 }
154 }
155 });
156 127 }
157
158 /// Sets each cell of `raster` holding data to `map(value, center)`, rows over several threads.
159 /// @param threads Threads to split the rows over; 0 for every hardware thread.
160 template <typename T, typename Map>
161 48 void MapCells(Raster<T>& raster, unsigned threads, const Map& map) {
162
7/8
terraingen::MapCells<double, terraingen::MaterialSource::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double, terraingen::Vec2d const&)#1}>(terraingen::Raster<double>&, unsigned int, terraingen::MaterialSource::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 1 taken 12 times.
terraingen::MapCells<float, terraingen::ExposureField::Fill(terraingen::Raster<float>&, terraingen::Ground const&, double, unsigned int) const::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, terraingen::ExposureField::Fill(terraingen::Raster<float>&, terraingen::Ground const&, double, unsigned int) const::{lambda(float, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 1 taken 4 times.
terraingen::MapCells<float, terraingen::FormulaLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, terraingen::FormulaLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 1 taken 28 times.
terraingen::MapCells<float, terraingen::NoiseLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, terraingen::NoiseLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 1 taken 1 time.
void terraingen::MapCells<double, MapCells_SetsEveryCellOfAFreshRasterOfAnyType_Test::TestBody()::{lambda(double, terraingen::Vec2d const&)#1}>(terraingen::Raster<double>&, unsigned int, MapCells_SetsEveryCellOfAFreshRasterOfAnyType_Test::TestBody()::{lambda(double, terraingen::Vec2d const&)#1} const&):
✓ Branch 1 taken 1 time.
void terraingen::MapCells<float, MapCells_MapsEveryCellHoldingData_Test::TestBody()::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, MapCells_MapsEveryCellHoldingData_Test::TestBody()::{lambda(float, terraingen::Vec2d const&)#1} const&):
✓ Branch 1 taken 1 time.
void terraingen::MapCells<float, MapSamples_MapsCellsAndPointsHoldingData_Test::TestBody()::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, MapSamples_MapsCellsAndPointsHoldingData_Test::TestBody()::{lambda(float, terraingen::Vec2d const&)#1} const&):
✓ Branch 1 taken 1 time.
void terraingen::MapCells<float, MapSamples_MapsCellsAndPointsHoldingData_Test::TestBody()::{lambda(float, terraingen::Vec2d const&)#2}>(terraingen::Raster<float>&, unsigned int, MapSamples_MapsCellsAndPointsHoldingData_Test::TestBody()::{lambda(float, terraingen::Vec2d const&)#2} const&):
✗ Branch 1 not taken.
48 ParallelFor(raster.Height(), threads, [&](std::size_t row) {
163
8/8
terraingen::MapCells<double, terraingen::MaterialSource::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double, terraingen::Vec2d const&)#1}>(terraingen::Raster<double>&, unsigned int, terraingen::MaterialSource::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 0 taken 92376 times.
✓ Branch 1 taken 625 times.
terraingen::MapCells<float, terraingen::ExposureField::Fill(terraingen::Raster<float>&, terraingen::Ground const&, double, unsigned int) const::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, terraingen::ExposureField::Fill(terraingen::Raster<float>&, terraingen::Ground const&, double, unsigned int) const::{lambda(float, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 0 taken 131429 times.
✓ Branch 1 taken 536 times.
terraingen::MapCells<float, terraingen::FormulaLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, terraingen::FormulaLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 0 taken 4305716 times.
✓ Branch 1 taken 3906 times.
terraingen::MapCells<float, terraingen::NoiseLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, terraingen::NoiseLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 0 taken 256 times.
✓ Branch 1 taken 16 times.
4534860 for (std::size_t col = 0; col < raster.Width(); ++col) {
164 4529777 T& cell = raster(col, row);
165
7/16
terraingen::MapCells<double, terraingen::MaterialSource::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double, terraingen::Vec2d const&)#1}>(terraingen::Raster<double>&, unsigned int, terraingen::MaterialSource::MaterialCoverOver(terraingen::RasterGrid const&, terraingen::LayerContext const&) const::{lambda(double, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✗ Branch 0 not taken.
✓ Branch 1 taken 92373 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
terraingen::MapCells<float, terraingen::ExposureField::Fill(terraingen::Raster<float>&, terraingen::Ground const&, double, unsigned int) const::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, terraingen::ExposureField::Fill(terraingen::Raster<float>&, terraingen::Ground const&, double, unsigned int) const::{lambda(float, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✗ Branch 0 not taken.
✓ Branch 1 taken 131429 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
terraingen::MapCells<float, terraingen::FormulaLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, terraingen::FormulaLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✓ Branch 0 taken 104 times.
✓ Branch 1 taken 4308159 times.
✓ Branch 2 taken 99 times.
✓ Branch 3 taken 5 times.
terraingen::MapCells<float, terraingen::NoiseLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1}>(terraingen::Raster<float>&, unsigned int, terraingen::NoiseLayer::ApplySamples(terraingen::SampleBlock&, terraingen::LayerContext const&) const::{lambda(float, terraingen::Vec2d const&)#1} const&)::{lambda(unsigned long)#1}::operator()(unsigned long) const:
✗ Branch 0 not taken.
✓ Branch 1 taken 256 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
4532425 if (!raster.IsNoData(cell)) {
166 4532316 cell = static_cast<T>(map(cell, raster.CellCenter(col, row)));
167 }
168 }
169 });
170 48 }
171
172 } // namespace terraingen
173