diff --git a/mace/dsp/BUILD b/mace/dsp/BUILD index ca0183822ff2c6313bf8b1f8faa112becb3ef4b3..8deaa99dc6ba867cbf5511bdeec70f7cfd7a7a8e 100644 --- a/mace/dsp/BUILD +++ b/mace/dsp/BUILD @@ -24,7 +24,7 @@ cc_library( "*.h", "hexagon/*.h", ]), - copts = ["-std=c++11"], + copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"], deps = [ "//mace/proto:cc_proto", "//mace/core:core", @@ -36,7 +36,7 @@ cc_test( name = "dsp_test", testonly = 1, srcs = glob(["*_test.cc"]), - copts = ["-std=c++11"], + copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"], linkopts = if_android([ "-ldl", "-lm", @@ -52,7 +52,7 @@ cc_test( name = "dsp_op_test", testonly = 1, srcs = glob(["test/*_test.cc"]), - copts = ["-std=c++11"], + copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"], linkopts = if_android([ "-ldl", "-lm", diff --git a/mace/dsp/hexagon_control_wrapper.h b/mace/dsp/hexagon_control_wrapper.h index 9ef1113f5f18569012b735929989b67d67b3cafc..3fe1b3a7053ecca97f4391ab0c88dee93b53de07 100644 --- a/mace/dsp/hexagon_control_wrapper.h +++ b/mace/dsp/hexagon_control_wrapper.h @@ -96,8 +96,8 @@ class HexagonControlWrapper { int res = hexagon_nn_execute_new(nn_id_, inputs, num_inputs, outputs, num_outputs); - delete(inputs); - delete(outputs); + delete [] inputs; + delete [] outputs; return res == 0; }; diff --git a/mace/dsp/util/BUILD b/mace/dsp/util/BUILD index 4a75e104fccca2214cd0ffbf014a8c224614d9f4..e5730b285116454ca7c15d5dd08110d3da7c3f42 100644 --- a/mace/dsp/util/BUILD +++ b/mace/dsp/util/BUILD @@ -20,7 +20,7 @@ cc_library( hdrs = glob([ "*.h", ]), - copts = ["-std=c++11"], + copts = ["-std=c++11", "-D_GLIBCXX_USE_C99_MATH_TR1"], deps = [ "//mace/core:core", ],