c - OpenCL:将指向全局内存的指针存储在本地内存中?

标签 c opencl gpgpu

有什么解决办法吗?

这可能吗?

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

我希望将 abc 存储在本地内存中,而不是私有(private)内存中。

最佳答案

我认为这已经澄清了 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

据我所知,对于指针:[它们指向的位置] 输入 * [存储位置] 名称;

关于c - OpenCL:将指向全局内存的指针存储在本地内存中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11978024/

相关文章:

multithreading - 官方 OpenCL 2.2 标准是否支持 WaveFront?

java - OpenCL 编译失败 aparapi

cuda - CUDA 扭曲中的线程是否在多处理器上并行执行?

c - 从数组循环中获取最小和最大标签

c - DSP 处理器字大小

opencl - 确定 OpenCL 工作组大小的限制因素?

python - 为什么不在我的 GPU 上运行 OpenCL (Ubuntu)

c - 请求非结构或 union 中的成员 'something'

c - Linux 中检测硬件断点

memory - CL_OUT_OF_RESOURCES 用于 1GB VRAM 的 200 万个 float ?