View Full Version : Complex type
12-29-2009, 12:58 PM
Can I use complex type in the kernel? For example, complex float?
If it can, how? Thanks a lot.
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)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.