MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / configure

Method configure

src/runtime/NEON/functions/NEScatter.cpp:53–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51NEScatter::~NEScatter() = default;
52
53void NEScatter::configure(
54 const ITensor *src, const ITensor *updates, const ITensor *indices, ITensor *dst, const ScatterInfo &info)
55{
56 ARM_COMPUTE_TRACE_EVENT(ARM_COMPUTE_PROF_CAT_CPU, ARM_COMPUTE_PROF_LVL_CPU, "NEScatter::configure");
57 ARM_COMPUTE_ERROR_ON_NULLPTR(updates, indices, dst);
58
59 if (src == nullptr)
60 {
61 ARM_COMPUTE_ERROR_THROW_ON(validate(nullptr, updates->info(), indices->info(), dst->info(), info));
62 }
63 else
64 {
65 ARM_COMPUTE_ERROR_THROW_ON(validate(src->info(), updates->info(), indices->info(), dst->info(), info));
66 }
67
68 ARM_COMPUTE_LOG_PARAMS(src, updates, indices, dst, info);
69
70 _impl->op = std::make_unique<cpu::CpuScatter>();
71 if (src)
72 {
73 _impl->op->configure(src->info(), updates->info(), indices->info(), dst->info(), info);
74 }
75 else
76 {
77 _impl->op->configure(nullptr, updates->info(), indices->info(), dst->info(), info);
78 }
79
80 _impl->run_pack = {
81 {TensorType::ACL_SRC_0, src},
82 {TensorType::ACL_SRC_1, updates},
83 {TensorType::ACL_SRC_2, indices},
84 {TensorType::ACL_DST_0, dst},
85 };
86
87 _impl->workspace_tensors = manage_workspace<Tensor>(_impl->op->workspace(), _impl->memory_group, _impl->run_pack);
88}
89
90Status NEScatter::validate(const ITensorInfo *src,
91 const ITensorInfo *updates,

Callers

nothing calls this directly

Calls 3

validateFunction · 0.50
infoMethod · 0.45
workspaceMethod · 0.45

Tested by

no test coverage detected