POV-Ray : Newsgroups : povray.programming : Type problems : Re: Type problems Server Time
28 Apr 2024 21:20:39 EDT (-0400)
  Re: Type problems  
From: Aidy
Date: 30 Mar 2011 10:45:00
Message: <web.4d934110a2992db7674c4bb0@news.povray.org>
I've not got round to porting over the types inside the Opts structure just yet
but you're right, they won't be able to reference the original memory. But this
will be part of what I copy to the GPU when the kernel function is called.

What sort of things are you referring to when you say patterns that use a
cache??

Le_Forgeron <lef### [at] freefr> wrote:
> Le 30/03/2011 15:14, Aidy a écrit :
> >> Please, read.
> >> __device__ is going to inline the function (or I'm just getting it
> >> wrong, which is 90% likely).
> >
> > Sorry I missed that bit. You're right, I've just looking through the nVidia
> > documentation, and the link you sent me and it will inline it.
> >
> > If it inlines it then, can I pass the structure itself and NOT have it create a
> > copy within the function itself?? It shouldn't increase the overhead at all
> > should it??
> >
> I would be more concerned about the content of the structure: if it hold
> any pointer (and use it), you will be once again in trouble.
>
> (for the sack of my comprehension so far: the address space used by the
> main CPU is not the address space used by the Cuda element, so any
> pointer filled by the CPU is useless on the Cuda element. Which means
> only linear/flat data(aka structure) can be exchanged at the interface
> of a __device__ function.)
>
> Now, I did not check the definition of TNORMAL and other.
>
> For your question: as it is inline, no copy are created, it just use the
> actual data. (unless a C expert wants to show up and put me in
> embarassement right for that sentence)
>
> You might get issue with patterns that use a cache, as 3.6 is not
> thread-aware and Cuda code could run into collisions.
>
> --
> Software is like dirt - it costs time and money to change it and move it
> around.
>
> Just because you can't see it, it doesn't weigh anything,
> and you can't drill a hole in it and stick a rivet into it doesn't mean
> it's free.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.