18 void operator()(
const ActsPlugins::PipelineTensors& tensors,
19 const ActsPlugins::ExecutionContext& ctx)
const override {
21 ActsPlugins::ExecutionContext cpuCtx;
22 cpuCtx.device = ActsPlugins::Device::Cpu();
23 cpuCtx.stream = ctx.stream;
25 if (tensors.edgeScores.has_value()) {
26 const auto& scores = tensors.edgeScores.value();
27 auto cpuScores = scores.clone(cpuCtx);
28 m_edgeScores.assign(cpuScores.data(), cpuScores.data() + cpuScores.size());
31 if (tensors.edgeIndex.size() > 0) {
32 const auto& edgeIndex = tensors.edgeIndex;
33 auto cpuIndex = edgeIndex.clone(cpuCtx);
34 m_edgeIndex.assign(cpuIndex.data(), cpuIndex.data() + cpuIndex.size());