Lets see if I can summarize this up:
1. Most users ("all"[sic]) will want to use the ICD, as this seems to
become the de-facto on desktops.
2. The possibility to link directly, without ICD, is good to have, in
case pocl would be ported to some embedded devices. Something
TTA-related springs to mind first. :)
3. ICD is currently easily disabled & removed entirely at buildtime from
pocl. (configure --disable-icd)
4. Direct linking and ICD can co-exist with current pocl on mainstream
systems (read: at least x86_64 debian ;).
This can be done either with the trunk approach:
-export the clXXX functions directly, and rely on the linker -Bsymbolic
switch to not make infinate loops in ICD loaders.
or Vincent's proposed patch:
-rename the implementations to POclXXX and have ICD call these. The
linker willing, we can still export also the clXXX API with a #define.
5. With Vincent's proposed merge, we could test either ICD or non-ICD
version in the build tree without installing. (former requiring ocl_icd)
So, I suggest we do the follwing:
-we build only one libpocl (per build tree)
-enable ICD per default, allowing user remove it if needed.
-export the clXXX symbols, disabling them per platform or user request.
This then means we use the POclXXX way.
-a libOpenCL->libpocl link can be made if exporting is enabled, adding
this check to the currently available ones. Perhaps even with a user
override to dissallow?
The only downside to this suggestion is that internally to pocl, we must
call POclXXX functions, instead of clXXX ones, to not cause a infinite
loop on a possible future platform that lacks the "-Bsymbolic" and/or
some sort of noexport flag. On the upside, this allows for maximum
flexibility w.r.t. future porting. Also, calling POclXXX instead of
clXXX *within* pocl is perhaps not that bad thing anyways ;)
Now would be a good time to point out that I misunderstood something
crucial :)
kalle
--
But beware the debugger. Dark side of the source it is.
If once you start down the dark path, forever will it dominate
your destiny. Consume you it will.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel