From b836201bf0f21139d331b919bf544328c6b21e3d Mon Sep 17 00:00:00 2001 From: eclipsess Date: Mon, 28 May 2018 16:31:06 +0800 Subject: [PATCH] code style --- src/operators/kernel/arm/concat_kernel.cpp | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/src/operators/kernel/arm/concat_kernel.cpp b/src/operators/kernel/arm/concat_kernel.cpp index 1e5217e3f1..2a653234a6 100644 --- a/src/operators/kernel/arm/concat_kernel.cpp +++ b/src/operators/kernel/arm/concat_kernel.cpp @@ -51,38 +51,38 @@ class ConcatFunctor { } } }; -template -void StridedNumelCopyWithAxis(int64_t axis, T *dst, - const framework::DDim &dst_stride_numel, - const T *src, - const framework::DDim &src_stride_numel, - int64_t size) { - int64_t before = dst_stride_numel[0] / dst_stride_numel[axis]; - int64_t src_after = src_stride_numel[axis]; - int64_t dst_after = dst_stride_numel[axis]; - - /// "src and dst tensor should have the same dims size." - assert(src_stride_numel.size() == dst_stride_numel.size()); - - for (int64_t i = 0; i < axis; ++i) { - if (i < axis) { - /// src and dst should have the same elements - /// except the specified axis. - assert(src_stride_numel[i] / src_stride_numel[axis] == - dst_stride_numel[i] / dst_stride_numel[axis]); - - } else if (i == axis) { - continue; - } else { - /// "src and dst should have the same elements " - /// "except the specified axis." - assert(src_stride_numel[i] == dst_stride_numel[i]); - } - } - for (int64_t i = 0; i < before; ++i) { - memory::Copy(dst + i * dst_after, src + i * src_after, sizeof(T) * size); - } -} +// template +// void StridedNumelCopyWithAxis(int64_t axis, T *dst, +// const framework::DDim &dst_stride_numel, +// const T *src, +// const framework::DDim &src_stride_numel, +// int64_t size) { +// int64_t before = dst_stride_numel[0] / dst_stride_numel[axis]; +// int64_t src_after = src_stride_numel[axis]; +// int64_t dst_after = dst_stride_numel[axis]; +// +// /// "src and dst tensor should have the same dims size." +// assert(src_stride_numel.size() == dst_stride_numel.size()); +// +// for (int64_t i = 0; i < axis; ++i) { +// if (i < axis) { +// /// src and dst should have the same elements +// /// except the specified axis. +// assert(src_stride_numel[i] / src_stride_numel[axis] == +// dst_stride_numel[i] / dst_stride_numel[axis]); +// +// } else if (i == axis) { +// continue; +// } else { +// /// "src and dst should have the same elements " +// /// "except the specified axis." +// assert(src_stride_numel[i] == dst_stride_numel[i]); +// } +// } +// for (int64_t i = 0; i < before; ++i) { +// memory::Copy(dst + i * dst_after, src + i * src_after, sizeof(T) * size); +// } +//} template <> void ConcatKernel::Compute(const ConcatParam ¶m) const { -- GitLab