From: Carlos S. de La L. <car...@ur...> - 2011-10-24 09:05:42
|
Hi Erik, thanks for your contributions. Some of the questions you ask are open for discussion, as the kernel library implementation is still in a really early stage of development. > - Is this implementation / coding style approximately acceptable? It is all right. We do not have an "official" coding guideline for pocl (yet) but basically I tried to follow GNU Coding Standards, except in the LLVM passes where the LLVM guidelines are used. I have seen you call the C library functions to implement the functionality. This is ok for "native" environments, but in a real device scenario, there is not going to be an underlying C library providing for example "cos" function. One possible option is to use some other embedded library (newlib?) underneath our kernel library, thought I have the feeling this might be overkill and make too big device binaries. Otherwise we would need to implement the "cos", "sin", whatever... functions completely in the kernel library. Thoughts? > - Since some of the code is highly repetitive, should we use a > templating mechanism, probably built onto m4? If it is *really* needed, then we can use it. But I am not sure how much effort it saves compared with the C preprocessor. If we want to make the system as portable as possible, it is desirable to keep dependencies to a minimum. Can provide a (simple) example of a case in the kernel library where M4 macros would help? > - I added explicitly vectorized functions e.g. for fabs or sqrt for > SSE architectures; is this acceptable? It is perfectly acceptable as long as the code works also in non-SSE architectures. > - Should there be test cases for the run-time functions? There is no strict rule, but of course the most test cases the better ;) BR Carlos |