ochafik/nativelibs4java — pull request #240 by Wsiegenthaler (2012-01-18 02:35:02+00:00)
Title: 0.3 snapshot

Hi Olivier,
I've been working through some issues with 0.3 and have a few fixes for your consideration.

1) OpenCL has no 'byte' primitive so operations involving CLArray[Byte]'s must instead use "char" in the rewritten CL code. Fixed by overriding clType = "char" for the ByteCLDataIO subclass.

2) Minor issue with CLDataIO.toString throwing an uncaught exception when 'CLData.ios' is empty. Not really necessary once the root cause was fixed (see #3), as 'ios' should always have at least 1 element.

3) ScalaCLFunctionsTransform components getDataIO(Type) was throwing an unhandled exception instead of returning scalar CLDataIOs (DoubleCLDataIO, ByteCLDataIO, etc). This resulted in missing CLDataIOs.

4) The Tree representing a CLDataIO is cast during compilation to represent a CLDataIO[Any] (by calling tree.AS(anyCLDataIOTpe) ) which caused an exception later during compilation. Removing this call seems to resolve the issue but you know best.