From 84523e0fc1f504de17f4631eeee053ebc7dbf6cc Mon Sep 17 00:00:00 2001 From: Homer Hsing Date: Thu, 29 Nov 2012 09:41:46 +0800 Subject: [PATCH] test OpenCL 1.1 Vector Data Load/Store Functions --- kernels/compiler_vector_load_store.cl | 13 +++++++++++++ utests/compiler_vector_load_store.cpp | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 kernels/compiler_vector_load_store.cl create mode 100644 utests/compiler_vector_load_store.cpp diff --git a/kernels/compiler_vector_load_store.cl b/kernels/compiler_vector_load_store.cl new file mode 100644 index 0000000..6d0d9b1 --- /dev/null +++ b/kernels/compiler_vector_load_store.cl @@ -0,0 +1,13 @@ +/* test OpenCL 1.1 Vector Data Load/Store Functions (section 6.11.7) */ +kernel void compiler_vector_load_store() { + float p[16], f; + float4 f4; + f4 = vload4(0, p); + vstore4(f4, 0, p); + + half h[16]; + half4 h4; + f = vload_half(0, h); + f4 = vload_half4(0, h); + vstore_half(f, 0, h); +} diff --git a/utests/compiler_vector_load_store.cpp b/utests/compiler_vector_load_store.cpp new file mode 100644 index 0000000..96fcfa9 --- /dev/null +++ b/utests/compiler_vector_load_store.cpp @@ -0,0 +1,10 @@ +#include "utest_helper.hpp" + +void compiler_vector_load_store(void) +{ + OCL_CREATE_KERNEL("compiler_vector_load_store"); +} + +MAKE_UTEST_FROM_FUNCTION(compiler_vector_load_store); + + -- 2.7.4