--- /dev/null
+#ifndef __NNFW_KERNEL_ACL_CLUNIQUETENSOR_H__
+#define __NNFW_KERNEL_ACL_CLUNIQUETENSOR_H__
+
+#include <arm_compute/runtime/CL/CLTensor.h>
+
+namespace nnfw {
+namespace kernel {
+namespace acl {
+
+class CLUniqueTensor
+{
+public:
+ CLUniqueTensor(const ::arm_compute::TensorInfo &info)
+ {
+ _tensor.allocator()->init(info);
+ }
+
+public:
+ // Both copy and move are not allowed
+ CLUniqueTensor(const CLUniqueTensor &) = delete;
+ CLUniqueTensor(CLUniqueTensor &&) = delete;
+
+public:
+ ~CLUniqueTensor()
+ {
+ _tensor.allocator()->free();
+ }
+
+public:
+ void allocate()
+ {
+ _tensor.allocator()->allocate();
+ }
+
+public:
+ ::arm_compute::CLTensor &ref(void) { return _tensor; }
+ ::arm_compute::CLTensor *ptr(void) { return &_tensor; }
+
+private:
+ ::arm_compute::CLTensor _tensor;
+};
+
+} // namespace acl
+} // namespace kernel
+} // namespace nnfw
+
+#endif //__NNFW_KERNEL_ACL_CLUNIQUETENSOR_H__
#include "../IO_accessor.h"
#include "../util.h"
#include "../shape.h"
+#include "../CLUniqueTensor.h"
#include <cassert>
namespace kernel {
namespace acl {
-class CLUniqueTensor
-{
-public:
- CLUniqueTensor(const ::arm_compute::TensorInfo &info)
- {
- _tensor.allocator()->init(info);
- }
-
-public:
- // Both copy and move are not allowed
- CLUniqueTensor(const CLUniqueTensor &) = delete;
- CLUniqueTensor(CLUniqueTensor &&) = delete;
-
-public:
- ~CLUniqueTensor()
- {
- _tensor.allocator()->free();
-
- }
-
-public:
- void allocate()
- {
- _tensor.allocator()->allocate();
- }
-
-public:
- ::arm_compute::CLTensor &ref(void) { return _tensor; }
- ::arm_compute::CLTensor *ptr(void) { return &_tensor; }
-
-private:
- ::arm_compute::CLTensor _tensor;
-};
-
// TODO move to separate file
uint32_t getNumItems(const android::nn::Shape& shape)
{