summaryrefslogtreecommitdiff
path: root/utests/compiler_insert_vector.cpp
diff options
context:
space:
mode:
authorYang Rong <rong.r.yang@intel.com>2013-10-17 13:36:56 +0800
committerZhigang Gong <zhigang.gong@intel.com>2013-10-18 12:18:01 +0800
commit35acb203ee7c6c02c12cf2ceb1a44bbc5185831c (patch)
tree1e11ac53036158edac357acb414d2410308217e3 /utests/compiler_insert_vector.cpp
parent46243e399950a0f0970aa28c4e2fcffb5f00dabb (diff)
downloadbeignet-35acb203ee7c6c02c12cf2ceb1a44bbc5185831c.tar.gz
Add test case for newValueProxy of InsertElementInst.
Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests/compiler_insert_vector.cpp')
-rw-r--r--utests/compiler_insert_vector.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/utests/compiler_insert_vector.cpp b/utests/compiler_insert_vector.cpp
new file mode 100644
index 00000000..c7c239f0
--- /dev/null
+++ b/utests/compiler_insert_vector.cpp
@@ -0,0 +1,18 @@
+#include "utest_helper.hpp"
+
+void compiler_insert_vector(void)
+{
+ const size_t n = 2048;
+
+ // Setup kernel and buffers
+ OCL_CREATE_KERNEL("compiler_insert_vector");
+ OCL_CREATE_BUFFER(buf[0], 0, n * sizeof(int) * 4, NULL);
+ OCL_SET_ARG(0, sizeof(cl_mem), &buf[0]);
+
+ // Run the kernel
+ globals[0] = n;
+ locals[0] = 16;
+ OCL_NDRANGE(1);
+}
+
+MAKE_UTEST_FROM_FUNCTION(compiler_insert_vector);