Results 1 to 3 of 3

Thread: images and memory access optimization

  1. #1
    Junior Member
    Join Date
    Feb 2010

    images and memory access optimization


    I have a newbie conceptual question about memory optimization when working with image data types.

    I've read through a number of tutorials about the importance of coalescing global memory accesses and avoiding bank conflicts when accessing local memory. But when I've looked at the samples that use image data types, I don't see any of these optimizations; I just see global memory being accessed directly through the image functions.

    Is this strictly an artifact of the small local memory sizes relative to the size of most image data? Is it possible to still get some gains by loading chunks of image data into local memory when there will be multiple accesses to each pixel (as is the case for my application)? Or am I just overcomplicating things?

    Thanks in advance,


  2. #2
    Senior Member
    Join Date
    Jul 2009
    Northern Europe

    Re: images and memory access optimization

    Images on today's hardware have caches, so you get most of the benefits of local memory without the difficulty. The caches are small (~32kB L1, ~768kB L2) so you need a lot of locality to make it work.

    Writing to images is very slow. Avoid it if you can.

  3. #3
    Junior Member
    Join Date
    Feb 2010

    Re: images and memory access optimization


    I appreciate the instructive reply. Your explanation makes perfect sense.

Similar Threads

  1. Replies: 6
    Last Post: 02-28-2013, 03:59 PM
  2. Memory Access
    By lcnepo in forum OpenCL
    Replies: 1
    Last Post: 12-09-2010, 03:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean