Program Listing for File stage_util.hpp

Return to documentation for file (morpheus/_lib/include/morpheus/utilities/stage_util.hpp)


#pragma once #include <algorithm> namespace morpheus { /****** Component public free function implementations************/ template <typename FuncT, typename SeqT> auto foreach_map(const SeqT &seq, FuncT func) { using value_t = typename SeqT::const_reference; using return_t = decltype(func(std::declval<value_t>())); std::vector<return_t> result{}; std::transform(seq.cbegin(), seq.cend(), std::back_inserter(result), func); return result; } // end of group } // namespace morpheus

© Copyright 2023, NVIDIA. Last updated on Feb 3, 2023.