If I understand correctly, there's a very high chance that your output will
have to go in a very small subset of your global output array.
So you could use local memory for that small subset, and directly access
global memory for the rare cases that fall out of it.

One that jumps to the eye is that you're accessing 4 bytes of memory in an
arbitrary place, but every time you're really loading up, and then writing
back, a whole page! That's why it's so slow, even without atomic
operations. The solution is local memory.
On 14 Aug 2015 00:02, "Joe Haywood" <[email protected]> wrote:

> I'll look into it. I had not considered a sparse representation but that
> might be a good solution to keep everything in locals.
>
>
>
>
>
> Sent from my Samsung Galaxy Tab® S
>
>
> -------- Original message --------
> From: Karl Czajkowski <[email protected]>
> Date: 08/13/2015 5:53 PM (GMT-05:00)
> To: Joe Haywood <[email protected]>
> Cc: Jerome Kieffer <[email protected]>, [email protected]
> Subject: Re: [PyOpenCL] Opinions
>
> Could you use a sparse representation for the electron positions
> rather than a dense scalar grid?
>
> Something like a list of positions, an octree, or some other adaptive
> mesh might allow you to fit smaller sub-problems in each work-group
> and merge these results back into the global representation with
> more sequential access patterns...?
>
>
> Karl
>
>
>
>
>
> Confidentiality Notice:
> This e-mail, including any attachments is the property of Trinity Health
> and is intended for the sole use of the intended recipient(s). It may
> contain information that is privileged and confidential.  Any unauthorized
> review, use, disclosure, or distribution is prohibited. If you are not the
> intended recipient, please delete this message, and reply to the sender
> regarding the error in a separate email.
>
> _______________________________________________
> PyOpenCL mailing list
> [email protected]
> http://lists.tiker.net/listinfo/pyopencl
>
>
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to