OpenCL:将指向全局内存的指针存储在本地内存中吗? [英] OpenCL: Store pointer to global memory in local memory?

查看:74
本文介绍了OpenCL:将指向全局内存的指针存储在本地内存中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何解决方案?

那有可能吗?

__global *float abc; // pointer to global memory stored in private memory

我希望abc 存储在本地内存中,而不是私有内存中.

I want abc to be stored in local memory instead of private memory.

推荐答案

我认为这已得到澄清此处列表5.2:

I think this is clarified here List 5.2:

__global int global_data[128];  // 128 integers allocated on global memory
__local float *lf;  // pointer placed on the private memory, which points to a single-precision float located on the local memory
__global char * __local lgc[8];  // 8 pointers stored on the local memory that points to a char located on the global memory

据我对指针的理解:[它们指向的地方]输入* [存储的位置]名称;

As I understand for pointers: [where they point] type * [where to store] name;

这篇关于OpenCL:将指向全局内存的指针存储在本地内存中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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