and of course got the always-fun "Trying to context switch in no-switch region" message. The backtrace showed a big mess of templated loop decomposition stuff; it was not clear how to the error back to this line of code.
Can we plumb FILE, LINE, and/or func down the decomposition through the FORALL_OVERLOAD macro to make this sort of debugging easier?
Are there other places we could add additional debugging info in our templated code?
Good question. We're still not gonna escape the messy backtrace -- nesting lambdas is just terrible for naming. But it may be that we can surface the original source code line better in the error message.
One of our collaborators tried writing code like this:
and of course got the always-fun "Trying to context switch in no-switch region" message. The backtrace showed a big mess of templated loop decomposition stuff; it was not clear how to the error back to this line of code.
Can we plumb FILE, LINE, and/or func down the decomposition through the FORALL_OVERLOAD macro to make this sort of debugging easier?
Are there other places we could add additional debugging info in our templated code?