I’m really inspired by Tributary and would like to use it to start learning D3. I’d like to start off with your tutorial “intro-d3/costofliving” but the webpage seems to not be working properly. Any chance of following the content another way?
Thanks,
Andrea
is this example working without tributary? Like as a d3 tutorial, how would the multi-line chart work?
]]>First of, the only way the struct will actually end up in private memory is by copying it from global or constant memory. Second, every thread has its own private memory so the struct will be duplicated for each thread wasting memory space. Third, a struct with array components that are accessed in a dynamic way (through a pointer for example) cannot be stored in registers anyways, so it will reside in global memory.
Making things worse is that private memory that is spilled to global memory will not be cached because it makes no sense to do so, since each thread has its own copy.
Regarding: “This is ok for me, since ‘constant’ is a special type of ‘global’ and reading it comes at a performance penalty anyway.”
Yes it is global memory but there is a special constant cache (usually 8kb) on each multiprocessor which is as fast as L1 cache.
So storing the struct in constant memory is in fact the most efficient way (those GPU designers have done their homework after all).
Please don’t take my comment the wrong way, i’ve done some crazy “optimizations” myself in the past :)
]]>