CUDA kernel "Only a single pack parameter is allowed" workaround?

Viewed 152

The CUDA 7 standard regarding variadic global function templates states "only a single pack parameter is allowed." Is there an elegant workaround for this? I want to be able to do something like:

template<int... vals>
void RecursiveFunct() {

}

template<int... vals, typename T, typename... Args>
void RecursiveFunct(T t, Args... args) {
  t.template call<vals...>();
  RecursiveFunct<vals...>(args...);
}

I'm thinking I could wrap my pack of integers into something before passing them along but is it possible to do that in a way that is transparent to the caller of this code?

1 Answers
Related