From 7ce1b6e22a78e8588a5ee7cfd45e87cd9a5673e2 Mon Sep 17 00:00:00 2001 From: Tao Lv Date: Mon, 9 Dec 2019 15:25:01 +0800 Subject: [PATCH] mshadow: fix vector access --- 3rdparty/mshadow/mshadow/dot_engine-inl.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/3rdparty/mshadow/mshadow/dot_engine-inl.h b/3rdparty/mshadow/mshadow/dot_engine-inl.h index 21816f209e40..1a02eb9a39d8 100644 --- a/3rdparty/mshadow/mshadow/dot_engine-inl.h +++ b/3rdparty/mshadow/mshadow/dot_engine-inl.h @@ -312,12 +312,9 @@ struct BLASEngine { CBLAS_TRANSPOSE p_transa[GROUP_SIZE] = {cblas_a_trans}; CBLAS_TRANSPOSE p_transb[GROUP_SIZE] = {cblas_b_trans}; - std::vector pp_A; - std::vector pp_B; - std::vector pp_C; - pp_A.reserve(batch_count); - pp_B.reserve(batch_count); - pp_C.reserve(batch_count); + std::vector pp_A(batch_count, nullptr); + std::vector pp_B(batch_count, nullptr); + std::vector pp_C(batch_count, nullptr); auto m_k = m * k; auto k_n = k * n;