ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::ScoredGraphHook Class Reference

#include <ActsGnnHookTool.h>

Inheritance diagram for InDet::ScoredGraphHook:
Collaboration diagram for InDet::ScoredGraphHook:

Public Member Functions

void operator() (const ActsPlugins::PipelineTensors &tensors, const ActsPlugins::ExecutionContext &ctx) const override
const std::vector< float > & getEdgeScores () const
const std::vector< int64_t > & getEdgeIndex () const

Private Attributes

std::vector< float > m_edgeScores ATLAS_THREAD_SAFE {}
std::vector< int64_t > m_edgeIndex ATLAS_THREAD_SAFE {}

Detailed Description

Definition at line 16 of file ActsGnnHookTool.h.

Member Function Documentation

◆ getEdgeIndex()

const std::vector< int64_t > & InDet::ScoredGraphHook::getEdgeIndex ( ) const
inline

Definition at line 41 of file ActsGnnHookTool.h.

41 {
42 return m_edgeIndex;
43 }

◆ getEdgeScores()

const std::vector< float > & InDet::ScoredGraphHook::getEdgeScores ( ) const
inline

Definition at line 38 of file ActsGnnHookTool.h.

38 {
39 return m_edgeScores;
40 }

◆ operator()()

void InDet::ScoredGraphHook::operator() ( const ActsPlugins::PipelineTensors & tensors,
const ActsPlugins::ExecutionContext & ctx ) const
inlineoverride

Definition at line 18 of file ActsGnnHookTool.h.

19 {
20
21 ActsPlugins::ExecutionContext cpuCtx;
22 cpuCtx.device = ActsPlugins::Device::Cpu();
23 cpuCtx.stream = ctx.stream;
24
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());
29 }
30
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());
35 }
36 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

std::vector<int64_t> m_edgeIndex InDet::ScoredGraphHook::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 47 of file ActsGnnHookTool.h.

47{};

◆ ATLAS_THREAD_SAFE [2/2]

std::vector<float> m_edgeScores InDet::ScoredGraphHook::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 46 of file ActsGnnHookTool.h.

46{};

The documentation for this class was generated from the following file: