aboutsummaryrefslogtreecommitdiff
path: root/tests/NEON
diff options
context:
space:
mode:
authorMoritz Pflanzer <moritz.pflanzer@arm.com>2017-07-18 15:44:21 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:16:42 +0100
commitd58cec032556abb103cdf7564ab29762d5c4c051 (patch)
tree1c938fdb7f087129ee54654eeee55c53ffe97ca5 /tests/NEON
parent81527bff7d6fc337fb9edec23c0b63a96b500bd4 (diff)
downloadComputeLibrary-d58cec032556abb103cdf7564ab29762d5c4c051.tar.gz
COMPMID-415: Cleanup accessors
Change-Id: Id19c8c1ea76f6e6679a4ac770e804f8012a2b5a6 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80937 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/NEON')
-rw-r--r--tests/NEON/Accessor.h (renamed from tests/NEON/NEAccessor.h)46
-rw-r--r--tests/NEON/Helper.h3
-rw-r--r--tests/NEON/LutAccessor.h (renamed from tests/NEON/NELutAccessor.h)22
3 files changed, 30 insertions, 41 deletions
diff --git a/tests/NEON/NEAccessor.h b/tests/NEON/Accessor.h
index 9afc300d99..5949b350a0 100644
--- a/tests/NEON/NEAccessor.h
+++ b/tests/NEON/Accessor.h
@@ -21,33 +21,30 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef __ARM_COMPUTE_TEST_NEON_NEACCESSOR_H__
-#define __ARM_COMPUTE_TEST_NEON_NEACCESSOR_H__
-
-#include "IAccessor.h"
+#ifndef __ARM_COMPUTE_TEST_ACCESSOR_H__
+#define __ARM_COMPUTE_TEST_ACCESSOR_H__
#include "arm_compute/runtime/Tensor.h"
+#include "tests/IAccessor.h"
namespace arm_compute
{
namespace test
{
-namespace neon
-{
/** Accessor implementation for @ref Tensor objects. */
-class NEAccessor : public IAccessor
+class Accessor : public IAccessor
{
public:
/** Create an accessor for the given @p tensor.
*
* @param[in, out] tensor To be accessed tensor.
*/
- NEAccessor(Tensor &tensor);
+ Accessor(Tensor &tensor);
- NEAccessor(const NEAccessor &) = delete;
- NEAccessor &operator=(const NEAccessor &) = delete;
- NEAccessor(NEAccessor &&) = default;
- NEAccessor &operator=(NEAccessor &&) = default;
+ Accessor(const Accessor &) = delete;
+ Accessor &operator=(const Accessor &) = delete;
+ Accessor(Accessor &&) = default;
+ Accessor &operator=(Accessor &&) = default;
TensorShape shape() const override;
size_t element_size() const override;
@@ -64,61 +61,60 @@ private:
Tensor &_tensor;
};
-inline NEAccessor::NEAccessor(Tensor &tensor)
+inline Accessor::Accessor(Tensor &tensor)
: _tensor{ tensor }
{
}
-inline TensorShape NEAccessor::shape() const
+inline TensorShape Accessor::shape() const
{
return _tensor.info()->tensor_shape();
}
-inline size_t NEAccessor::element_size() const
+inline size_t Accessor::element_size() const
{
return _tensor.info()->element_size();
}
-inline size_t NEAccessor::size() const
+inline size_t Accessor::size() const
{
return _tensor.info()->total_size();
}
-inline Format NEAccessor::format() const
+inline Format Accessor::format() const
{
return _tensor.info()->format();
}
-inline DataType NEAccessor::data_type() const
+inline DataType Accessor::data_type() const
{
return _tensor.info()->data_type();
}
-inline int NEAccessor::num_channels() const
+inline int Accessor::num_channels() const
{
return _tensor.info()->num_channels();
}
-inline int NEAccessor::num_elements() const
+inline int Accessor::num_elements() const
{
return _tensor.info()->tensor_shape().total_size();
}
-inline int NEAccessor::fixed_point_position() const
+inline int Accessor::fixed_point_position() const
{
return _tensor.info()->fixed_point_position();
}
-inline const void *NEAccessor::operator()(const Coordinates &coord) const
+inline const void *Accessor::operator()(const Coordinates &coord) const
{
return _tensor.ptr_to_element(coord);
}
-inline void *NEAccessor::operator()(const Coordinates &coord)
+inline void *Accessor::operator()(const Coordinates &coord)
{
return _tensor.ptr_to_element(coord);
}
-} // namespace neon
} // namespace test
} // namespace arm_compute
-#endif /* __ARM_COMPUTE_TEST_NEON_NEACCESSOR_H__ */
+#endif /* __ARM_COMPUTE_TEST_ACCESSOR_H__ */
diff --git a/tests/NEON/Helper.h b/tests/NEON/Helper.h
index f9774c774c..5b0f750fca 100644
--- a/tests/NEON/Helper.h
+++ b/tests/NEON/Helper.h
@@ -33,8 +33,6 @@ namespace arm_compute
{
namespace test
{
-namespace neon
-{
template <typename T>
Array<T> create_array(const std::vector<T> &v)
{
@@ -46,7 +44,6 @@ Array<T> create_array(const std::vector<T> &v)
return array;
}
-} // namespace neon
} // namespace test
} // namespace arm_compute
#endif /* __ARM_COMPUTE_TEST_NEON_HELPER_H__ */
diff --git a/tests/NEON/NELutAccessor.h b/tests/NEON/LutAccessor.h
index 2dadcf5996..24ad63d84b 100644
--- a/tests/NEON/NELutAccessor.h
+++ b/tests/NEON/LutAccessor.h
@@ -21,8 +21,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef __ARM_COMPUTE_TEST_NEON_NELUTACCESSOR_H__
-#define __ARM_COMPUTE_TEST_NEON_NELUTACCESSOR_H__
+#ifndef __ARM_COMPUTE_TEST_NEON_LUTACCESSOR_H__
+#define __ARM_COMPUTE_TEST_NEON_LUTACCESSOR_H__
#include "ILutAccessor.h"
@@ -32,24 +32,22 @@ namespace arm_compute
{
namespace test
{
-namespace neon
-{
/** Accessor implementation for @ref Lut objects. */
template <typename T>
-class NELutAccessor : public ILutAccessor<T>
+class LutAccessor : public ILutAccessor<T>
{
public:
/** Create an accessor for the given @p Lut.
*/
- NELutAccessor(Lut &lut)
+ LutAccessor(Lut &lut)
: _lut{ lut }
{
}
- NELutAccessor(const NELutAccessor &) = delete;
- NELutAccessor &operator=(const NELutAccessor &) = delete;
- NELutAccessor(NELutAccessor &&) = default;
- NELutAccessor &operator=(NELutAccessor &&) = default;
+ LutAccessor(const LutAccessor &) = delete;
+ LutAccessor &operator=(const LutAccessor &) = delete;
+ LutAccessor(LutAccessor &&) = default;
+ LutAccessor &operator=(LutAccessor &&) = default;
int num_elements() const override
{
@@ -83,8 +81,6 @@ public:
private:
ILut &_lut;
};
-
-} // namespace neon
} // namespace test
} // namespace arm_compute
-#endif /* __ARM_COMPUTE_TEST_NEON_NELUTACCESSOR_H__ */
+#endif /* __ARM_COMPUTE_TEST_NEON_LUTACCESSOR_H__ */