1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ #include < stddef.h>
16+
1517#include < algorithm>
18+ #include < array>
19+ #include < cassert>
20+ #include < cstring>
1621#include < iostream>
22+ #include < utility>
1723
1824#include " absl/functional/function_ref.h"
1925#include " tensorstore/array.h"
26+ #include " tensorstore/box.h"
27+ #include " tensorstore/contiguous_layout.h"
28+ #include " tensorstore/data_type.h"
2029#include " tensorstore/index.h"
21- #include " tensorstore/index_space/dim_expression.h"
22- #include " tensorstore/index_space/transformed_array.h"
2330#include " tensorstore/util/iterate_over_index_range.h"
24- #include " tensorstore/util/status .h"
31+ #include " tensorstore/util/span .h"
2532
2633using ::tensorstore::Index;
2734
@@ -34,7 +41,7 @@ tensorstore::SharedArray<int, 2> ApplyKernel(
3441 const tensorstore::ArrayView<const int , 2 > in,
3542 const tensorstore::ArrayView<const double , 2 > kernel) {
3643 // Compute bounds for the offset.
37- // FIXME: It's akward that we cannot do this:
44+ // FIXME: It's awkward that we cannot do this:
3845 // std::array<Index, 2> k(kernel.shape());
3946 //
4047 std::array<Index, 2 > k;
@@ -80,7 +87,7 @@ tensorstore::SharedArray<int, 2> ApplyKernel(
8087 }
8188 });
8289
83- // Again, the most intutive way to write an array value
90+ // Again, the most intuitive way to write an array value
8491 // is not permitted:
8592 //
8693 // dest[indices] = (sum / count); // error: no viable overloaded '='
@@ -154,7 +161,7 @@ void AffineWarpGrid(size_t xmax, size_t ymax,
154161}
155162
156163// AffineWarpInverseGrid computes the inverse mapping from AffineWarpGrid,
157- // so it can be used to map from a destination image to a souce image.
164+ // so it can be used to map from a destination image to a source image.
158165void AffineWarpInverseGrid (size_t xmax, size_t ymax,
159166 tensorstore::span<const double , 6 > M,
160167 AffineWarpGridFunction fn) {
@@ -237,7 +244,7 @@ void PrintCSVArray(tensorstore::ArrayView<T, N> data) {
237244 // reference for every element.
238245 //
239246 // There is a streaming operator already, but the output is
240- // this is equvalent to:
247+ // this is equivalent to:
241248 // for (int x = 0; x < data.shape()[0]; x++)
242249 // for (int y = 0; y < data.shape()[1]; y++) {
243250 // ... body ...
0 commit comments