I was looking at how POCL handles OpenCL math functions, and got lost 
half-way through.

Under {POCL_SRC}/lib/kernel, there are all sorts of implementations 
(macro-intensive style :-) of OpenCL's math functions.
Each function is compiled to an LLVM bitcode file, and then linked 
together into {POCL_OBJ}/lib/kernel/(platform)/kernel-(platform).bc file.

E.g., on my ARM platform, they are linked into 
{POCL_OBJ}/lib/kernel/arm/kernel-armv7.bc.

And, from here, I am lost. I can't refer to where it is linked, and how 
it is used.

E.g.
If I put in a call to rotate() or cross() inside example/example1.cl, 
the code still works, with a call to rotate() generated.

However, it seems the example project only links with libpocl and libpoclu.

I unpacked both libpocl.a and libpoclu.a, neither has the compiled math 
functions inside.
So, where/how does POCL link an app with the math functions defined 
inside {POCL_SRC}/lib/kernel?
Is there a secretly packaged library somewhere that gets implicitly linked?

Seems the {POCL_SRC}/lib/kernel directory is kind of different comparing 
with its neighbors which all compiles down to a lib file (.a and .so). 
Some help to explain please.

1 more question:
- what is the difference between libpocl and libOpenCL. They seem to be 
quite similar to each other, but a "diff" tells me they are not the same.
Why do we generate these 2 similar files?
A quick grep seems to show that libOpenCL is not used by any of the 
examples.


Thank you

Chuck


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to