forked from computationalgeography/lue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
81 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,4 @@ | ||
# Keep in sync with https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml | ||
# Except for: numpy, python | ||
c_compiler: | ||
- vs2019 # [win and x86_64] | ||
- vs2022 # [win and arm64] | ||
cxx_compiler: | ||
- vs2019 # [win and x86_64] | ||
- vs2022 # [win and arm64] | ||
fmt: | ||
- 10 | ||
hdf5: | ||
- 1.14.3 | ||
libgdal: | ||
- 3.8 | ||
python: | ||
- 3.10 | ||
c_compiler: # [win] | ||
- vs2022 # [win] | ||
cxx_compiler: # [win] | ||
- vs2022 # [win] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,19 @@ | ||
#pragma once | ||
#include "lue/framework/core/define.hpp" | ||
#include <boost/predef.h> | ||
#include <experimental/mdspan> | ||
#include <mdspan/mdspan.hpp> | ||
|
||
|
||
namespace lue { | ||
namespace detail { | ||
|
||
// TODO The code that used mdspan has been ported to a much more recent version, but | ||
// since MSV 2019 can't handle it, we have back-ported the code to the older | ||
// version again. Once we can leave MSVS 2019 behind, we can use the newer | ||
// code again. Currently, we only need MSVS 2019 for building the Conda package. | ||
// Once conda-forge is on MSVS 2022 we can migrate as well. | ||
|
||
// template<Rank rank> | ||
// using DynamicExtents = std::experimental::dextents<Index, rank>; | ||
|
||
|
||
// ----------------------------------------------------------------------------- | ||
template<Rank rank> | ||
class RankToDynamicExtents; | ||
|
||
|
||
template<> | ||
class RankToDynamicExtents<1> | ||
{ | ||
|
||
public: | ||
|
||
using Type = std::experimental::extents<std::experimental::dynamic_extent>; | ||
}; | ||
|
||
|
||
template<> | ||
class RankToDynamicExtents<2> | ||
{ | ||
|
||
public: | ||
|
||
using Type = std::experimental:: | ||
extents<std::experimental::dynamic_extent, std::experimental::dynamic_extent>; | ||
}; | ||
|
||
|
||
template<> | ||
class RankToDynamicExtents<3> | ||
{ | ||
|
||
public: | ||
|
||
using Type = std::experimental::extents< | ||
std::experimental::dynamic_extent, | ||
std::experimental::dynamic_extent, | ||
std::experimental::dynamic_extent>; | ||
}; | ||
|
||
template<Rank rank> | ||
using DynamicExtents = typename RankToDynamicExtents<rank>::Type; | ||
|
||
} // namespace detail | ||
|
||
|
||
// template<typename Element, Rank rank> | ||
// using DynamicSpan = | ||
// std::experimental::mdspan<Element, detail::DynamicExtents<rank>, std::experimental::layout_right>; | ||
template<Rank rank> | ||
using DynamicExtents = Kokkos::dextents<Index, rank>; | ||
|
||
template<typename Element, Rank rank> | ||
using DynamicSpan = std::experimental:: | ||
basic_mdspan<Element, detail::DynamicExtents<rank>, std::experimental::layout_right>; | ||
|
||
// template<typename Element, Rank rank> | ||
// using DynamicSubspan = | ||
// std::experimental::mdspan<Element, detail::DynamicExtents<rank>, std::experimental::layout_stride>; | ||
using DynamicSpan = Kokkos::mdspan<Element, DynamicExtents<rank>, Kokkos::layout_right>; | ||
|
||
template<typename Element, Rank rank> | ||
using DynamicSubspan = std::experimental:: | ||
basic_mdspan<Element, detail::DynamicExtents<rank>, std::experimental::layout_stride<-1, 1>>; | ||
using DynamicSubspan = Kokkos::mdspan<Element, DynamicExtents<rank>, Kokkos::layout_stride>; | ||
|
||
// using std::experimental::submdspan; | ||
|
||
using std::experimental::subspan; | ||
using Kokkos::submdspan; | ||
|
||
} // namespace lue | ||
|
||
|
||
#define submdspan subspan | ||
|
||
|
||
// namespace std::experimental { | ||
// | ||
// using std::experimental::all; | ||
// | ||
// } | ||
|
||
#define full_extent all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.