Your snippet looks good, the problem has to be elsewhere. Here are few ideas:
Please double check all parallel_for_each invocations and make sure they all use accelerator_view with the device that you created with this snippet (explicitly pass accelerator_view as first argument to parallel_for_each).
If possible reduce the problem size and see if your code runs without TDR, perhaps something else is causing a TDR (e.g. driver bugs are common cause of TDRs). Once you will know that your algorithm runs correctly for smaller problem you can go back to searching why is TDR triggered for larger problem size.
Disable TDR completely (see MSDN article on TDR registry keys) and see if your large problem set ever completes, if so go back to first point. This will indicate that your code runs on accelerator_view that has TDR enabled.
Good luck!