aboutsummaryrefslogtreecommitdiff
path: root/unsupported/test/cxx11_tensor_device_sycl.cpp
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2017-03-08 17:18:33 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-08 17:18:33 +0000
commit6688b8b2600a93ffeb369d4eb439f7b212639f39 (patch)
tree0488797fc544fe977bec6418c73445759f052482 /unsupported/test/cxx11_tensor_device_sycl.cpp
parentd2df80e95c49f43bff1133d61f0f5863d003935b (diff)
parent7de1f32623fe9b8d80455905f4f23b944bcb5e48 (diff)
downloadeigen-6688b8b2600a93ffeb369d4eb439f7b212639f39.tar.gz
Merge "Rebase Eigen to 3.3.3."
am: 7de1f32623 Change-Id: I8a2b86ed74cba8cc0d438beab1914751fa45487c
Diffstat (limited to 'unsupported/test/cxx11_tensor_device_sycl.cpp')
-rw-r--r--unsupported/test/cxx11_tensor_device_sycl.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/unsupported/test/cxx11_tensor_device_sycl.cpp b/unsupported/test/cxx11_tensor_device_sycl.cpp
new file mode 100644
index 000000000..7f79753c5
--- /dev/null
+++ b/unsupported/test/cxx11_tensor_device_sycl.cpp
@@ -0,0 +1,31 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2016
+// Mehdi Goli Codeplay Software Ltd.
+// Ralph Potter Codeplay Software Ltd.
+// Luke Iwanski Codeplay Software Ltd.
+// Contact: <eigen@codeplay.com>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#define EIGEN_TEST_NO_LONGDOUBLE
+#define EIGEN_TEST_NO_COMPLEX
+#define EIGEN_TEST_FUNC cxx11_tensor_device_sycl
+#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int
+#define EIGEN_USE_SYCL
+
+#include "main.h"
+#include <unsupported/Eigen/CXX11/Tensor>
+
+void test_device_sycl(const Eigen::SyclDevice &sycl_device) {
+ std::cout <<"Helo from ComputeCpp: the requested device exists and the device name is : "
+ << sycl_device.m_queue.get_device(). template get_info<cl::sycl::info::device::name>() <<std::endl;;
+}
+void test_cxx11_tensor_device_sycl() {
+ cl::sycl::gpu_selector s;
+ Eigen::SyclDevice sycl_device(s);
+ CALL_SUBTEST(test_device_sycl(sycl_device));
+}