From 44b630fc222c6e22446c20995411994b51bc2f21 Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Mon, 22 Oct 2018 22:12:58 +0200 Subject: Some name changes in im2col code --- src/routines/levelx/xim2col.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/routines/levelx/xim2col.cpp') diff --git a/src/routines/levelx/xim2col.cpp b/src/routines/levelx/xim2col.cpp index dfbb4bb5..09dcc42c 100644 --- a/src/routines/levelx/xim2col.cpp +++ b/src/routines/levelx/xim2col.cpp @@ -41,23 +41,23 @@ void Xim2col::DoIm2col(const size_t channels, const size_t height, const size // Makes sure all dimensions are larger than zero if ((channels == 0) || (height == 0) || (width == 0)) { throw BLASError(StatusCode::kInvalidDimension); } - // Sets the output height and width + // Sets the height and width of the 'col' result const auto size_h = height + 2 * pad_h; const auto padding_h = dilation_h * (kernel_h - 1) + 1; - const auto output_h = (size_h >= padding_h) ? (size_h - padding_h) / stride_h + 1 : 1; + const auto col_h = (size_h >= padding_h) ? (size_h - padding_h) / stride_h + 1 : 1; const auto size_w = width + 2 * pad_w; const auto padding_w = dilation_w * (kernel_w - 1) + 1; - const auto output_w = (size_w >= padding_w) ? (size_w - padding_w) / stride_w + 1 : 1; + const auto col_w = (size_w >= padding_w) ? (size_w - padding_w) / stride_w + 1 : 1; - // Retrieves the Xcopy kernel from the compiled binary + // Retrieves the kernel from the compiled binary auto kernel = Kernel(program_, "im2col"); // Sets the kernel arguments kernel.SetArgument(0, static_cast(height)); kernel.SetArgument(1, static_cast(width)); kernel.SetArgument(2, static_cast(channels)); - kernel.SetArgument(3, static_cast(output_h)); - kernel.SetArgument(4, static_cast(output_w)); + kernel.SetArgument(3, static_cast(col_h)); + kernel.SetArgument(4, static_cast(col_w)); kernel.SetArgument(5, static_cast(kernel_h)); kernel.SetArgument(6, static_cast(kernel_w)); kernel.SetArgument(7, static_cast(pad_h)); @@ -72,8 +72,8 @@ void Xim2col::DoIm2col(const size_t channels, const size_t height, const size kernel.SetArgument(16, static_cast(col_offset)); // Launches the kernel - const auto w_ceiled = Ceil(output_w, db_["COPY_DIMX"]); - const auto h_ceiled = Ceil(output_h, db_["COPY_DIMY"]); + const auto w_ceiled = Ceil(col_w, db_["COPY_DIMX"]); + const auto h_ceiled = Ceil(col_h, db_["COPY_DIMY"]); const auto global = std::vector{w_ceiled, h_ceiled * channels}; const auto local = std::vector{db_["COPY_DIMX"], db_["COPY_DIMY"]}; RunKernel(kernel, queue_, device_, global, local, event_); -- cgit v1.2.3