Skip to content
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
17 changes: 16 additions & 1 deletion include/fastscapelib/algo/pflood.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,22 @@
#include <limits>
#include <type_traits>

#include "xtensor/xtensor.hpp"
// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xtensor.hpp>
#else
# include <xtensor/containers/xtensor.hpp>
#endif

#include "fastscapelib/utils/utils.hpp"
#include "fastscapelib/utils/consts.hpp"
Expand Down
30 changes: 25 additions & 5 deletions include/fastscapelib/eroders/diffusion_adi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,31 @@
#include <type_traits>
#include <utility>

#include "xtensor/xbroadcast.hpp"
#include "xtensor/xbuilder.hpp"
#include "xtensor/xnoalias.hpp"
#include "xtensor/xview.hpp"
#include "xtensor/xmanipulation.hpp"
// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xbroadcast.hpp>
# include <xtensor/xview.hpp>
# include <xtensor/xbuilder.hpp>
# include <xtensor/xnoalias.hpp>
# include <xtensor/xmanipulation.hpp>
#else
# include <xtensor/views/xbroadcast.hpp>
# include <xtensor/views/xview.hpp>
# include <xtensor/generators/xbuilder.hpp>
# include <xtensor/core/xnoalias.hpp>
# include <xtensor/misc/xmanipulation.hpp>
#endif


#include "fastscapelib/grid/structured_grid.hpp"
#include "fastscapelib/utils/utils.hpp"
Expand Down
26 changes: 22 additions & 4 deletions include/fastscapelib/eroders/spl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,31 @@
#include <limits>
#include <type_traits>

#include "xtensor/xbroadcast.hpp"
#include "xtensor/xtensor.hpp"
#include "xtensor/xmanipulation.hpp"

#include "fastscapelib/utils/utils.hpp"
#include "fastscapelib/utils/containers.hpp"

// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xbroadcast.hpp>
# include <xtensor/xtensor.hpp>
# include <xtensor/xmanipulation.hpp>
#else
# include <xtensor/views/xbroadcast.hpp>
# include <xtensor/containers/xtensor.hpp>
# include <xtensor/misc/xmanipulation.hpp>
#endif



