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

Class CLAccessor

tests/CL/CLAccessor.h:37–86  ·  view source on GitHub ↗

Accessor implementation for @ref CLTensor objects. */

Source from the content-addressed store, hash-verified

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

Callers 15

compute_targetMethod · 0.85
TEST_CASEFunction · 0.85
TEST_CASEFunction · 0.85
TEST_SUITE_ENDFunction · 0.85
Convolution3D.cppFile · 0.85
ArgMinMax.cppFile · 0.85
Col2Im.cppFile · 0.85

Calls

no outgoing calls

Tested by 1

test_specific_case_int8Function · 0.68