summaryrefslogtreecommitdiff
path: root/backend/src/libocl/include/ocl_memset.h
diff options
context:
space:
mode:
authorYang Rong <rong.r.yang@intel.com>2015-09-16 16:49:35 +0800
committerYang Rong <rong.r.yang@intel.com>2016-01-26 10:39:33 +0800
commit02fcb7cd3bdf9cf98ddc4ff9f0b24d456c17e348 (patch)
tree243eaba3a0d1dc57b205c198d15f333cc0e31140 /backend/src/libocl/include/ocl_memset.h
parent255361be644191772c7630faf8452f472108279b (diff)
downloadbeignet-02fcb7cd3bdf9cf98ddc4ff9f0b24d456c17e348.tar.gz
GBE: use opencl c to implement llvm.memset and llvm.memcpy.
llvm 3.7 change to llvm IR, need two copies if still use the llvm IR to implement llvm.memset and llvm.memcpy. And opencl c is more clearly. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com> Reviewed-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'backend/src/libocl/include/ocl_memset.h')
-rw-r--r--backend/src/libocl/include/ocl_memset.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/backend/src/libocl/include/ocl_memset.h b/backend/src/libocl/include/ocl_memset.h
new file mode 100644
index 00000000..2d444ad9
--- /dev/null
+++ b/backend/src/libocl/include/ocl_memset.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright © 2012 - 2014 Intel Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+#ifndef __OCL_MEMSET_H__
+#define __OCL_MEMSET_H__
+#include "ocl_types.h"
+
+/////////////////////////////////////////////////////////////////////////////
+// memcopy functions
+/////////////////////////////////////////////////////////////////////////////
+void __gen_memset_g_align(__global uchar* dst, uchar val, size_t size);
+void __gen_memset_p_align(__private uchar* dst, uchar val, size_t size);
+void __gen_memset_l_align(__local uchar* dst, uchar val, size_t size);
+
+void __gen_memset_g(__global uchar* dst, uchar val, size_t size);
+void __gen_memset_p(__private uchar* dst, uchar val, size_t size);
+void __gen_memset_l(__local uchar* dst, uchar val, size_t size);
+
+#endif /* __OCL_MEMSET_H__ */