[cfe-users] Clang and OpenCL
Vincent Mirian
vincekoskesh at hotmail.com
Tue Oct 1 20:39:55 PDT 2013
Hi,
I downloaded LLVM 3.3 with clang support from
http://llvm.org/releases/download.html#3.3, and installed it on my machine.
I also installed the opencl header files.
I'm attempting to compile a simple program as follows:
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#include <CL/cl.h>
/* Test kernel */
__kernel void test(__global float *in, __global float *out) {
int index = get_global_id(0);
out[index] = 3.14159f * in[index] + in[index];
}
I'm compiling it with: clang -I/usr/include/CL -std=CL1.2 -x cl test.cl -o
test.ll
but I get the following error:
OpenCL/build/Release+Asserts/bin/../lib/clang/3.3/include/emmintrin.h:1355:48:
error:
too few elements in vector initialization (expected 2
elements, have 1)
return __builtin_shufflevector(__a, (__m128i){ 0 }, 0, 2);
I'm uncertain how to fix it. The error is coming from clang header files.
My goal is to compile a opencl program with clang with LLVM to get the
SPIR. The target processor is a microblaze (mblaze)
Any help would be appreciated to solve the issur. Thanks,
--
Vincent Mirian
PhD Candidate
Electrical and Computer Engineering
University of Toronto
*Eco-Tip: Save trees! Do you really need to print this email? ;-)*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20131001/b93eb560/attachment.html>
More information about the cfe-users
mailing list