[Beignet] [PATCH] [PATCH]Fix compile error for ICC compiler
Lv Meng
meng.lv at intel.com
Fri Aug 8 01:08:16 PDT 2014
fix the pthread_mutex_t undefine compile error and some undefined error would occur when using math.h in C++ file.for C++ file,it is better using cmath instead off math.h
Signed-off-by: Lv Meng <meng.lv at intel.com>
---
src/cl_mem.h | 1 +
utests/utest_generator.py | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/cl_mem.h b/src/cl_mem.h
index 4477240..57f38f1 100644
--- a/src/cl_mem.h
+++ b/src/cl_mem.h
@@ -25,6 +25,7 @@
#include "CL/cl.h"
#include "cl_khr_icd.h"
#include <assert.h>
+#include <pthread.h>
#ifndef CL_VERSION_1_2
#define CL_MEM_OBJECT_IMAGE1D 0x10F4
diff --git a/utests/utest_generator.py b/utests/utest_generator.py
index 7522001..5da2752 100644
--- a/utests/utest_generator.py
+++ b/utests/utest_generator.py
@@ -135,7 +135,7 @@ which can print more values and information to assist debuging the issue.
#include "utest_helper.hpp"
#include <stdio.h>
-#include <math.h>
+#include <cmath>
#include <algorithm>
#include <string.h>
--
1.8.3.2
More information about the Beignet
mailing list