Results 1 to 2 of 2

Thread: Why no template support?

Hybrid View

  1. #1
    Newbie
    Join Date
    Jul 2013
    Posts
    1

    Why no template support?

    Anbody know why opencl kernel do not support template?
    Computer vision is one of the fields which need tremendous computation power,
    and we always have to deal with different type of the pixels(uchar, int, float, double and non-byte pixels)

    Without template, we have to copy and paste the codes again and again
    macros is no an optimal solution compared to template in most of the cases
    they are verbose, harder to read, use and maintain

    Look at the thrust library for cuda, opencl is impossible to have such high level
    and generic library without the support of template.

    kernel of cuda already adopt template many years ago, AMD also have their own implementation of template
    what stop opencl support template?

  2. #2
    You should checkout Boost.Compute [1]. It offers a C++, STL-like API just like Thrust but is based on OpenCL.

    [1] https://github.com/kylelutz/compute

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •