file(GLOB_RECURSE SOURCES_LINEAR "src/linear/*.cc")
file(GLOB_RECURSE SOURCES_CODEGEN "src/codegen/*.cc")
file(GLOB_RECURSE SOURCES_VERIFIER "src/verifier/*.cc")
+file(GLOB_RECURSE SOURCES_VERIFIER "src/util/*.cc")
set(SOURCES ${SOURCES} ${SOURCES_FRONTEND} ${SOURCES_BACKEND} ${SOURCES_INTERNAL} ${SOURCES_GRAPH} ${SOURCES_LINEAR} ${SOURCES_CODEGEN} ${SOURCES_VERIFIER})
#include <util/tensor/Shape.h>
#include "backend/cpu/operand/Tensor.h" // TODO Remove this dependency to backend
-#include "internal/nnapi/feature/View.h"
-#include "internal/nnapi/feature/Reader.h"
+#include "util/feature/nhwc/View.h"
+#include "util/feature/nhwc/Reader.h"
namespace neurun
{
else if (typeid(tensor) == typeid(::arm_compute::CLTensor))
{
const ::internal::arm_compute::feature::View<T> from{&tensor};
- ::internal::nnapi::feature::View<T> into{_shape, _base, _size};
+ util::feature::nhwc::View<T> into{_shape, _base, _size};
::nnfw::util::feature::iterate(_shape)
<< [&](uint32_t bat, uint32_t ch, uint32_t row, uint32_t col) {
#include <util/tensor/Shape.h>
#include "backend/cpu/operand/Tensor.h" // TODO Remove this dependency to backend
-#include "internal/nnapi/feature/Reader.h"
-#include "internal/nnapi/feature/View.h"
+#include "util/feature/nhwc/Reader.h"
+#include "util/feature/nhwc/View.h"
#include "backend/acl_cl/feature/View.h"
}
else if (typeid(tensor) == typeid(::arm_compute::CLTensor))
{
- const ::internal::nnapi::feature::Reader<T> from{_shape, _base, _size};
+ const util::feature::nhwc::Reader<T> from{_shape, _base, _size};
::internal::arm_compute::feature::View<T> into{&tensor};
::nnfw::util::feature::iterate(_shape)
#include "PermuteLayer.h"
-#include "internal/nnapi/feature/Reader.h"
-#include "internal/nnapi/feature/View.h"
+#include "util/feature/nhwc/Reader.h"
+#include "util/feature/nhwc/View.h"
#include "backend/acl_cl/feature/View.h"
#include <util/feature/IndexIterator.h>
{
case Type::NHWC_TO_NCHW:
{
- const ::internal::nnapi::feature::Reader<float> from{
+ const util::feature::nhwc::Reader<float> from{
feature, reinterpret_cast<const float *>(input_buffer), input_size};
::internal::arm_compute::feature::View<float> into{_output};
_input_cl->map(queue);
const ::internal::arm_compute::feature::View<float> from{_input};
- ::internal::nnapi::feature::View<float> into{
- feature, reinterpret_cast<float *>(output_buffer), output_size};
+ util::feature::nhwc::View<float> into{feature, reinterpret_cast<float *>(output_buffer),
+ output_size};
::nnfw::util::feature::iterate(feature)
<< [&](uint32_t batch, uint32_t ch, uint32_t row, uint32_t col) {
#include <arm_compute/runtime/IFunction.h>
#include <arm_compute/core/ITensor.h>
-#include "internal/nnapi/feature/View.h"
+#include "util/feature/nhwc/View.h"
#include "OperationUtils.h"
namespace neurun
* limitations under the License.
*/
-#ifndef __INTERNAL_NNAPI_FEATURE_READER_H__
-#define __INTERNAL_NNAPI_FEATURE_READER_H__
+#ifndef __NEURUN_UTIL_FEATURE_NHWC_READER_H__
+#define __NEURUN_UTIL_FEATURE_NHWC_READER_H__
-#include "internal/nnapi/feature/Utils.h"
+#include "Utils.h"
#include "util/feature/Reader.h"
-namespace internal
+namespace neurun
{
-namespace nnapi
+namespace util
{
namespace feature
{
+namespace nhwc
+{
template <typename T> class Reader final : public nnfw::util::feature::Reader<T>
{
const T *_ptr;
};
+} // namespace nhwc
} // namespace feature
-} // namespace nnapi
-} // namespace internal
+} // namespace util
+} // namespace neurun
-#endif // __INTERNAL_NNAPI_FEATURE_READER_H__
+#endif // __NEURUN_UTIL_FEATURE_NHWC_READER_H__
* limitations under the License.
*/
-#ifndef __INTERNAL_NNAPI_FEATURE_UTILS_H__
-#define __INTERNAL_NNAPI_FEATURE_UTILS_H__
+#ifndef __NEURUN_UTIL_FEATURE_NHWC_UTILS_H__
+#define __NEURUN_UTIL_FEATURE_NHWC_UTILS_H__
#include "util/feature/Shape.h"
-namespace internal
+namespace neurun
{
-namespace nnapi
+namespace util
{
namespace feature
{
+namespace nhwc
+{
inline uint32_t index_of(const ::nnfw::util::feature::Shape &shape, uint32_t ch, uint32_t row,
uint32_t col)
return res;
}
+} // namespace nhwc
} // namespace feature
-} // namespace nnapi
-} // namespace internal
+} // namespace util
+} // namespace neurun
-#endif // __INTERNAL_NNAPI_FEATURE_UTILS_H__
+#endif // __NEURUN_UTIL_FEATURE_NHWC_UTILS_H__
* limitations under the License.
*/
-#ifndef __INTERNAL_NNAPI_FEATURE_VIEW_H__
-#define __INTERNAL_NNAPI_FEATURE_VIEW_H__
+#ifndef __NEURUN_UTIL_FEATURE_NHWC_VIEW_H__
+#define __NEURUN_UTIL_FEATURE_NHWC_VIEW_H__
#include <cassert>
-#include "internal/nnapi/feature/Utils.h"
+#include "Utils.h"
#include "util/feature/Reader.h"
-namespace internal
+namespace neurun
{
-namespace nnapi
+namespace util
{
namespace feature
{
+namespace nhwc
+{
template <typename T> class View final : public nnfw::util::feature::Reader<T>
{
T *_ptr;
};
+} // namespace nhwc
} // namespace feature
-} // namespace nnapi
-} // namespace internal
+} // namespace util
+} // namespace neurun
-#endif // __INTERNAL_NNAPI_FEATURE_VIEW_H__
+#endif // __NEURUN_UTIL_FEATURE_NHWC_VIEW_H__