Skip to content

Comparison typo in index_sequence_scan_impl::get #452

Description

@elfego

Dear Kokkos developers,

I believe I've found a mistake in the template specialization index_sequence_scan_impl<R, FirstVal> within include/experimental/__p0009_bits/extents.hpp.

In the get member function (lines 162 and 166), the current comparison logic seems wrong and inconsistent with the implementation on line 147.

  • Current: Uses r < R or after the static_cast<int64_t> of each variable
  • Expected: I believe the correct comparison should be R < r.

This can be check by

// currently: FirstVal = 8, the cummulative sum before element r = 2 (which is past FirstVal) should be 8
constexpr size_t r = 2;
static_assert((detail::index_sequence_scan_impl<0, 8>::get(r) == 8)); // Fails

Could you please take a look to see if this is indeed a bug or if I am misinterpreting the intended logic?

Best regards,

Elfego

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions