- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I asked the constant memory problem early. And I understand that access constant memory is faster than access global memory. But the kernel code I programmed is the same speed when I placed the array in constant or global memory , and two cases as shown : *******constant memory******* kernel test(constant int * a){ ... int n = rand (); // rand() function is used to generate a integer number and n is not the same for each workitem int tmp = a[n]; ... } ************************** *******global memory******* kernel test(global int * a){ ... int n = rand (); // rand() function is used to generate a integer number and n is not the same for each workitem int tmp = a[n]; ... } ************************** Therefore , each workitem might not access the same address of array a. These cases result in same speed (kernel time) In nvidia guide , if access constant memory address is not the same address , it will be access sequentially. Is it the same as Altera OpenCL ? ThanksLink Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page