Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between cl_datatype and usual datatype

Tags:

opencl

What is the difference between cl_Type and regular Type like cl_float and float regarding the size and the usage. Can cl_float be used in kernels?

Thanks

like image 232
Damoon Avatar asked Feb 24 '12 10:02

Damoon


People also ask

What is the difference between data type and field type?

Overview. Data types can seem confusing for example, if a field's data type is Text, it can store data that consists of either text or numerical characters. But a field whose data type is Number can store only numerical data. So, you have to know what properties are used with each data type.

What are the 4 different data types?

4 Types of Data: Nominal, Ordinal, Discrete, Continuous.


1 Answers

In the kernel, you have to use float, int, etc. They are standardized by the OpenCL specifications. Because they can differ from the types used by your normal compiler, you should use the cl_* versions in your host code (and only there). For example, a cl_float on your host is the same as a float in your kernel.

like image 109
pezcode Avatar answered Sep 28 '22 04:09

pezcode