stanc3 icon indicating copy to clipboard operation
stanc3 copied to clipboard

See if we can do map_rect data transfers in stanc3 and get rid of call_id template parameter

Open seantalts opened this issue 5 years ago • 2 comments

Right now map_rect asks the compiler to emit a call_id integer as a template parameter to basically allow some caching to happen in the Math library. As we did with the GPU functions, this logic would better live in the compiler both for code sanity reasons but also because I believe the current caching scheme is subtly wrong.

seantalts avatar Oct 11 '19 21:10 seantalts

It can be improved...yes...and you are right in that it probably lives a better life in some higher level parts of Stan.

wds15 avatar Oct 11 '19 21:10 wds15

Sorry, hope that didn't sound too critical! Let me remove the word "hack," I felt like it was okay because I was definitely involved and complicit in its creation, haha. I also thought we had discovered there was some way in which map_rect caching was actually wrong but I forgot what the way was. Inside for loops maybe?

seantalts avatar Oct 12 '19 05:10 seantalts