Utest: Porting to GCC6

Submitted by Pan Xiuli on June 13, 2016, 9:43 p.m.

Details

Message ID 1465854212-14921-1-git-send-email-xiuli.pan@intel.com
State New
Headers show
Series "Utest: Porting to GCC6" ( rev: 1 ) in Beignet

Not browsing as part of any series.

Commit Message

Pan Xiuli June 13, 2016, 9:43 p.m.
From: Pan Xiuli <xiuli.pan@intel.com>

Due to the change of GCC 6 headers:
https://gcc.gnu.org/gcc-6/porting_to.html
std::abs now need cmath header.
This patch fix some codes form OCL20 branch.

Signed-off-by: Pan Xiuli <xiuli.pan@intel.com>
---
 utests/compiler_subgroup_reduce.cpp          | 1 +
 utests/compiler_subgroup_scan_exclusive.cpp  | 1 +
 utests/compiler_subgroup_scan_inclusive.cpp  | 1 +
 utests/compiler_workgroup_reduce.cpp         | 1 +
 utests/compiler_workgroup_scan_exclusive.cpp | 1 +
 utests/compiler_workgroup_scan_inclusive.cpp | 1 +
 6 files changed, 6 insertions(+)

Patch hide | download patch | download mbox

diff --git a/utests/compiler_subgroup_reduce.cpp b/utests/compiler_subgroup_reduce.cpp
index 54863f6..1cd8fe4 100644
--- a/utests/compiler_subgroup_reduce.cpp
+++ b/utests/compiler_subgroup_reduce.cpp
@@ -4,6 +4,7 @@ 
 #include <cstdlib>
 #include <iomanip>
 #include <algorithm>
+#include <cmath>
 
 #include "utest_helper.hpp"
 
diff --git a/utests/compiler_subgroup_scan_exclusive.cpp b/utests/compiler_subgroup_scan_exclusive.cpp
index abcec6e..758179e 100644
--- a/utests/compiler_subgroup_scan_exclusive.cpp
+++ b/utests/compiler_subgroup_scan_exclusive.cpp
@@ -4,6 +4,7 @@ 
 #include <cstdlib>
 #include <iomanip>
 #include <algorithm>
+#include <cmath>
 
 #include "utest_helper.hpp"
 
diff --git a/utests/compiler_subgroup_scan_inclusive.cpp b/utests/compiler_subgroup_scan_inclusive.cpp
index 1528f09..013d599 100644
--- a/utests/compiler_subgroup_scan_inclusive.cpp
+++ b/utests/compiler_subgroup_scan_inclusive.cpp
@@ -4,6 +4,7 @@ 
 #include <cstdlib>
 #include <iomanip>
 #include <algorithm>
+#include <cmath>
 
 #include "utest_helper.hpp"
 
diff --git a/utests/compiler_workgroup_reduce.cpp b/utests/compiler_workgroup_reduce.cpp
index 2b5d176..21bcfa2 100644
--- a/utests/compiler_workgroup_reduce.cpp
+++ b/utests/compiler_workgroup_reduce.cpp
@@ -4,6 +4,7 @@ 
 #include <cstdlib>
 #include <iomanip>
 #include <algorithm>
+#include <cmath>
 
 #include "utest_helper.hpp"
 
diff --git a/utests/compiler_workgroup_scan_exclusive.cpp b/utests/compiler_workgroup_scan_exclusive.cpp
index c27a3cb..022e989 100644
--- a/utests/compiler_workgroup_scan_exclusive.cpp
+++ b/utests/compiler_workgroup_scan_exclusive.cpp
@@ -4,6 +4,7 @@ 
 #include <cstdlib>
 #include <iomanip>
 #include <algorithm>
+#include <cmath>
 
 #include "utest_helper.hpp"
 
diff --git a/utests/compiler_workgroup_scan_inclusive.cpp b/utests/compiler_workgroup_scan_inclusive.cpp
index afbbc8e..0f65e21 100644
--- a/utests/compiler_workgroup_scan_inclusive.cpp
+++ b/utests/compiler_workgroup_scan_inclusive.cpp
@@ -4,6 +4,7 @@ 
 #include <cstdlib>
 #include <iomanip>
 #include <algorithm>
+#include <cmath>
 
 #include "utest_helper.hpp"
 

Comments

On 2016.06.14 05:43:32 +0800, Xiuli Pan wrote:
> From: Pan Xiuli <xiuli.pan@intel.com>
> 
> Due to the change of GCC 6 headers:
> https://gcc.gnu.org/gcc-6/porting_to.html
> std::abs now need cmath header.
> This patch fix some codes form OCL20 branch.
> 
> Signed-off-by: Pan Xiuli <xiuli.pan@intel.com>

Acked. I have a same patch to fix current beignet build for me.
Please apply this.

btw, could we seperate utests build? which takes long time when build,
and people might not care? Either with a config option or other environ