namespace fastscapelib
{
Expand Down
27 changes: 21 additions & 6 deletions include/fastscapelib/flow/flow_graph.hpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
#ifndef FASTSCAPELIB_FLOW_FLOW_GRAPH_HPP
#define FASTSCAPELIB_FLOW_FLOW_GRAPH_HPP

#include "fastscapelib/flow/flow_graph_impl.hpp"
#include "fastscapelib/flow/flow_kernel.hpp"
#include "fastscapelib/flow/flow_operator.hpp"
#include "fastscapelib/utils/thread_pool.hpp"

#include "xtensor/xstrided_view.hpp"
#include <fastscapelib/flow/flow_graph_impl.hpp>
#include <fastscapelib/flow/flow_kernel.hpp>
#include <fastscapelib/flow/flow_operator.hpp>
#include <fastscapelib/utils/thread_pool.hpp>

// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xstrided_view.hpp>
#else
# include <xtensor/views/xstrided_view.hpp>
#endif

#include <map>
#include <memory>
Expand Down
30 changes: 24 additions & 6 deletions include/fastscapelib/flow/flow_graph_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,31 @@
#include <vector>
#include <set>

#include "xtensor/xbroadcast.hpp"
#include "xtensor/xstrided_view.hpp"
#include "xtensor/xview.hpp"

#include "fastscapelib/grid/base.hpp"
#include "fastscapelib/utils/iterators.hpp"
#include "fastscapelib/utils/containers.hpp"
// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xbroadcast.hpp>
# include <xtensor/xstrided_view.hpp>
# include <xtensor/xview.hpp>
#else
# include <xtensor/views/xbroadcast.hpp>
# include <xtensor/views/xstrided_view.hpp>
# include <xtensor/views/xview.hpp>
#endif

#include <fastscapelib/grid/base.hpp>
#include <fastscapelib/utils/iterators.hpp>
#include <fastscapelib/utils/containers.hpp>


namespace fastscapelib
Expand Down
25 changes: 20 additions & 5 deletions include/fastscapelib/flow/impl/flow_graph_inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,26 @@
#include <string>
#include <vector>

#include "fastscapelib/utils/containers.hpp"
#include "xtensor/xstrided_view.hpp"

#include "fastscapelib/flow/flow_graph_impl.hpp"
#include "fastscapelib/flow/flow_operator.hpp"
#include <fastscapelib/utils/containers.hpp>
#include <fastscapelib/flow/flow_graph_impl.hpp>
#include <fastscapelib/flow/flow_operator.hpp>

// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xstrided_view.hpp>
#else
# include <xtensor/views/xstrided_view.hpp>
#endif


namespace fastscapelib
Expand Down
23 changes: 20 additions & 3 deletions include/fastscapelib/grid/base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,26 @@
#include <map>
#include <vector>

#include "xtensor/xadapt.hpp"
#include "xtensor/xtensor.hpp"
#include "xtensor/xview.hpp"
// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xadapt.hpp>
# include <xtensor/xtensor.hpp>
# include <xtensor/xview.hpp>
#else
# include <xtensor/containers/xadapt.hpp>
# include <xtensor/containers/xtensor.hpp>
# include <xtensor/views/xview.hpp>
#endif

#include "fastscapelib/utils/iterators.hpp"
#include "fastscapelib/utils/containers.hpp"
Expand Down
17 changes: 16 additions & 1 deletion include/fastscapelib/grid/profile_grid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,22 @@
#include <map>
#include <vector>

#include <xtensor/xbroadcast.hpp>
// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xbroadcast.hpp>
#else
# include <xtensor/views/xbroadcast.hpp>
#endif

#include "fastscapelib/grid/base.hpp"
#include "fastscapelib/grid/structured_grid.hpp"
Expand Down
20 changes: 18 additions & 2 deletions include/fastscapelib/grid/raster_grid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,24 @@
#include <vector>
#include <utility>

#include <xtensor/xbroadcast.hpp>
#include <xtensor/xtensor.hpp>
// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xbroadcast.hpp>
# include <xtensor/xtensor.hpp>
#else
# include <xtensor/views/xbroadcast.hpp>
# include <xtensor/containers/xtensor.hpp>
#endif

#include "fastscapelib/grid/base.hpp"
#include "fastscapelib/grid/structured_grid.hpp"
Expand Down
36 changes: 29 additions & 7 deletions include/fastscapelib/grid/structured_grid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,35 @@
#include <map>
#include <vector>

#include "xtensor/xbuilder.hpp"
#include "xtensor/xarray.hpp"
#include "xtensor/xfixed.hpp"
#include "xtensor/xtensor.hpp"
#include "xtensor/xview.hpp"
#include "xtensor/xindex_view.hpp"
#include "xtensor/xnoalias.hpp"
// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xindex_view.hpp>
# include <xtensor/xview.hpp>
# include <xtensor/xbuilder.hpp>
# include <xtensor/xarray.hpp>
# include <xtensor/xfixed.hpp>
# include <xtensor/xtensor.hpp>
# include <xtensor/xnoalias.hpp>
#else
# include <xtensor/views/xindex_view.hpp>
# include <xtensor/views/xview.hpp>
# include <xtensor/generators/xbuilder.hpp>
# include <xtensor/containers/xarray.hpp>
# include <xtensor/containers/xfixed.hpp>
# include <xtensor/containers/xtensor.hpp>
# include <xtensor/core/xnoalias.hpp>
#endif


#include "xtl/xiterator_base.hpp"

Expand Down
20 changes: 18 additions & 2 deletions include/fastscapelib/grid/trimesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,24 @@
#include <utility>
#include <vector>

#include "xtensor/xstrided_view.hpp"
#include "xtensor/xhistogram.hpp"
// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xhistogram.hpp>
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/misc/xhistogram.hpp>
# include <xtensor/xstrided_view.hpp>
#else
# include <xtensor/views/xstrided_view.hpp>
#endif

#include "fastscapelib/grid/base.hpp"
#include "fastscapelib/utils/containers.hpp"
Expand Down
17 changes: 16 additions & 1 deletion include/fastscapelib/utils/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,22 @@
#include <cstddef>
#include <type_traits>

#include "xtensor/xcontainer.hpp"
// Include the Xtensor configuration file so that we can query the
// Xtensor version number below to address the fact that between
// 0.25.0 and 0.26.0, all Xtensor include files were moved around,
// see https://github.com/xtensor-stack/xtensor/pull/2829 and the
// complaints therein.
#if __has_include(<xtensor/core/xtensor_config.hpp>) // 0.26.0 and later
# include <xtensor/core/xtensor_config.hpp>
#else // 0.25.0 and earlier
# include <xtensor/xtensor_config.hpp>
#endif

#if XTENSOR_VERSION_MAJOR ==0 && XTENSOR_VERSION_MINOR <= 25
# include <xtensor/xcontainer.hpp>
#else
# include <xtensor/containers/xcontainer.hpp>
#endif


// type used for array indexers
Expand Down
Loading
Loading