Skip to content

Commit

Permalink
clang-format fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tehkillerbee committed Jan 4, 2022
1 parent d8b02ce commit 008648b
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions csrc/preprocess/cuda/resize_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ class ResizeImpl final : public ::mmdeploy::ResizeImpl {
auto input = src.data<uint8_t>();
auto output = dst.data<uint8_t>();
if (1 == c) {
ret = ppl::cv::cuda::Resize<uint8_t, 1>(stream, h, w, w * c, input, dst_h, dst_w,
dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
ret = ppl::cv::cuda::Resize<uint8_t, 1>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
} else if (3 == c) {
ret = ppl::cv::cuda::Resize<uint8_t, 3>(stream, h, w, w * c, input, dst_h, dst_w,
dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
ret = ppl::cv::cuda::Resize<uint8_t, 3>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
} else if (4 == c) {
ret = ppl::cv::cuda::Resize<uint8_t, 4>(stream, h, w, w * c, input, dst_h, dst_w,
dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
ret = ppl::cv::cuda::Resize<uint8_t, 4>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
} else {
ERROR("unsupported channels {}", c);
return Status(eNotSupported);
Expand All @@ -64,14 +64,14 @@ class ResizeImpl final : public ::mmdeploy::ResizeImpl {
auto input = src.data<float>();
auto output = dst.data<float>();
if (1 == c) {
ret = ppl::cv::cuda::Resize<float, 1>(stream, h, w, w * c, input, dst_h, dst_w,
dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
ret = ppl::cv::cuda::Resize<float, 1>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
} else if (3 == c) {
ret = ppl::cv::cuda::Resize<float, 3>(stream, h, w, w * c, input, dst_h, dst_w,
dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
ret = ppl::cv::cuda::Resize<float, 3>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
} else if (4 == c) {
ret = ppl::cv::cuda::Resize<float, 4>(stream, h, w, w * c, input, dst_h, dst_w,
dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
ret = ppl::cv::cuda::Resize<float, 4>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_LINEAR);
} else {
ERROR("unsupported channels {}", c);
return Status(eNotSupported);
Expand All @@ -96,14 +96,14 @@ class ResizeImpl final : public ::mmdeploy::ResizeImpl {
auto input = src.data<uint8_t>();
auto output = dst.data<uint8_t>();
if (1 == c) {
ret = ppl::cv::cuda::Resize<uint8_t, 1>(stream, h, w, w * c, input, dst_h,
dst_w, dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
ret = ppl::cv::cuda::Resize<uint8_t, 1>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
} else if (3 == c) {
ret = ppl::cv::cuda::Resize<uint8_t, 3>(stream, h, w, w * c, input, dst_h,
dst_w, dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
ret = ppl::cv::cuda::Resize<uint8_t, 3>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
} else if (4 == c) {
ret = ppl::cv::cuda::Resize<uint8_t, 4>(stream, h, w, w * c, input, dst_h,
dst_w, dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
ret = ppl::cv::cuda::Resize<uint8_t, 4>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
} else {
ERROR("unsupported channel {}", c);
return Status(eNotSupported);
Expand All @@ -112,14 +112,14 @@ class ResizeImpl final : public ::mmdeploy::ResizeImpl {
auto input = src.data<float>();
auto output = dst.data<float>();
if (1 == c) {
ret = ppl::cv::cuda::Resize<float, 1>(stream, h, w, w * c, input, dst_h, dst_w,
dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
ret = ppl::cv::cuda::Resize<float, 1>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
} else if (3 == c) {
ret = ppl::cv::cuda::Resize<float, 3>(stream, h, w, w * c, input, dst_h, dst_w,
dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
ret = ppl::cv::cuda::Resize<float, 3>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
} else if (4 == c) {
ret = ppl::cv::cuda::Resize<float, 4>(stream, h, w, w * c, input, dst_h, dst_w,
dst_w * c, output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
ret = ppl::cv::cuda::Resize<float, 4>(stream, h, w, w * c, input, dst_h, dst_w, dst_w * c,
output, ppl::cv::INTERPOLATION_TYPE_NEAREST_POINT);
} else {
ERROR("unsupported channel {}", c);
return Status(eNotSupported);
Expand Down

0 comments on commit 008648b

Please sign in to comment.