diff --git a/mace/kernels/benchmark/batch_norm_benchmark.cc b/mace/kernels/benchmark/batch_norm_benchmark.cc index a5e5279639dad37af4ed341068eeb74da3fd30ea..338255873861729b478fa9710a1eac67d29e265a 100644 --- a/mace/kernels/benchmark/batch_norm_benchmark.cc +++ b/mace/kernels/benchmark/batch_norm_benchmark.cc @@ -13,7 +13,7 @@ static void BatchNorm(int iters, int batch, int channels, int height, int width) std::mt19937 gen(rd()); std::normal_distribution nd(0, 1); - TIndex input_size = batch * channels * height * width; + index_t input_size = batch * channels * height * width; std::vector input(input_size, 0.0); std::vector scale(channels, 0.0); std::vector offset(channels, 0.0); @@ -50,7 +50,7 @@ static void BatchNorm(int iters, int batch, int channels, int height, int width) #define BM_BATCH_NORM_MACRO(N, C, H, W, TYPE, DEVICE) \ static void BM_BATCH_NORM_##N##_##C##_##H##_##W##_##TYPE##_##DEVICE( \ int iters) { \ - const int64 tot = static_cast(iters) * N * C * H * W; \ + const int64_t tot = static_cast(iters) * N * C * H * W; \ mace::testing::ItemsProcessed(tot); \ mace::testing::BytesProcessed(tot * (sizeof(TYPE)));\ BatchNorm(iters, N, C, H, W); \ diff --git a/mace/kernels/test/batch_norm_neon_test.cc b/mace/kernels/test/batch_norm_neon_test.cc index 32a6c1f9ad0c72c1c4ef54164e2613c3333f03cd..b33b316c109fe303d0e99e3e663f88712e0d770c 100644 --- a/mace/kernels/test/batch_norm_neon_test.cc +++ b/mace/kernels/test/batch_norm_neon_test.cc @@ -15,12 +15,12 @@ TEST(BatchNormNeonTest, Simple) { srand(time(NULL)); // generate random input - TIndex batch = 1 + rand() % 128; - TIndex channels = 3; - TIndex height = 2 + rand() % 100; - TIndex width = 2 + rand() % 100; + index_t batch = 1 + rand() % 128; + index_t channels = 3; + index_t height = 2 + rand() % 100; + index_t width = 2 + rand() % 100; - TIndex input_size = batch * channels * height * width; + index_t input_size = batch * channels * height * width; std::vector input(input_size, 0.0); std::vector scale(channels, 0.0); std::vector offset(channels, 0.0); @@ -64,7 +64,7 @@ TEST(BatchNormNeonTest, Simple) { output_neon.get() ); - for (TIndex i = 0; i < input_size; ++i) { + for (index_t i = 0; i < input_size; ++i) { EXPECT_FLOAT_EQ(output[i], output_neon[i]); }