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/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h index 9858d0560..e209799bb 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h @@ -194,7 +194,7 @@ struct SyclDevice { auto s= sycl_queue().get_device().template get_info(); std::transform(s.begin(), s.end(), s.begin(), ::tolower); if(sycl_queue().get_device().is_cpu()){ // intel doesnot allow to use max workgroup size - tileSize=std::min(static_cast(256), static_cast(tileSize)); + tileSize=std::min(static_cast(256), static_cast(tileSize)); } rng = n; if (rng==0) rng=static_cast(1); @@ -211,10 +211,10 @@ struct SyclDevice { EIGEN_STRONG_INLINE void parallel_for_setup(Index dim0, Index dim1, Index &tileSize0, Index &tileSize1, Index &rng0, Index &rng1, Index &GRange0, Index &GRange1) const { Index max_workgroup_Size = static_cast(maxSyclThreadsPerBlock()); if(sycl_queue().get_device().is_cpu()){ // intel doesnot allow to use max workgroup size - max_workgroup_Size=std::min(static_cast(256), static_cast(max_workgroup_Size)); + max_workgroup_Size=std::min(static_cast(256), static_cast(max_workgroup_Size)); } - size_t pow_of_2 = static_cast(std::log2(max_workgroup_Size)); - tileSize1 =static_cast(std::pow(2, static_cast(pow_of_2/2))); + Index pow_of_2 = static_cast(std::log2(max_workgroup_Size)); + tileSize1 =static_cast(std::pow(2, static_cast(pow_of_2/2))); rng1=dim1; if (rng1==0 ) rng1=static_cast(1); GRange1=rng1; @@ -241,10 +241,10 @@ struct SyclDevice { EIGEN_STRONG_INLINE void parallel_for_setup(Index dim0, Index dim1,Index dim2, Index &tileSize0, Index &tileSize1, Index &tileSize2, Index &rng0, Index &rng1, Index &rng2, Index &GRange0, Index &GRange1, Index &GRange2) const { Index max_workgroup_Size = static_cast(maxSyclThreadsPerBlock()); if(sycl_queue().get_device().is_cpu()){ // intel doesnot allow to use max workgroup size - max_workgroup_Size=std::min(static_cast(256), static_cast(max_workgroup_Size)); + max_workgroup_Size=std::min(static_cast(256), static_cast(max_workgroup_Size)); } - size_t pow_of_2 = static_cast(std::log2(max_workgroup_Size)); - tileSize2 =static_cast(std::pow(2, static_cast(pow_of_2/3))); + Index pow_of_2 = static_cast(std::log2(max_workgroup_Size)); + tileSize2 =static_cast(std::pow(2, static_cast(pow_of_2/3))); rng2=dim2; if (rng2==0 ) rng1=static_cast(1); GRange2=rng2; @@ -253,8 +253,8 @@ struct SyclDevice { Index xMode = static_cast(GRange2 % tileSize2); if (xMode != 0) GRange2 += static_cast(tileSize2 - xMode); } - pow_of_2 = static_cast(std::log2(static_cast(max_workgroup_Size/tileSize2))); - tileSize1 =static_cast(std::pow(2, static_cast(pow_of_2/2))); + pow_of_2 = static_cast(std::log2(static_cast(max_workgroup_Size/tileSize2))); + tileSize1 =static_cast(std::pow(2, static_cast(pow_of_2/2))); rng1=dim1; if (rng1==0 ) rng1=static_cast(1); GRange1=rng1; -- cgit v1.2.3