On Fri, Aug 12, 2016 at 11:37 AM, Param Hanji <param.catchch...@gmail.com>
wrote:

> Great, thanks for the info. I think I've figured out the issue, namely the
> improper use of pointers at some places. Fixing this brought up some other
> issues. Suppose I have partitions defined as below:
>
>     struct partition {
>         seg *pt_inseg;
>         hit *pt_inhit;
>         ...
>     }
>
> And my kernel function is:
>     __kernel void weave(global struct *segs, global uint *h,
>                            global partition *parts, ...)
>     {
>         size_t id = get_global...;
>         global struct partition *pp = &parts[h[id]];
>         pp->pt_inseg = &segs[h[i]];
>         ...
>     }
>
> The above snippet produces an error claiming 'conversion from address
> space "global" to "private" is not supported' (last line). But parts and
> segs are both global right, which means such an error shouldn't occur.
>

The problem that causes the error is that pp->pt_inseg is type 'seg *'
while &segs[h[i]] is type 'global struct *'. The type in the argument
should be 'global seg *' and you probably need to declare the pointer
fields in struct partition e.g. 'pt_inseg' with the 'global' qualifier as
well.

-- 
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to