Skip to content

Commit 7ffdfda

Browse files
authored
Merge pull request #147 from fbourgin/update_xtensor
Update xtensor
2 parents 81419bf + 68ee027 commit 7ffdfda

File tree

16 files changed

+41
-39
lines changed

16 files changed

+41
-39
lines changed

.github/workflows/linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- {compiler: gcc, version: '12'}
2323
- {compiler: gcc, version: '13'}
2424
- {compiler: gcc, version: '14'}
25-
#- {compiler: clang, version: '19'}
25+
- {compiler: clang, version: '19'}
2626
- {compiler: clang, version: '20'}
2727

2828
steps:
@@ -78,7 +78,7 @@ jobs:
7878
echo "which tar"
7979
which tar
8080
export TAR="/usr/bin/tar"
81-
R -e "library(devtools); install_github('xtensor-stack/Xtensor.R', configure.args = '--novendor')"
81+
R -e "library(devtools); install_github('fbourgin/Xtensor.R', ref = 'update_xtensor', configure.args = '--novendor')"
8282
8383
- name: print R HOME
8484
run: |
@@ -96,7 +96,7 @@ jobs:
9696
if [[ "${{matrix.sys.compiler}}" = "gcc" ]]; then export CC=gcc-${{matrix.sys.version}}; export CXX=g++-${{matrix.sys.version}}; else export CC=clang; export CXX=clang++; fi
9797
mkdir ~/.R
9898
touch ~/.R/Makevars
99-
echo "CXX14=$CXX" >> ~/.R/Makevars
100-
echo "CXX14FLAGS=-fPIC -O2" >> ~/.R/Makevars
99+
echo "CXX17=$CXX" >> ~/.R/Makevars
100+
echo "CXX17FLAGS=-fPIC -O2" >> ~/.R/Makevars
101101
Rscript ./unittest.R
102102

.github/workflows/osx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
echo "which tar"
5252
which tar
5353
export TAR="/usr/bin/tar"
54-
R -e "library(devtools); install_github('xtensor-stack/Xtensor.R', configure.args = '--novendor')"
54+
R -e "library(devtools); install_github('fbourgin/Xtensor.R', ref = 'update_xtensor', configure.args = '--novendor')"
5555
5656
- name: print R HOME
5757
run: |

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ set(XTENSOR_R_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
1616
# Versionning
1717
# ===========
1818

19-
set(XTENSOR_REQUIRED_VERSION 0.25.0)
20-
set(XTL_REQUIRED_VERSION 0.7.7)
19+
set(XTENSOR_REQUIRED_VERSION 0.26.0)
20+
set(XTL_REQUIRED_VERSION 0.8.0)
2121

2222
set(XTENSOR_R_CONFIG_FILE
2323
"${XTENSOR_R_INCLUDE_DIR}/xtensor-r/xtensor_r_config.hpp")
@@ -57,6 +57,8 @@ add_library(xtensor-r INTERFACE)
5757
target_include_directories(xtensor-r INTERFACE $<BUILD_INTERFACE:${XTENSOR_R_INCLUDE_DIR}>
5858
$<INSTALL_INTERFACE:include>)
5959

60+
target_compile_features(xtensor-r INTERFACE cxx_std_17)
61+
6062
target_link_libraries(xtensor-r INTERFACE xtensor)
6163
get_target_property(inc_dir xtensor-r INTERFACE_INCLUDE_DIRECTORIES)
6264
message(STATUS "${inc_dir}")

environment-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
dependencies:
55
- cmake
6-
- xtensor=0.25.0
6+
- xtensor=0.26.0
77
- r-base
88
- r-rcpp
99
# test dependencies

include/xtensor-r/rarray.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
#include <utility>
1616
#include <vector>
1717

18-
#include "xtensor/xbuffer_adaptor.hpp"
19-
#include "xtensor/xcontainer.hpp"
20-
#include "xtensor/xiterator.hpp"
21-
#include "xtensor/xsemantic.hpp"
22-
#include "xtensor/xutils.hpp"
18+
#include "xtensor/containers/xbuffer_adaptor.hpp"
19+
#include "xtensor/containers/xcontainer.hpp"
20+
#include "xtensor/core/xiterator.hpp"
21+
#include "xtensor/core/xsemantic.hpp"
22+
#include "xtensor/utils/xutils.hpp"
2323

2424
#include "xtensor-r/rcontainer.hpp"
2525

include/xtensor-r/rcontainer.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#include <functional>
1515
#include <numeric>
1616

17-
#include "xtensor/xbuffer_adaptor.hpp"
18-
#include "xtensor/xcontainer.hpp"
17+
#include "xtensor/containers/xbuffer_adaptor.hpp"
18+
#include "xtensor/containers/xcontainer.hpp"
1919

2020
#include "xtl/xsequence.hpp"
2121

@@ -142,7 +142,7 @@ namespace xt
142142
using difference_type = typename storage_type::difference_type;
143143

144144
#ifndef XTENSOR_R_ALLOW_REINTERPRETATION
145-
static_assert(xtl::disjunction<std::is_same<r_type, int32_t>,
145+
static_assert(std::disjunction<std::is_same<r_type, int32_t>,
146146
std::is_same<r_type, double>,
147147
std::is_same<r_type, Rbyte>,
148148
std::is_same<r_type, rlogical>,

include/xtensor-r/roptional.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
#include <xtl/xoptional.hpp>
1818

19-
#include <xtensor/xoptional_assembly.hpp>
20-
#include <xtensor/xfunctor_view.hpp>
19+
#include <xtensor/optional/xoptional_assembly.hpp>
20+
#include <xtensor/views/xfunctor_view.hpp>
2121

2222
#include "rarray.hpp"
2323
#include "rtensor.hpp"

include/xtensor-r/rtensor.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#include <array>
1515
#include <cstddef>
1616

17-
#include "xtensor/xbuffer_adaptor.hpp"
18-
#include "xtensor/xiterator.hpp"
19-
#include "xtensor/xsemantic.hpp"
20-
#include "xtensor/xutils.hpp"
17+
#include "xtensor/containers/xbuffer_adaptor.hpp"
18+
#include "xtensor/core/xiterator.hpp"
19+
#include "xtensor/core/xsemantic.hpp"
20+
#include "xtensor/utils/xutils.hpp"
2121

2222
#include "rcontainer.hpp"
2323

include/xtensor-r/rvectorize.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <type_traits>
1414

1515
#include "rarray.hpp"
16-
#include "xtensor/xvectorize.hpp"
16+
#include "xtensor/core/xvectorize.hpp"
1717

1818
namespace xt
1919
{

test/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
3333

3434
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel")
3535
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wunused-parameter -Wextra -Wreorder -Wconversion")
36-
CHECK_CXX_COMPILER_FLAG("-std=c++14" HAS_CPP14_FLAG)
36+
CHECK_CXX_COMPILER_FLAG("-std=c++17" HAS_CPP17_FLAG)
3737

38-
if (HAS_CPP14_FLAG)
39-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
38+
if (HAS_CPP17_FLAG)
39+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
4040
else()
41-
message(FATAL_ERROR "Unsupported compiler -- xtensor requires C++14 support!")
41+
message(FATAL_ERROR "Unsupported compiler -- xtensor requires C++17 support!")
4242
endif()
4343
endif()
4444

0 commit comments

Comments
 (0)