forked from cms-patatrack/heterogeneous-clue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLayerTilesConstants.h
34 lines (25 loc) · 1.02 KB
/
LayerTilesConstants.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef LayerTilesConstants_h
#define LayerTilesConstants_h
#include <cstdint>
#include <array>
#define NLAYERS 100
constexpr int maxNSeeds = 100000;
constexpr int maxNFollowers = 128;
constexpr int localStackSizePerSeed = 128;
namespace LayerTilesConstants {
constexpr int32_t ceil(float num) {
return (static_cast<float>(static_cast<int32_t>(num)) == num) ? static_cast<int32_t>(num)
: static_cast<int32_t>(num) + ((num > 0) ? 1 : 0);
}
constexpr float minX = -250.f;
constexpr float maxX = 250.f;
constexpr float minY = -250.f;
constexpr float maxY = 250.f;
constexpr float tileSize = 5.f;
constexpr int nColumns = LayerTilesConstants::ceil((maxX - minX) / tileSize);
constexpr int nRows = LayerTilesConstants::ceil((maxY - minY) / tileSize);
constexpr int maxTileDepth = 40;
constexpr float rX = nColumns / (maxX - minX);
constexpr float rY = nRows / (maxY - minY);
} // namespace LayerTilesConstants
#endif // LayerTilesConstants_h