*/
#include <blas_neon.h>
+#include <memory>
#include <nntrainer_error.h>
#include <nntrainer_log.h>
if (cols % 16 == 0) {
unsigned int n = cols / 16;
bool *initialized = (bool *)malloc(sizeof(bool) * n);
- if (initialized == nullptr) {
- ml_loge("failed to malloc");
- return;
- }
unsigned int step;
for (unsigned int i = 0; i < cols / 16; ++i) {
return;
} else if (cols % 4 == 0) {
unsigned int n = cols / 4;
- bool *initialized = (bool *)malloc(sizeof(bool) * n);
+ auto initialized = std::make_unique<bool[]>(n);
if (initialized == nullptr) {
ml_loge("Error : Memory allocation failed");
return;
vst1q_f32(&y[0], y0_3);
}
}
- free(initialized);
}
return;
name(name_),
data(nullptr),
offset(0),
+ output_axis(3),
src_tensor() {}
/**
offset = 0;
contiguous = true;
initializer = Initializer::NONE;
-
+ output_axis = 3;
// if fm == Tformat::NCHW, then dim[0] == batch , dim[1] == channel, dim[2]
// == height, dim[3] == width. and if fm == Tformat::NHWC, dim[0] == batch,
// dim[1] == height, dim[2] == width, dim[3] == channel
offset = 0;
contiguous = true;
initializer = Initializer::NONE;
+ output_axis = 3;
// if fm == Tformat::NCHW, then dim[0] == batch , dim[1] == channel, dim[2]
// == height, dim[3] == width. and if fm == Tformat::NHWC, dim[0] == batch,