Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Updated mdspan #801

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ associated software packages may are listed below:

10. experimental/mdspan - https://github.com/kokkos/mdspan
Kokkos v. 2.0, Copyright (2019) Sandia Corporation, BSD-3 License
Git version hash: a7990884f090365787a90cdc12e689822d642c65
Git version hash: c80a398cc84b7a2d982bfaadffd10efeab56a799
19 changes: 12 additions & 7 deletions src/experimental/__p0009_bits/accessor_basic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,22 @@

#include "macros.hpp"

#include <cstddef>
#include <cstddef> // ptrdiff_t
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you process these with clang-format? If so, that is fine. I'm also okay with adding a pragma to tell clang-format to ignore the file. Ref: https://philwrightdev.wordpress.com/2014/10/01/making-clang-format-ignore-sections/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preserving our discussion on mattermost here: clang-format'ing this version of kokkos/mdspan appears to cause compiler errors. So format checking is now disabled for experimental with a .clang-format


namespace std {
namespace experimental {

template <class ElementType> struct accessor_basic {

template <class ElementType>
struct accessor_basic {

using offset_policy = accessor_basic;
using element_type = ElementType;
using reference = ElementType &;
using pointer = ElementType *;
using reference = ElementType&;
using pointer = ElementType*;

MDSPAN_INLINE_FUNCTION
constexpr pointer offset(pointer p, ptrdiff_t i) const noexcept {
constexpr pointer
offset(pointer p, ptrdiff_t i) const noexcept {
return p + i;
}

Expand All @@ -68,7 +70,10 @@ template <class ElementType> struct accessor_basic {
}

MDSPAN_INLINE_FUNCTION
constexpr pointer decay(pointer p) const noexcept { return p; }
constexpr pointer decay(pointer p) const noexcept {
return p;
}

};

} // end namespace experimental
Expand Down
4 changes: 2 additions & 2 deletions src/experimental/__p0009_bits/all_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
namespace std {
namespace experimental {

struct all_type {};
struct all_type { };

_MDSPAN_INLINE_VARIABLE constexpr auto all = all_type{};
_MDSPAN_INLINE_VARIABLE constexpr auto all = all_type{ };

} // end namespace experimental
} // namespace std
165 changes: 0 additions & 165 deletions src/experimental/__p0009_bits/array_workaround.hpp

This file was deleted.

Loading