On 11/25/2013 05:40 PM, Erik Schnetter wrote: > I disabled printf for 3.4 until we have a fix. The work-around should be > simple, since the hardware (at least on CPUs) doesn't actually have address > spaces. > > Unfortunately, this is not just about the argument to printf. Internally, > strings are also used in a few other places (e.g. to create format strings > for the libc printf), and this fails as well. A generic way to cast between > address spaces would be good. Maybe one can go via intptr_t? This seems to > work for atomics...
The problem stems from the fact that we call the libc printf() eventually and do not ship our full implementation. The correct way around this would be to ship a full implementation of printf in pocl built-in lib that is aware of the __constant, right? Perhaps printf could be defined in C (not CL) for the time being? Then it would avoid the pointer cast checks which are irrelevant for the single AS CPU architectures in which the current printf only works anyways. The similar strategy has been used with the image functions to be able to cast the opaque OpenCL image types to our own C struct. -- Pekka ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
