diff --git a/HeterogeneousCore/AlpakaTest/plugins/alpaka/TestAlpakaGlobalProducerMoveToDeviceCache.cc b/HeterogeneousCore/AlpakaTest/plugins/alpaka/TestAlpakaGlobalProducerMoveToDeviceCache.cc index 4ca7888002872..51d756e5dbc8f 100644 --- a/HeterogeneousCore/AlpakaTest/plugins/alpaka/TestAlpakaGlobalProducerMoveToDeviceCache.cc +++ b/HeterogeneousCore/AlpakaTest/plugins/alpaka/TestAlpakaGlobalProducerMoveToDeviceCache.cc @@ -27,13 +27,11 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE { putTokenMulti2_{produces()}, putTokenMulti3_{produces()}, // create host-side object that gets implicitly copied to all devices of the backend - deviceCache_{[&config]() { - PortableHostObject obj(cms::alpakatools::host()); - *obj = TestAlgo::UpdateInfo{config.getParameter("x"), - config.getParameter("y"), - config.getParameter("z")}; - return obj; - }()} {} + deviceCache_{ + PortableHostObject{cms::alpakatools::host(), + TestAlgo::UpdateInfo{config.getParameter("x"), + config.getParameter("y"), + config.getParameter("z")}}} {} void produce(edm::StreamID, device::Event& iEvent, device::EventSetup const& iSetup) const override { auto const& input = iEvent.get(getToken_);