I think to the extent we can easily generalize we should - I understand that C++11’s compile-time tuples aren’t totally obvious (so having the non-templated
ReduceF::apply with extra arguments is fine for now) but I think we can still template the cache, right? The data types should be unchanged between iterations and the cache should not be different if the data used are not different, from what I can see?
And for point 4, I was just hoping to get your help brainstorming some way we can avoid having an ugly extra requirement for the reduction operation’s interface. I am not totally sold on this “write it directly into place” part of the interface for
ReduceF::apply, since we will then
CombineF everything anyway, right? Seems like we can use the more functional approach and use move semantics if need be?
On a lower level for a second, why does
CombineF::apply take in eta and theta? And could you change their names to something indicating their purpose, like
job_specific_params (or something like that)? If we’re going to use the interface here for things besides hierarchical models we should name it that way :)