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 #814

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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: 0f076223d1b36690323e8410f4a82a7716b84875
13 changes: 5 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ environment:
PATH: c:\projects\win32-vs16-tools\bin;$(PATH);c:\msys64\mingw64\bin
VCPKGDIR: C:\Tools\vcpkg
GENERATOR: "Visual Studio 16 2019"
CMAKE_OPTIONS: "-DCMAKE_TOOLCHAIN_FILE=%VENDOR_DIR%\\vs2019-toolchain.cmake"
#-DCMAKE_VERBOSE_MAKEFILE=ON"
#QTDIR: c:\Qt\5.14.0
#PATH+=c:\Qt\5.14.0\bin
CMAKE_OPTIONS: "-DCMAKE_TOOLCHAIN_FILE=%VENDOR_DIR%\\vs2019-toolchain.cmake -DCMAKE_VERBOSE_MAKEFILE=ON"

matrix:
- BUILD_TYPE: Debug
Expand Down Expand Up @@ -68,10 +65,10 @@ build_script:
# no MPI installed so force scalar builds.
- echo cmake -G "%GENERATOR%" -A x64 %CMAKE_OPTIONS% -DDRACO_C4=%C4_OPTS% %APPVEYOR_BUILD_FOLDER%
- cmake -G "%GENERATOR%" -A x64 %CMAKE_OPTIONS% -DDRACO_C4=%C4_OPTS% %APPVEYOR_BUILD_FOLDER%
- echo cmake --build . --config %BUILD_TYPE% -j %NUMBER_OF_PROCESSORS%
- cmake --build . --config %BUILD_TYPE% -j %NUMBER_OF_PROCESSORS%
- echo ctest -C %BUILD_TYPE% -j 2 --output-on-failure
- ctest -C %BUILD_TYPE% -j %NUMBER_OF_PROCESSORS% --output-on-failure
- echo cmake --build . --config %BUILD_TYPE% -j %NUMBER_OF_PROCESSORS% --target Ut_experimental_tst_mdspan_exe
- cmake --build . --config %BUILD_TYPE% -j %NUMBER_OF_PROCESSORS% --target Ut_experimental_tst_mdspan_exe
# - echo ctest -C %BUILD_TYPE% -j 2 --output-on-failure
# - ctest -C %BUILD_TYPE% -j %NUMBER_OF_PROCESSORS% --output-on-failure

#build:
# verbosity: minimal
Expand Down
4 changes: 4 additions & 0 deletions src/experimental/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
Language: Cpp
DisableFormat: true
...
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

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
Loading