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

Class Accessor

tests/NEON/Accessor.h:36–78  ·  view source on GitHub ↗

Accessor implementation for @ref Tensor objects. */

Source from the content-addressed store, hash-verified

34{
35/** Accessor implementation for @ref Tensor objects. */
36class Accessor : public IAccessor
37{
38public:
39 /** Create an accessor for the given @p tensor.
40 *
41 * @param[in, out] tensor To be accessed tensor.
42 */
43 Accessor(ITensor &tensor);
44
45 /** Prevent instances of this class from being copy constructed */
46 Accessor(const Accessor &) = delete;
47 /** Prevent instances of this class from being copied */
48 Accessor &operator=(const Accessor &) = delete;
49 /** Allow instances of this class to be move constructed */
50 Accessor(Accessor &&) = default;
51
52 /** Get the tensor data.
53 *
54 * @return a constant pointer to the tensor data.
55 */
56 const void *data() const;
57 /** Get the tensor data.
58 *
59 * @return a pointer to the tensor data.
60 */
61 void *data();
62
63 TensorShape shape() const override;
64 size_t element_size() const override;
65 size_t size() const override;
66 Format format() const override;
67 DataLayout data_layout() const override;
68 DataType data_type() const override;
69 int num_channels() const override;
70 int num_elements() const override;
71 PaddingSize padding() const override;
72 QuantizationInfo quantization_info() const override;
73 const void *operator()(const Coordinates &coord) const override;
74 void *operator()(const Coordinates &coord) override;
75
76private:
77 ITensor &_tensor;
78};
79
80inline Accessor::Accessor(ITensor &tensor) : _tensor{tensor}
81{

Callers 15

TEST_CASEFunction · 0.85
Convolution3D.cppFile · 0.85
ArgMinMax.cppFile · 0.85
Permute.cppFile · 0.85
TEST_CASEFunction · 0.85
ROIAlignLayer.cppFile · 0.85

Calls

no outgoing calls

Tested by 1