Skip to content

Commit

Permalink
Update based on review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
matyas-streamhpc committed Jul 18, 2024
1 parent ffc1fe3 commit cbcd2a4
Show file tree
Hide file tree
Showing 37 changed files with 14 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Tutorials/Reduction/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ target_include_directories(Reduction

if(REDUCTION_BUILD_TESTING)
enable_language(CXX) # GTest::GTest depends on Threads::Threads
add_subdirectory(tests)
add_subdirectory(test)
endif()

if(REDUCTION_BUILD_BENCHMARKS)
enable_language(CXX) # benchmark::benchmark depends on Threads::Threads
add_subdirectory(benchmarks)
add_subdirectory(benchmark)
endif()

if(REDUCTION_BUILD_EXAMPLES)
enable_language(CXX) # TBB::tbb depends on Threads::Threads
add_subdirectory(examples)
add_subdirectory(example)
endif()
23 changes: 11 additions & 12 deletions Tutorials/Reduction/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# Reduction Case Study

This repository hosts the sample code used in the HIP documentation.
This repository hosts the sample code used in the

Check failure on line 3 in Tutorials/Reduction/README.md

View workflow job for this annotation

GitHub Actions / Documentation / Markdown

Trailing spaces

Tutorials/Reduction/README.md:3:50 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.28.2/doc/md009.md
[HIP documentation](https://rocm.docs.amd.com/projects/HIP/en/latest/).

## Structure

The code structure follows mostly that of
[rocPRIM](https://github.com/ROCmSoftwarePlatform/rocPRIM), differing in a few
subtle, mostly self-serving ways:
The coding style and the directory structure follow mostly that of
[rocPRIM](https://github.com/ROCm/rocPRIM), differing in a few ways:

- Unbound by the C++14 requirement of rocPRIM dictated by hipCUB and rocThrust,
this repository uses C++20 as the baseline.
- As such, implementation are free to make use of some TMP/constexpr helper
- As such, implementations are free to make use of some TMP/constexpr helper
functions found within [`include/tmp_utils.hpp`](include/tmp_utils.hpp).
- The tests and benchmarks don't initialize resources multiple times, but do so
just once and reuse the same input for tests/benhcmarks of various sizes.
- Neither do tests, nor the benchmarks use prefixes for input initialization.
Instead they both create a function object storing all state which tests
capture by reference.
just once and reuse the same input for tests/benchmarks of various sizes.
- Neither do tests, nor the benchmarks use prefixes for input initialization.
Instead they both create a function object storing all states which tests
capture by reference.
- "Diffing" the various implementations in succession reveals the minor changes
between each version. `v0.hpp` is a simple Parallel STL implementation which
is used for verification and a baseline of performance for comparison.
- The `examples` folder holds the initial implementations of the various
optimization levels of the benchmarks before the repo got split into tests
and benchmarks with some degree of deduplication and common structure.
- The `example` folder holds the initial implementations of the various
optimization levels of the benchmarks.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit cbcd2a4

Please sign in to comment.