我应该在哪里使用OpenCL数据类型? [英] Where should I using OpenCL data types?

查看:130
本文介绍了我应该在哪里使用OpenCL数据类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题:应该在哪里使用OpenCL数据类型?为了什么他们覆盖了哪些?

I have a question: where should I using OpenCL data types? For what are us? Which are covered they?

推荐答案

某些类型是在OpenCL C编程语言中定义的,例如intfloat4等.

Some types are defined in the OpenCL C programming language, like int, float4, etc.

对应的类型在主机API中使用cl_前缀定义,例如cl_intcl_float4等.这些类型在OpenCL API函数中使用,应用于传递内核参数和计算例如缓冲区的大小.

The corresponding types are defined in the host API with the cl_ prefix, like cl_int, cl_float4, etc. These types are used in the OpenCL API functions, and should be used to pass kernel arguments and compute the size of buffers for example.

这篇关于我应该在哪里使用OpenCL数据类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