From bab29936a1cf0a68ffe4ccb1fd9b4807a3ec87ae Mon Sep 17 00:00:00 2001 From: Mehdi Goli Date: Wed, 1 Feb 2017 15:29:53 +0000 Subject: Reducing warnings in Sycl backend. --- unsupported/test/cxx11_tensor_convolution_sycl.cpp | 84 +++++++++++----------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'unsupported/test/cxx11_tensor_convolution_sycl.cpp') diff --git a/unsupported/test/cxx11_tensor_convolution_sycl.cpp b/unsupported/test/cxx11_tensor_convolution_sycl.cpp index f7e0a2742..a4226a63a 100644 --- a/unsupported/test/cxx11_tensor_convolution_sycl.cpp +++ b/unsupported/test/cxx11_tensor_convolution_sycl.cpp @@ -14,7 +14,7 @@ #define EIGEN_TEST_NO_LONGDOUBLE #define EIGEN_TEST_NO_COMPLEX #define EIGEN_TEST_FUNC cxx11_tensor_convolution_sycl -#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int +#define EIGEN_DEFAULT_DENSE_INDEX_TYPE int64_t #define EIGEN_USE_SYCL #include @@ -35,12 +35,12 @@ static const float error_threshold =1e-4f; template static void test_larg_expr1D(const Eigen::SyclDevice& sycl_device) { - int indim0 =53; - int indim1= 55; - int indim2= 51; - int outdim0=50; - int outdim1=55; - int outdim2=51; + IndexType indim0 =53; + IndexType indim1= 55; + IndexType indim2= 51; + IndexType outdim0=50; + IndexType outdim1=55; + IndexType outdim2=51; Eigen::array input_dims = {{indim0, indim1, indim2}}; Eigen::array kernel_dims = {{4}}; Eigen::array result_dims = {{outdim0, outdim1, outdim2}}; @@ -76,9 +76,9 @@ static void test_larg_expr1D(const Eigen::SyclDevice& sycl_device) result_host=input.convolve(kernel, dims3); -for(int i=0; i< outdim0; i++ ){ - for(int j=0; j< outdim1; j++ ){ - for(int k=0; k< outdim2; k++ ){ +for(IndexType i=0; i< outdim0; i++ ){ + for(IndexType j=0; j< outdim1; j++ ){ + for(IndexType k=0; k< outdim2; k++ ){ if (!(Eigen::internal::isApprox(result(i,j,k), result_host(i,j,k), error_threshold))) { std::cout < static void test_larg_expr2D(const Eigen::SyclDevice& sycl_device) { - int indim0 =53; - int indim1= 55; - int indim2= 51; - int outdim0=50; - int outdim1=51; - int outdim2=51; + IndexType indim0 =53; + IndexType indim1= 55; + IndexType indim2= 51; + IndexType outdim0=50; + IndexType outdim1=51; + IndexType outdim2=51; Eigen::array input_dims = {{indim0, indim1, indim2}}; Eigen::array kernel_dims = {{4,5}}; Eigen::array result_dims = {{outdim0, outdim1, outdim2}}; @@ -137,9 +137,9 @@ static void test_larg_expr2D(const Eigen::SyclDevice& sycl_device) result_host=input.convolve(kernel, dims3); -for(int i=0; i< outdim0; i++ ){ - for(int j=0; j< outdim1; j++ ){ - for(int k=0; k< outdim2; k++ ){ +for(IndexType i=0; i< outdim0; i++ ){ + for(IndexType j=0; j< outdim1; j++ ){ + for(IndexType k=0; k< outdim2; k++ ){ if (!(Eigen::internal::isApprox(result(i,j,k), result_host(i,j,k), error_threshold))) { std::cout < static void test_larg_expr3D(const Eigen::SyclDevice& sycl_device) { - int indim0 =53; - int indim1= 55; - int indim2= 51; - int outdim0=50; - int outdim1=51; - int outdim2=49; + IndexType indim0 =53; + IndexType indim1= 55; + IndexType indim2= 51; + IndexType outdim0=50; + IndexType outdim1=51; + IndexType outdim2=49; Eigen::array input_dims = {{indim0, indim1, indim2}}; Eigen::array kernel_dims = {{4,5,3}}; Eigen::array result_dims = {{outdim0, outdim1, outdim2}}; @@ -198,9 +198,9 @@ static void test_larg_expr3D(const Eigen::SyclDevice& sycl_device) result_host=input.convolve(kernel, dims3); -for(int i=0; i< outdim0; i++ ){ - for(int j=0; j< outdim1; j++ ){ - for(int k=0; k< outdim2; k++ ){ +for(IndexType i=0; i< outdim0; i++ ){ + for(IndexType j=0; j< outdim1; j++ ){ + for(IndexType k=0; k< outdim2; k++ ){ if (!(Eigen::internal::isApprox(result(i,j,k), result_host(i,j,k), error_threshold))) { std::cout < void tensorConvolutionPerDevice(Dev_selector& s){ QueueInterface queueInterface(s); auto sycl_device=Eigen::SyclDevice(&queueInterface); - test_larg_expr1D(sycl_device); - test_larg_expr1D(sycl_device); - test_larg_expr2D(sycl_device); - test_larg_expr2D(sycl_device); - test_larg_expr3D(sycl_device); - test_larg_expr3D(sycl_device); - test_evals(sycl_device); - test_evals(sycl_device); - test_expr(sycl_device); - test_expr(sycl_device); - test_modes(sycl_device); - test_modes(sycl_device); - test_strides(sycl_device); - test_strides(sycl_device); + test_larg_expr1D(sycl_device); + test_larg_expr1D(sycl_device); + test_larg_expr2D(sycl_device); + test_larg_expr2D(sycl_device); + test_larg_expr3D(sycl_device); + test_larg_expr3D(sycl_device); + test_evals(sycl_device); + test_evals(sycl_device); + test_expr(sycl_device); + test_expr(sycl_device); + test_modes(sycl_device); + test_modes(sycl_device); + test_strides(sycl_device); + test_strides(sycl_device); } void test_cxx11_tensor_convolution_sycl() { -- cgit v1.2.3