Skip to content

Commit

Permalink
chore: clean up concept definitions (PROOF-913) (#186)
Browse files Browse the repository at this point in the history
clean up concepts
  • Loading branch information
rnburn authored Oct 17, 2024
1 parent 92709db commit c3abd69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sxt/algorithm/base/mapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace sxt::algb {
* Mapper turns an index into a value.
*/
template <class M>
concept mapper = requires(M m, typename M::value_type& x, unsigned int i, void* data) {
concept mapper = requires(M m, typename M::value_type& x, unsigned int i) {
{ m.map_index(i) } noexcept -> std::convertible_to<typename M::value_type>;
{ m.map_index(x, i) } noexcept;
};
Expand Down
6 changes: 2 additions & 4 deletions sxt/algorithm/base/reducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ namespace sxt::algb {
* See https://developer.download.nvidia.com/assets/cuda/files/reduction.pdf
*/
template <class R>
concept reducer = requires(typename R::value_type& x, typename R::value_type& xv,
typename R::value_type& yv, typename R::value_type& z) {
{ R::accumulate_inplace(x, z) } noexcept;
{ R::accumulate_inplace(xv, yv) } noexcept;
concept reducer = requires(typename R::value_type& x) {
{ R::accumulate_inplace(x, x) } noexcept;
};
} // namespace sxt::algb

0 comments on commit c3abd69

Please sign in to comment.