ufo-kit / ufo-core

GLib-based framework for GPU-based data processing
GNU Lesser General Public License v3.0
24 stars 8 forks source link

Support arbitrary data types #42

Open matze opened 10 years ago

matze commented 10 years ago

Up to now, processing multi-dimensional single precision floating point data is the main target of the UFO framework, however support for element types other than that has been proposed. Here are some issues that we (@tomago, @rshkarin, @ashkarin, @kamer16) should discuss before implementing it:

tfarago commented 10 years ago

Good to see this here.

  1. absolutely necessary is ushort because of the cameras. But the more the merrier
  2. exactly
  3. I know, then don't execute the graph and tell the user why and what they can do. If I do high-precision calculations I certainly don't want the framework to implicitly change my data type.
  4. Per task I would say, another attribute in the ufo-buffer structure. Use case: camera data (ushort) -> filtering (2x float, or, better yet, complex) -> backprojection (float) -> normalization (ubyte) -> writer
matze commented 10 years ago

Concerning number 4: I suppose it's up to the task to decide which type to use rather than the user?

tfarago commented 10 years ago

Yes and no, e.g. flat correction has to output floats, sure. But what if the user wants it as a double? Or what if we have a normalize node? Then if I set it up to normalize to [0..255] I can convert it to ubyte from float or so. But for this we can make a converting node and the user can just use that one if they want full control.