Results 1 to 2 of 2

Thread: Complex type

  1. #1
    Junior Member
    Join Date
    Dec 2009

    Complex type

    Can I use complex type in the kernel? For example, complex float?
    If it can, how? Thanks a lot.

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Northern Europe

    Re: Complex type

    There are no built-in complex types in OpenCL 1.0. You can use a float2 vector and manually treat it as complex, but you will have to do the math explicitly. If you take this approach you should get some benefit of auto-vectorization on compatible hardware for supported operations. (e.g., float2 + float2 should do two adds in parallel if the hardware supports it)

Similar Threads

  1. Complex Numbers
    By IRWolfie- in forum OpenCL - parallel programming of heterogeneous systems
    Replies: 3
    Last Post: 06-12-2012, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean