-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'externals/nitro/' changes from b5612a7df..f6179b4e1
f6179b4e1 Merge branch 'main' into cpp17 09f2f458f use $(SolutionDir) to get to externals 19b260009 Merge branch 'main' into cpp17 3de4c5059 latest from CODA-OSS (#605) b5d609a0a need #pragma warning(disable) outside push/pop 185f02f14 Merge commit '5efbb0c81357a6ee4da4209e42668c942cb915da' into cpp17 5efbb0c81 Squashed 'externals/coda-oss/' changes from aba8366d8b..0ed92d85a7 0678478cb latest from CODA-OSS 3afd90921 develop/sync_externals d0d99025d Squashed 'externals/coda-oss/' changes from 1ec9a072c4..aba8366d8b c16779d74 Merge commit 'd0d99025d060792e63273741fab6e4a99700b49a' into cpp17 2f4fef813 latest from CODA-OSS 261f3752f Merge branch 'main' into cpp17 dc3a8ecf0 export more symbols (#604) 22f11f42b build as a DLL in Visual Studio (#603) 8d8184c27 NITRO can now build DLLs (#602) d3f58f038 added environment variable to enable pre-loading of TREs (#601) 4f1a05b23 /guard:cf 85a113021 Merge branch 'main' of https://github.com/mdaus/nitro a1cec9cf6 Merge branch 'main' of https://github.com/mdaus/nitro 6801fa735 Merge branch 'main' of https://github.com/mdaus/nitro eca918471 /guard:cf 5d540334b /guard:cf git-subtree-dir: externals/nitro git-subtree-split: f6179b4e11c0b236b0838ad9bd17c9591194b09a
- Loading branch information
Dan Smith
committed
Dec 1, 2023
1 parent
9188104
commit 1c6328b
Showing
75 changed files
with
781 additions
and
335 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
73 changes: 73 additions & 0 deletions
73
externals/coda-oss/modules/c++/coda_oss/include/coda_oss/mdspan.h
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* ========================================================================= | ||
* This file is part of coda_oss-c++ | ||
* ========================================================================= | ||
* | ||
* (C) Copyright 2004 - 2014, MDA Information Systems LLC | ||
* © Copyright 2023, Maxar Technologies, Inc. | ||
* | ||
* coda_oss-c++ is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this program; If not, | ||
* see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
#pragma once | ||
|
||
#include "coda_oss/CPlusPlus.h" | ||
|
||
// This should always work ... it's in a `details` namespace | ||
#include "coda_oss/mdspan_.h" | ||
|
||
// This logic needs to be here rather than <std/mdspan> so that `coda_oss::mdspan` will | ||
// be the same as `std::mdspan`. | ||
#ifndef CODA_OSS_HAVE_std_mdspan_ | ||
#define CODA_OSS_HAVE_std_mdspan_ 0 // assume no <mdspan> | ||
#endif | ||
#ifndef CODA_OSS_HAVE_experimental_mdspan_ | ||
#define CODA_OSS_HAVE_experimental_mdspan_ 0 // assume no std::experimental::mdspan | ||
#endif | ||
#if CODA_OSS_cpp17 // __has_include | ||
#if __has_include(<mdspan>) // <mdspan> not until C++23 | ||
#include <mdspan> | ||
#undef CODA_OSS_HAVE_std_mdspan_ | ||
#define CODA_OSS_HAVE_std_mdspan_ 1 // provided by the implementation, probably C++23 | ||
#endif | ||
|
||
#if CODA_OSS_cpp20 // Can't even #include this file with older C++14/17 compilers! :-( | ||
// Put this in a __has_include so that it's optional. Our simple implemtnation works | ||
// for our needs, and this brings along a lot of code that our older compilers don't | ||
// like. By the time we need more functionality, maybe we'll be using C++23? | ||
// | ||
// Until then, having this available allows checking our implementation against | ||
// something much more real. https://github.com/kokkos/mdspan | ||
#if __has_include("coda_oss/experimental/mdspan") | ||
#include "coda_oss/experimental/mdspan" | ||
#undef CODA_OSS_HAVE_experimental_mdspan_ | ||
#define CODA_OSS_HAVE_experimental_mdspan_ 1 // provided coda_oss/experimental/mdspan | ||
#endif | ||
#endif | ||
#endif // CODA_OSS_cpp17 | ||
|
||
namespace coda_oss | ||
{ | ||
#if CODA_OSS_HAVE_std_mdspan_ | ||
using std::mdspan; | ||
using std::dextents; | ||
#elif CODA_OSS_HAVE_experimental_mdspan_ | ||
using std::experimental::mdspan; | ||
using std::experimental::dextents; | ||
#else | ||
using details::mdspan; | ||
using details::dextents; | ||
#endif | ||
} | ||
|
Oops, something went wrong.