Skip to content

Commit 46efa7d

Browse files
committed
towards runtime dispatch simd
1 parent 984af81 commit 46efa7d

9 files changed

Lines changed: 784 additions & 8 deletions

File tree

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
//sourcehash: ce302067abb6f30acad244b62728a258931821ed6b91e4aeef70f90f69bf3a78
2+
3+
/*
4+
This file contains docstrings for use in the Python bindings.
5+
Do not edit! They were automatically extracted by pybind11_mkdoc.
6+
7+
This is a modified version which allows for more than 8 arguments and includes def-guard
8+
*/
9+
10+
#pragma once
11+
12+
#ifndef __DOCSTRINGS_HPP__
13+
#define __DOCSTRINGS_HPP__
14+
15+
#define MKD_EXPAND(x) x
16+
#define MKD_COUNT(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, COUNT, ...) COUNT
17+
#define MKD_VA_SIZE(...) MKD_EXPAND(MKD_COUNT(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))
18+
#define MKD_CAT1(a, b) a ## b
19+
#define MKD_CAT2(a, b) MKD_CAT1(a, b)
20+
#define MKD_DOC1(n1) mkd_doc_##n1
21+
#define MKD_DOC2(n1, n2) mkd_doc_##n1##_##n2
22+
#define MKD_DOC3(n1, n2, n3) mkd_doc_##n1##_##n2##_##n3
23+
#define MKD_DOC4(n1, n2, n3, n4) mkd_doc_##n1##_##n2##_##n3##_##n4
24+
#define MKD_DOC5(n1, n2, n3, n4, n5) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5
25+
#define MKD_DOC6(n1, n2, n3, n4, n5, n6) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6
26+
#define MKD_DOC7(n1, n2, n3, n4, n5, n6, n7) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7
27+
#define MKD_DOC8(n1, n2, n3, n4, n5, n6, n7, n8) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7##_##n8
28+
#define MKD_DOC9(n1, n2, n3, n4, n5, n6, n7, n8, n9) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7##_##n8##_##n9
29+
#define MKD_DOC10(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7##_##n8##_##n9##_##n10
30+
#define DOC(...) MKD_EXPAND(MKD_EXPAND(MKD_CAT2(MKD_DOC, MKD_VA_SIZE(__VA_ARGS__)))(__VA_ARGS__))
31+
32+
#if defined(__GNUG__)
33+
#pragma GCC diagnostic push
34+
#pragma GCC diagnostic ignored "-Wunused-variable"
35+
#endif
36+
37+
#endif // __DOCSTRINGS_HPP__
38+
#if defined(__GNUG__)
39+
#pragma GCC diagnostic push
40+
#pragma GCC diagnostic ignored "-Wunused-variable"
41+
#endif
42+
43+
44+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D =
45+
R"doc(A 1D affine transform per beam: value = offset + slope * sample_nr
46+
47+
Stores one offset and one slope per beam in contiguous arrays (SoA
48+
layout), enabling SIMD vectorization across beams.)doc";
49+
50+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_BeamAffine1D = R"doc(Construct an empty BeamAffine1D)doc";
51+
52+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_BeamAffine1D_2 =
53+
R"doc(Construct a BeamAffine1D for a given number of beams (uninitialized
54+
values)
55+
56+
Args:
57+
n_beams: number of beams)doc";
58+
59+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_BeamAffine1D_3 =
60+
R"doc(Construct a BeamAffine1D from existing offsets and slopes
61+
62+
Args:
63+
offsets_: base value per beam [n_beams]
64+
slopes_: slope per beam [n_beams])doc";
65+
66+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_forward =
67+
R"doc(Compute value = offset + slope * sample_nr for a single beam
68+
69+
Args:
70+
beam_index: beam index
71+
sample_nr: sample number (float for sub-sample interpolation)
72+
73+
Returns:
74+
float)doc";
75+
76+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_from_base_and_endpoints =
77+
R"doc(Create a BeamAffine1D from a base value and per-beam end values at
78+
known sample numbers.
79+
80+
slope = (end_values - base_value) / end_sample_numbers offset =
81+
base_value (for all beams)
82+
83+
Args:
84+
base_value: scalar base value (at sample 0)
85+
end_values: per-beam values at the end sample [n_beams]
86+
end_sample_numbers: per-beam sample number of the end values
87+
[n_beams]
88+
89+
Returns:
90+
BeamAffine1D)doc";
91+
92+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_from_stream = R"doc()doc";
93+
94+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_inverse =
95+
R"doc(Compute sample_nr = (value - offset) / slope for a single beam
96+
97+
Args:
98+
beam_index: beam index
99+
value: the value to invert
100+
101+
Returns:
102+
float sample number)doc";
103+
104+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_offsets = R"doc([n_beams] base value per beam)doc";
105+
106+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_operator_eq = R"doc()doc";
107+
108+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_printer = R"doc()doc";
109+
110+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_size = R"doc()doc";
111+
112+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_slopes = R"doc([n_beams] slope (change per sample) per beam)doc";
113+
114+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamAffine1D_to_stream = R"doc()doc";
115+
116+
#if defined(__GNUG__)
117+
#pragma GCC diagnostic pop
118+
#endif
119+
120+
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
//sourcehash: 77dda45bf30262a5a4ddcdff1f4da8c897d110e1be805b08a3a7cf9accaff066
2+
3+
/*
4+
This file contains docstrings for use in the Python bindings.
5+
Do not edit! They were automatically extracted by pybind11_mkdoc.
6+
7+
This is a modified version which allows for more than 8 arguments and includes def-guard
8+
*/
9+
10+
#pragma once
11+
12+
#ifndef __DOCSTRINGS_HPP__
13+
#define __DOCSTRINGS_HPP__
14+
15+
#define MKD_EXPAND(x) x
16+
#define MKD_COUNT(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, COUNT, ...) COUNT
17+
#define MKD_VA_SIZE(...) MKD_EXPAND(MKD_COUNT(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))
18+
#define MKD_CAT1(a, b) a ## b
19+
#define MKD_CAT2(a, b) MKD_CAT1(a, b)
20+
#define MKD_DOC1(n1) mkd_doc_##n1
21+
#define MKD_DOC2(n1, n2) mkd_doc_##n1##_##n2
22+
#define MKD_DOC3(n1, n2, n3) mkd_doc_##n1##_##n2##_##n3
23+
#define MKD_DOC4(n1, n2, n3, n4) mkd_doc_##n1##_##n2##_##n3##_##n4
24+
#define MKD_DOC5(n1, n2, n3, n4, n5) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5
25+
#define MKD_DOC6(n1, n2, n3, n4, n5, n6) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6
26+
#define MKD_DOC7(n1, n2, n3, n4, n5, n6, n7) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7
27+
#define MKD_DOC8(n1, n2, n3, n4, n5, n6, n7, n8) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7##_##n8
28+
#define MKD_DOC9(n1, n2, n3, n4, n5, n6, n7, n8, n9) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7##_##n8##_##n9
29+
#define MKD_DOC10(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10) mkd_doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7##_##n8##_##n9##_##n10
30+
#define DOC(...) MKD_EXPAND(MKD_EXPAND(MKD_CAT2(MKD_DOC, MKD_VA_SIZE(__VA_ARGS__)))(__VA_ARGS__))
31+
32+
#if defined(__GNUG__)
33+
#pragma GCC diagnostic push
34+
#pragma GCC diagnostic ignored "-Wunused-variable"
35+
#endif
36+
37+
#endif // __DOCSTRINGS_HPP__
38+
#if defined(__GNUG__)
39+
#pragma GCC diagnostic push
40+
#pragma GCC diagnostic ignored "-Wunused-variable"
41+
#endif
42+
43+
44+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry =
45+
R"doc(Stores per-ping beam/sample geometry as linear affines.
46+
47+
Each optional affine maps sample_nr → a coordinate (x, y, or z) per
48+
beam:
49+
coord[beam] = affine.offsets[beam] + affine.slopes[beam] * sample_nr
50+
51+
The user can set only the affines they need (e.g. z-only for depth
52+
images). Transformation functions will throw if the required affine is
53+
not set.)doc";
54+
55+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_BeamSampleGeometry = R"doc(Construct an empty BeamSampleGeometry)doc";
56+
57+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_BeamSampleGeometry_2 =
58+
R"doc(Construct a BeamSampleGeometry with beam metadata only (no affines
59+
set)
60+
61+
Args:
62+
first_sample_numbers: first valid sample number per beam [n_beams]
63+
number_of_samples: number of samples per beam [n_beams])doc";
64+
65+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_affine_x = R"doc(sample_nr → x per beam)doc";
66+
67+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_affine_y = R"doc(sample_nr → y per beam)doc";
68+
69+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_affine_z = R"doc(sample_nr → z per beam)doc";
70+
71+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_check_affine_size = R"doc()doc";
72+
73+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_first_sample_numbers = R"doc([n_beams] first valid sample nr)doc";
74+
75+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_from_bottom_xyz =
76+
R"doc(Create a BeamSampleGeometry from a base XYZ location and per-beam
77+
bottom XYZ locations with their corresponding sample numbers.
78+
79+
Computes affines such that:
80+
coord(sample_nr) = base_coord + (bottom_coord - base_coord) /
81+
bottom_sample_nr *
82+
sample_nr
83+
84+
Args:
85+
base_xyz: base location (single point, e.g. transducer position)
86+
bottom_xyz: per-beam bottom locations [n_beams]
87+
bottom_sample_numbers: per-beam sample number at the bottom
88+
[n_beams]
89+
first_sample_numbers: per-beam first valid sample number [n_beams]
90+
number_of_samples: per-beam number of samples [n_beams]
91+
92+
Returns:
93+
BeamSampleGeometry with x, y, z affines set)doc";
94+
95+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_from_bottom_z =
96+
R"doc(Create a BeamSampleGeometry with z affine only, from a base depth and
97+
per-beam bottom depths at known sample numbers.
98+
99+
Args:
100+
base_z: base depth (e.g. transducer depth)
101+
bottom_depths: per-beam bottom depths [n_beams]
102+
bottom_sample_numbers: per-beam sample number at the bottom
103+
[n_beams]
104+
first_sample_numbers: per-beam first valid sample number [n_beams]
105+
number_of_samples: per-beam number of samples [n_beams]
106+
107+
Returns:
108+
BeamSampleGeometry with z affine set)doc";
109+
110+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_from_stream = R"doc()doc";
111+
112+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_get_first_sample_numbers = R"doc()doc";
113+
114+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_get_last_sample_numbers = R"doc()doc";
115+
116+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_get_n_beams = R"doc()doc";
117+
118+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_get_number_of_samples = R"doc()doc";
119+
120+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_get_x_affine = R"doc()doc";
121+
122+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_get_y_affine = R"doc()doc";
123+
124+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_get_z_affine = R"doc()doc";
125+
126+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_has_x_affine = R"doc()doc";
127+
128+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_has_y_affine = R"doc()doc";
129+
130+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_has_z_affine = R"doc()doc";
131+
132+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_n_beams = R"doc()doc";
133+
134+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_number_of_samples = R"doc([n_beams] number of samples)doc";
135+
136+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_operator_eq = R"doc()doc";
137+
138+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_printer = R"doc()doc";
139+
140+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_set_x_affine = R"doc()doc";
141+
142+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_set_xyz_affines = R"doc()doc";
143+
144+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_set_y_affine = R"doc()doc";
145+
146+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_set_z_affine = R"doc()doc";
147+
148+
static const char *mkd_doc_themachinethatgoesping_algorithms_geoprocessing_datastructures_BeamSampleGeometry_to_stream = R"doc()doc";
149+
150+
#if defined(__GNUG__)
151+
#pragma GCC diagnostic pop
152+
#endif
153+
154+

src/themachinethatgoesping/algorithms/geoprocessing/datastructures/.docstrings/xyz.doc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//sourcehash: 68f1d1fb341efefecff68292add326c2929288dada3e0ae19c64355112665948
1+
//sourcehash: 8bba975580bf534f3e0c5b7bc255d76f67bdcd5f11dd48698bd578a53e7efe86
22

33
/*
44
This file contains docstrings for use in the Python bindings.

0 commit comments

Comments
 (0)