Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandra <[email protected]>
  • Loading branch information
akukanov and aepanchi authored Nov 28, 2024
1 parent 368859a commit 0534363
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ equivalent, even on a single processor.

Also, ``blocked_range2d`` allows to use different value types across
its first dimension (called "rows") and the second one ("columns").
That allows combining indexes, pointers, and iterators into a joint
That means you can combine indexes, pointers, and iterators into a joint
iteration space. The method functions ``rows()`` and ``cols()`` return
corresponding dimensions in the form of a ``blocked_range``.

Expand All @@ -90,7 +90,7 @@ constructor takes N instances of ``blocked_range<T>``, not individual boundary
values. To indicate the distinctions, the different naming pattern was chosen.


An Example of a Multidimensional Iteration Space
Example of a Multidimensional Iteration Space
------------------------------------------------

The example demonstrates calculation of a 3-dimensional filter over the pack
Expand Down
4 changes: 2 additions & 2 deletions doc/main/tbb_userguide/snippets/blocked_nd_range_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ int main() {
std::vector<std::vector<std::vector<float>>> feature_maps(feature_maps_length, std::vector<std::vector<float>>(feature_maps_width, std::vector<float>(feature_maps_heigth, 1.0f)));
std::vector<std::vector<std::vector<float>>> out(out_length, std::vector<std::vector<float>>(out_width, std::vector<float>(out_heigth, 0.f)));

// 3D convolution calculates sum of all elements in kernel
// 3D convolution calculates the sum of all elements in the kernel
convolution3d(feature_maps, out,
out_length, out_width, out_heigth,
kernel_length, kernel_width, kernel_height);

// Checks correctness of convolution by equality to expected sum of elements
// Checks correctness of convolution by equality to the expected sum of elements
float expected = float(kernel_length * kernel_height * kernel_width);
for (auto i : out) {
for (auto j : i) {
Expand Down

0 comments on commit 0534363

Please sign in to comment.