   using ActivePolicyT = 
     typename ChainedPolicyT::ActivePolicy::AdjacentDifferencePolicy;
 
+  // It is OK to introspect the return type or parameter types of the 
+  // `operator()` function of `__device__` extended lambda within device code.
+  using OutputT = detail::invoke_result_t<DifferenceOpT, InputT, InputT>;
+
   using Agent = AgentDifference<ActivePolicyT,
                                 InputIteratorT,
                                 OutputIteratorT,

                                                       DifferenceOpT,
                                                       OffsetT,
                                                       InputT,
                                                       OutputT,
                                                       MayAlias,
                                                       ReadLeft>,
              d_input,

      THRUST_NS_QUALIFIER::cuda_cub::launcher::triple_chevron(
        num_tiles,
        AdjacentDifferencePolicyT::BLOCK_THREADS,
        0,
        stream)
        .doit(DeviceAdjacentDifferenceDifferenceKernel<MaxPolicyT,
                                                       InputIteratorT,
