提交 51ca5d0d 编写于 作者: Y yejianwu

support ubuntu18 with gcc7.3

上级 af264bfb
......@@ -39,7 +39,7 @@ int MaceOpenMPThreadCount = 1;
namespace {
int GetCPUCount() {
char path[32];
char path[64];
int cpu_count = 0;
int result = 0;
......
......@@ -16,6 +16,7 @@
#define MACE_KERNELS_ACTIVATION_H_
#include <algorithm>
#include <cmath>
#include <memory>
#include <string>
#include <vector>
......
......@@ -15,6 +15,7 @@
#include "mace/kernels/conv_pool_2d_util.h"
#include <algorithm>
#include <cmath>
#include <vector>
namespace mace {
......
......@@ -16,6 +16,7 @@
#define MACE_KERNELS_ELTWISE_H_
#include <algorithm>
#include <cmath>
#include <functional>
#include <memory>
#include <utility>
......
......@@ -16,6 +16,7 @@
#define MACE_KERNELS_GATHER_H_
#include <algorithm>
#include <cmath>
#include <functional>
#include <vector>
......
......@@ -16,6 +16,7 @@
#define MACE_KERNELS_LOCAL_RESPONSE_NORM_H_
#include <algorithm>
#include <cmath>
#include <memory>
#include <vector>
......
......@@ -15,6 +15,7 @@
#ifndef MACE_KERNELS_QUANTIZE_H_
#define MACE_KERNELS_QUANTIZE_H_
#include <cmath>
#include <vector>
#include <algorithm>
#include <limits>
......
......@@ -16,6 +16,7 @@
#define MACE_KERNELS_RESIZE_BICUBIC_H_
#include <algorithm>
#include <cmath>
#include <memory>
#include <vector>
......
......@@ -965,7 +965,7 @@ void SGemm::PackPerBatch(const MatrixMap<const float> &src,
const index_t width = src.col();
auto src_data = src.batch_data(batch_index);
if (src.major() == Major::RowMajor && order == PackOrder::ColMajor) {
if (src.map_major() == Major::RowMajor && order == PackOrder::ColMajor) {
// This is for packing no-transpose lhs.
index_t h = 0;
#if defined(MACE_ENABLE_NEON)
......@@ -1011,7 +1011,8 @@ void SGemm::PackPerBatch(const MatrixMap<const float> &src,
for (index_t ih = h; ih < height; ++ih) {
std::copy_n(src_data + ih * width, width, packed_data + ih * width);
}
} else if (src.major() == Major::ColMajor && order == PackOrder::ColMajor) {
} else if (src.map_major() == Major::ColMajor &&
order == PackOrder::ColMajor) {
// This is for packing transpose-needed lhs.
index_t h = 0;
#if defined(MACE_ENABLE_NEON)
......@@ -1052,7 +1053,8 @@ void SGemm::PackPerBatch(const MatrixMap<const float> &src,
packed_data_ptr[w] = src_data_ptr[w * height];
}
}
} else if (src.major() == Major::RowMajor && order == PackOrder::RowMajor) {
} else if (src.map_major() == Major::RowMajor &&
order == PackOrder::RowMajor) {
// This is for packing no-transpose rhs.
index_t w = 0;
#if defined(MACE_ENABLE_NEON)
......@@ -1077,7 +1079,8 @@ void SGemm::PackPerBatch(const MatrixMap<const float> &src,
packed_data_ptr[h] = src_data_ptr[h * width];
}
}
} else if (src.major() == Major::ColMajor && order == PackOrder::RowMajor) {
} else if (src.map_major() == Major::ColMajor &&
order == PackOrder::RowMajor) {
// This is for packing transpose-needed rhs.
index_t w = 0;
#if defined(MACE_ENABLE_NEON)
......@@ -1113,7 +1116,7 @@ void SGemm::UnPackPerBatch(const float *packed_data,
const index_t width = matrix_map->col();
auto unpacked_data = matrix_map->batch_data(batch_index);
if (matrix_map->major() == Major::RowMajor) {
if (matrix_map->map_major() == Major::RowMajor) {
// This is for non-transposed result
index_t w = 0;
#if defined(MACE_ENABLE_NEON)
......
......@@ -74,7 +74,7 @@ class MatrixMap {
return stride_;
}
Major major() const {
Major map_major() const {
return major_;
}
......
......@@ -16,6 +16,7 @@
#define MACE_KERNELS_STRIDED_SLICE_H_
#include <algorithm>
#include <cmath>
#include <memory>
#include <vector>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册