#include "internal/arm_compute/feature/View.h"
#include "internal/Sinks.h"
+#include "internal/VectorSink.h"
#include "internal/MatrixSink.h"
#include "internal/Tensor3DSink.h"
#include <cassert>
//
-// VectorSink
-//
-template <typename T> class VectorSink final : public Sink
-{
-public:
- VectorSink(const int32_t vlen, T *base, const size_t size) : _vlen{vlen}, _base{base}
- {
- assert(size >= _vlen * sizeof(T));
- }
-
-public:
- void pull(::arm_compute::ITensor &tensor) const override
- {
- for (int32_t n = 0; n < _vlen; ++n)
- {
- auto from = reinterpret_cast<T *>(tensor.ptr_to_element(::arm_compute::Coordinates{n}));
- auto into = _base + n;
-
- *into = *from;
- }
- }
-
-private:
- const int32_t _vlen;
- T *const _base;
-};
-
-//
// FeatureSink
//
template <typename T> class FeatureSink final : public Sink
--- /dev/null
+#ifndef __INTERNAL_VECTOR_SINK_H__
+#define __INTERNAL_VECTOR_SINK_H__
+
+#include "internal/Sink.h"
+
+#include <arm_compute/core/ITensor.h>
+
+#include <cassert>
+
+//
+// VectorSink
+//
+template <typename T> class VectorSink final : public Sink
+{
+public:
+ VectorSink(const int32_t vlen, T *base, const size_t size) : _vlen{vlen}, _base{base}
+ {
+ assert(size >= _vlen * sizeof(T));
+ }
+
+public:
+ void pull(::arm_compute::ITensor &tensor) const override
+ {
+ for (int32_t n = 0; n < _vlen; ++n)
+ {
+ auto from = reinterpret_cast<T *>(tensor.ptr_to_element(::arm_compute::Coordinates{n}));
+ auto into = _base + n;
+
+ *into = *from;
+ }
+ }
+
+private:
+ const int32_t _vlen;
+ T *const _base;
+};
+
+#endif // __INTERNAL_VECTOR_SINK_H__