From d43bc11f2dd666d24ec279b86ea8382c949d7aed Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Fri, 19 Apr 2019 10:54:15 -0700 Subject: [PATCH 1/3] Uncomment complex test case --- README.md | 2 +- test/test_jlvectorize.cpp | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b95080e..b4677dd 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ cmake -D JlCxx_DIR=/path/to/.julia/v0.6/CxxWrap/deps/usr/lib/cmake/JlCxx -D BUIL | `xtensor-julia` | `xtensor` | `libcxxwrap` | `julia` | |-----------------|-----------|---------------|----------------| -| master | ^0.20.4 | >=0.5.1,<0.6 | >=1.0.0 | +| master | ^0.20.4 | >=0.5.3,<0.6 | >=1.0.0 | | 0.8.2 | ^0.20.4 | >=0.5.1,<0.6 | >=1.0.0 | | 0.8.1 | ^0.20.4 | >=0.5.1,<0.6 | >=1.0.0 | | 0.8.0 | ^0.20.0 | >=0.5.1,<0.6 | >=1.0.0 | diff --git a/test/test_jlvectorize.cpp b/test/test_jlvectorize.cpp index 8873834..09a25c4 100644 --- a/test/test_jlvectorize.cpp +++ b/test/test_jlvectorize.cpp @@ -43,16 +43,14 @@ namespace xt EXPECT_EQ(a(0, 0) + b(0, 0), c(0, 0)); } -/* TEST(jlvectorize, complex) { using complex_t = std::complex; shape_type shape = { 3, 2 }; jlarray a(shape, complex_t(1.2, 2.5)); - auto f = jlvectorize([](complex_t x) { return std::abs(x); }); - auto res = f(a); + // auto f = jlvectorize([](complex_t x) { return std::abs(x); }); + // auto res = f(a); double exp = std::abs(a(1, 1)); - EXPECT_EQ(exp, res(1, 1)); + // EXPECT_EQ(exp, res(1, 1)); } -*/ } From 7e943bea3f630aad5adb4c9b053e7a42f3bf6dc0 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Mon, 29 Apr 2019 11:03:49 +0200 Subject: [PATCH 2/3] .. --- test/test_jlvectorize.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_jlvectorize.cpp b/test/test_jlvectorize.cpp index 09a25c4..16515d1 100644 --- a/test/test_jlvectorize.cpp +++ b/test/test_jlvectorize.cpp @@ -48,6 +48,7 @@ namespace xt using complex_t = std::complex; shape_type shape = { 3, 2 }; jlarray a(shape, complex_t(1.2, 2.5)); + JL_PUSH(a.wrapped()); // auto f = jlvectorize([](complex_t x) { return std::abs(x); }); // auto res = f(a); double exp = std::abs(a(1, 1)); From 60c66b60fc79bc84b23c592bce5ff1a01cbf3135 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Mon, 29 Apr 2019 11:04:42 +0200 Subject: [PATCH 3/3] .. --- test/test_jlvectorize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_jlvectorize.cpp b/test/test_jlvectorize.cpp index 16515d1..fa8ff55 100644 --- a/test/test_jlvectorize.cpp +++ b/test/test_jlvectorize.cpp @@ -48,7 +48,7 @@ namespace xt using complex_t = std::complex; shape_type shape = { 3, 2 }; jlarray a(shape, complex_t(1.2, 2.5)); - JL_PUSH(a.wrapped()); + JL_GC_PUSH1(a.wrapped()); // auto f = jlvectorize([](complex_t x) { return std::abs(x); }); // auto res = f(a); double exp = std::abs(a(1, 1));