cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

n_treutner
Journeyman III

Advantage of cl_ datatypes?

datatypes and conversion

Hi everyone,

just two quick questions: I was wondering, if there is any reason, to use cl_ datatypes (both in the "host" programm, and in the kernel), instead of "normal" c/c++ ones? so, should i use "cl_char" instead of "char"? maybe Performance or Memory usage?

also, if i need to do some converting (char/int/float), should it be done in the normal c/c++ code, or in the OpenCL-device for best performance?

Thanks for your work in this forum, you have already helped me a lot!

0 Likes
1 Reply

cl_* data types have specific alignment and size requirements that are well defined and work the same across multiple vendor's implementations.
0 Likes