Chuck Long and double are supported in pocl.
It seems that pocl thinks that your system does not support 64-bit variables. This is probably a configuration issue. Can you point us to the output of running "configure" for pocl? -erik On 2013-07-29, at 16:52 , Chuck Zhao <[email protected]> wrote: > With the pocl-0.8rc8 driver, when I try to use vector long (ulong2..ulong16, > long2..long16), or vector double types (double2..double16), the compilation > will fail. > > E.g. (with 1 line update to the example/example1.cl) > __kernel void dot_product (__global const float4 *a, __global const float4 > *b, __global float *c) > { > int gid = get_global_id(0); > > barrier(CLK_LOCAL_MEM_FENCE); > > c[gid] = a[gid].x * b[gid].x; > c[gid] += a[gid].y * b[gid].y; > c[gid] += a[gid].z * b[gid].z; > c[gid] += a[gid].w * b[gid].w; > > ulong2 dst = ((1UL<<32)+1UL); > > } > > Running this new example1 application will trigger runtime error as: > czhao@panda0:~/ResearchTools/Compiler/POCL/pocl-0.8/robj32-rc8-debug/examples/example1/.libs$ > time ./example1 > In file included from /tmp/poclY5zmDz//program.cl:1: > /tmp/poclY5zmDz//program.cl:14:3: error: use of undeclared identifier > 'ulong2'; did you mean 'long'? > ulong2 dst = ((1UL<<32)+1UL); > ^~~~~~ > long > /tmp/poclY5zmDz//program.cl:14:21: warning: shift count >= width of type > [-Wshift-count-overflow] > ulong2 dst = ((1UL<<32)+1UL); > ^ ~~ > 1 warning and 1 error generated. > ERROR > (0.000000, 0.000000, 0.000000, 0.000000) . (0.000000, 0.000000, 0.000000, > 0.000000) = -0.000007 > FAIL > > > This seems to me like a clang compilation issue, due to ulong2 was not > defined. > > I did a quick search, it seems that all the vector long/vector ulong/vector > double types are indeed defined under {POCL}/include/_kernel.h and > {POCL}/include/CL/cl_platform.h > > So, I am kind of confused here. > - Are the vector long/ulong/double types properly defined? > - Can we enable it somehow by default, or with a flag? (I tried #pragma > OPENCL EXTENSION cles_khr_int64 : enable, not help, clang just ignores it.) > > Thank you very much > > Chuck > > > > Platform: Ubuntu/ARM: 12.04 > Clang: 3.2 > > ------------------------------------------------------------------------------ > Get your SQL database under version control now! > Version control is standard for application code, but databases havent > caught up. So what steps can you take to put your SQL databases under > version control? Why should you start doing it? Read more to find out. > http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk_______________________________________________ > pocl-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pocl-devel -- Erik Schnetter <[email protected]> http://www.perimeterinstitute.ca/personal/eschnetter/ My email is as private as my paper mail. I therefore support encrypting and signing email messages. Get my PGP key from http://pgp.mit.edu/. ------------------------------------------------------------------------------ Get your SQL database under version control now! Version control is standard for application code, but databases havent caught up. So what steps can you take to put your SQL databases under version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk _______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
