/external/tensorflow/tensorflow/core/kernels/image/ |
D | resize_nearest_neighbor_op_gpu.cu.cc | 38 const int out_width, const float height_scale, const float width_scale, in ResizeNearestNeighborNHWC() argument 57 floorf((static_cast<float>(out_x) + 0.5f) * width_scale)), in ResizeNearestNeighborNHWC() 69 const int out_width, const float height_scale, const float width_scale, in LegacyResizeNearestNeighborNHWC() argument 86 min((align_corners) ? static_cast<int>(roundf(out_x * width_scale)) in LegacyResizeNearestNeighborNHWC() 87 : static_cast<int>(floorf(out_x * width_scale)), in LegacyResizeNearestNeighborNHWC() 98 const int out_width, const float height_scale, const float width_scale, in ResizeNearestNeighborBackwardNHWC() argument 117 floorf((static_cast<float>(in_x) + 0.5f) * width_scale)), in ResizeNearestNeighborBackwardNHWC() 129 const int out_width, const float height_scale, const float width_scale, in LegacyResizeNearestNeighborBackwardNHWC() argument 146 min((align_corners) ? static_cast<int>(roundf(in_x * width_scale)) in LegacyResizeNearestNeighborBackwardNHWC() 147 : static_cast<int>(floorf(in_x * width_scale)), in LegacyResizeNearestNeighborBackwardNHWC() [all …]
|
D | resize_nearest_neighbor_op.cc | 73 st.width_scale, output_data); in Compute() 79 st.width_scale, output_data); in Compute() 87 st.width_scale, output_data); in Compute() 93 st.width_scale, output_data); in Compute() 136 const float height_scale, const float width_scale, in operator ()() 163 ? static_cast<Eigen::Index>(roundf(scaler(x, width_scale))) in operator ()() 164 : static_cast<Eigen::Index>(floorf(scaler(x, width_scale))), in operator ()() 189 ? static_cast<Eigen::Index>(roundf(scaler(x, width_scale))) in operator ()() 190 : static_cast<Eigen::Index>(floorf(scaler(x, width_scale))), in operator ()() 274 const float width_scale = in Compute() local [all …]
|
D | resize_bilinear_op_gpu.cu.cc | 38 float height_scale, float width_scale, int batch, int in_height, in ResizeBilinearKernel_faster() argument 58 const float in_x = (static_cast<float>(x) + 0.5f) * width_scale - 0.5f; in ResizeBilinearKernel_faster() 118 float width_scale, int batch, int in_height, int in_width, int channels, in ResizeBilinearKernel() argument 136 const float in_x = (static_cast<float>(x) + 0.5f) * width_scale - 0.5f; in ResizeBilinearKernel() 168 float height_scale, float width_scale, in ResizeBilinearGradKernel() argument 192 (static_cast<float>(x) + 0.5f) * width_scale - 0.5f; in ResizeBilinearGradKernel() 233 float height_scale, float inverse_height_scale, float width_scale, in ResizeBilinearDeterministicGradKernel() argument 254 const float out_x_start = (in_x_start + offset) * width_scale - offset; in ResizeBilinearDeterministicGradKernel() 273 out_x += width_scale; in ResizeBilinearDeterministicGradKernel() 286 float width_scale, int batch, int in_height, int in_width, int channels, in LegacyResizeBilinearKernel() argument [all …]
|
D | resize_area_op_test.cc | 77 const float width_scale = in_width / static_cast<float>(out_width); in ResizeAreaBaseline() local 102 float scale = 1.0 / (height_scale * width_scale); in ResizeAreaBaseline() 113 const float in_x = x * width_scale; in ResizeAreaBaseline() 114 const float in_x1 = (x + 1) * width_scale; in ResizeAreaBaseline() 127 ? (j + 1 > in_x1 ? width_scale : j + 1 - in_x) in ResizeAreaBaseline()
|
D | resize_bilinear_op.cc | 71 st.width_scale, half_pixel_centers_, output_data); in Compute() 288 const float height_scale, const float width_scale, in operator ()() 313 width_scale, xs.data()); in operator ()() 319 width_scale, xs.data()); in operator ()() 359 st.width_scale, half_pixel_centers_, output_grad); in Compute() 371 st.width_scale, half_pixel_centers_, output_grad.tensor<float, 4>()); in Compute() 392 const float height_scale, const float width_scale, in ResizeGradCore() 425 const float in_x = scaler(x, width_scale); in ResizeGradCore() 450 const float height_scale, const float width_scale, in operator ()() 455 width_scale, output_grad); in operator ()() [all …]
|
D | resize_bilinear_op.h | 29 const float height_scale, const float width_scale, 38 const float height_scale, const float width_scale,
|
D | resize_nearest_neighbor_op.h | 29 const float height_scale, const float width_scale, 38 const float height_scale, const float width_scale,
|
D | resize_area_op.cc | 165 const float in_x = x * st.width_scale; in Compute() 166 const float in_x1 = (x + 1) * st.width_scale; in Compute() 173 v < in_x ? (v + 1 > in_x1 ? st.width_scale : v + 1 - in_x) in Compute() 180 v < in_x ? (v + 1 > in_x1 ? st.width_scale : v + 1 - in_x) in Compute() 222 float scale = 1.0 / (st.height_scale * st.width_scale); in ComputeLoop()
|
D | crop_and_resize_op.cc | 255 const float width_scale = in operator ()() local 278 ? x1 * (image_width - 1) + x * width_scale in operator ()() 308 ? x1 * (image_width - 1) + x * width_scale in operator ()() 492 const float width_scale = in operator ()() local 509 ? x1 * (image_width - 1) + x * width_scale in operator ()() 711 const float width_scale = (crop_width > 1) ? (x2 - x1) * width_ratio : 0; in operator ()() local 726 ? x1 * (image_width - 1) + x * width_scale in operator ()()
|
D | crop_and_resize_op_gpu.cu.cc | 173 const float width_scale = in CropAndResizeBackpropImageKernel() local 184 ? x1 * (image_width - 1) + x * width_scale in CropAndResizeBackpropImageKernel() 276 const float width_scale = (crop_width > 1) ? (x2 - x1) * width_ratio : 0; in CropAndResizeBackpropBoxesKernel() local 286 ? x1 * (image_width - 1) + x * width_scale in CropAndResizeBackpropBoxesKernel()
|
D | resize_bilinear_op_test.cc | 96 const float width_scale = in_width / static_cast<float>(out_width); in ResizeBilinearBaseline() local 112 ? (static_cast<float>(x) + 0.5f) * width_scale - 0.5f in ResizeBilinearBaseline() 113 : x * width_scale; in ResizeBilinearBaseline()
|
/external/pytorch/aten/src/ATen/native/cuda/ |
D | UpSampleNearest2d.cu | 50 float width_scale) { in upsample_nearest2d_out_frame() argument 66 : nn_compute_source_index_fn(width_scale, w2, width1); in upsample_nearest2d_out_frame() 93 float width_scale, in upsample_nearest2d_nhwc_out_frame() argument 105 const size_t w1 = width1 == width2 ? w2 : nn_compute_source_index_fn(width_scale, w2, width1); in upsample_nearest2d_nhwc_out_frame() 124 float width_scale) { in upsample_nearest2d_backward_out_frame() argument 146 nn_bw_compute_source_index_fn(width_scale, dst_x, src_dim_w); in upsample_nearest2d_backward_out_frame() 148 width_scale, dst_x + 1, src_dim_w); in upsample_nearest2d_backward_out_frame() 175 const float width_scale, in upsample_nearest2d_backward_nhwc_out_frame() argument 192 int w1 = nn_bw_compute_source_index_fn(width_scale, w2, width1); in upsample_nearest2d_backward_nhwc_out_frame() 193 int w1_up = nn_bw_compute_source_index_fn(width_scale, w2 + 1, width1); in upsample_nearest2d_backward_nhwc_out_frame() [all …]
|
D | UpSampleNearest3d.cu | 56 float width_scale) { in upsample_nearest3d_out_frame() argument 73 int src_x = nn_compute_source_index_fn(width_scale, dst_x, src_dim_w); in upsample_nearest3d_out_frame() 101 float width_scale) { in upsample_nearest3d_backward_out_frame() argument 127 int src_x = nn_bw_compute_source_index_fn(width_scale, dst_x, src_dim_w); in upsample_nearest3d_backward_out_frame() 128 int src_x_up = nn_bw_compute_source_index_fn(width_scale, dst_x+1, src_dim_w); in upsample_nearest3d_backward_out_frame() 196 const float width_scale = compute_scales_value<float>(scales_w, input_width, output_width); in upsample_nearest3d_out_cuda_template() local 212 width_scale); in upsample_nearest3d_out_cuda_template() 272 … float width_scale = compute_scales_value_backwards<float>(scales_w, output_width, input_width); in upsample_nearest3d_backward_out_cuda_template() local 288 width_scale); in upsample_nearest3d_backward_out_cuda_template()
|
D | UpSampleBilinear2d.cu | 476 const accscalar_t width_scale, in upsample_gen2d_aa_out_frame() argument 499 (width_scale >= 1.0) ? (interp_filter.size * half) * width_scale : interp_filter.size * half); in upsample_gen2d_aa_out_frame() 516 output_x, input_width, width_scale, support_w, xmin, xsize, xcenter); in upsample_gen2d_aa_out_frame() 525 width_scale, in upsample_gen2d_aa_out_frame() 570 const accscalar_t width_scale, in upsample_gen2d_aa_backward_out_frame() argument 604 (width_scale >= 1.0) ? (interp_filter.size * 0.5) * width_scale in upsample_gen2d_aa_backward_out_frame() 619 output_x, input_width, width_scale, support_w, xmin, xsize, xcenter); in upsample_gen2d_aa_backward_out_frame() 628 width_scale, in upsample_gen2d_aa_backward_out_frame() 714 const accscalar_t width_scale = area_pixel_compute_scale<accscalar_t>( in upsample_gen2d_aa_out_cuda_template() local 728 … (width_scale >= 1.0) ? interp_filter.size * 0.5 * width_scale : interp_filter.size * 0.5); in upsample_gen2d_aa_out_cuda_template() [all …]
|
D | UpSampleBicubic2d.cu | 27 const accscalar_t width_scale, in upsample_bicubic2d_out_frame() argument 60 width_scale, output_x, align_corners, /*cubic=*/true); in upsample_bicubic2d_out_frame() 102 const accscalar_t width_scale, in upsample_bicubic2d_backward_out_frame() argument 133 width_scale, output_x, align_corners, /*cubic=*/true); in upsample_bicubic2d_backward_out_frame()
|
/external/tensorflow/tensorflow/core/util/ |
D | image_resizer_state.h | 127 width_scale = CalculateResizeScale(in_width, out_width, align_corners_); in ValidateAndCalculateOutputSize() 137 ceilf((out_width - 1) * width_scale) <= static_cast<float>(INT_MAX), in ValidateAndCalculateOutputSize() 164 float width_scale; member 232 width_scale = in ValidateAndCreateOutput() 249 float width_scale; member
|
/external/XNNPACK/src/ |
D | indirection.c | 360 const float width_scale = in xnn_indirection_init_resize_bilinear2d_hwc_f16() local 378 const float input_x = (float) (int32_t) output_x * width_scale; in xnn_indirection_init_resize_bilinear2d_hwc_f16() 401 const float width_offset = 0.5f * width_scale - 0.5f; in xnn_indirection_init_resize_bilinear2d_hwc_f16() 410 float input_x = (float) (int32_t) output_x * width_scale + width_offset; in xnn_indirection_init_resize_bilinear2d_hwc_f16() 456 const float width_scale = in xnn_indirection_init_resize_bilinear2d_hwc_f32() local 473 const float input_x = (float) (int32_t) output_x * width_scale; in xnn_indirection_init_resize_bilinear2d_hwc_f32() 496 const float width_offset = 0.5f * width_scale - 0.5f; in xnn_indirection_init_resize_bilinear2d_hwc_f32() 505 float input_x = (float) (int32_t) output_x * width_scale + width_offset; in xnn_indirection_init_resize_bilinear2d_hwc_f32() 551 const float width_scale = in xnn_indirection_init_resize_bilinear2d_hwc_q11() local 568 const float input_x = (float) (int32_t) output_x * width_scale; in xnn_indirection_init_resize_bilinear2d_hwc_q11() [all …]
|
/external/pytorch/aten/src/ATen/native/quantized/cpu/ |
D | UpSampleNearest2d.cpp | 42 float width_scale = compute_scales_value<float>(scales_w, input_width, output_width); in upsample_nearest2d_out_frame() local 61 const int64_t w1 = nn_compute_source_index_fn(width_scale, w2, input_width); in upsample_nearest2d_out_frame() 98 float width_scale = compute_scales_value<float>(scales_w, input_width, output_width); in upsample_nearest2d_out_frame_nhwc() local 109 const int64_t w1 = nn_compute_source_index_fn(width_scale, w2, input_width); in upsample_nearest2d_out_frame_nhwc()
|
D | UpSampleNearest3d.cpp | 44 float width_scale = compute_scales_value<float>(scales_w, input_width, output_width); in upsample_nearest3d_out_frame() local 69 nn_compute_source_index_fn(width_scale, w2, input_width); in upsample_nearest3d_out_frame() 101 float width_scale = compute_scales_value<float>(scales_w, input_width, output_width); in upsample_nearest3d_out_frame_nhwc() local 121 nn_compute_source_index_fn(width_scale, w2, input_width); in upsample_nearest3d_out_frame_nhwc()
|
/external/tensorflow/tensorflow/core/kernels/ |
D | quantized_resize_bilinear_op.cc | 473 const float height_scale, const float width_scale, in ResizeImageReference() argument 480 out_width, in_width, width_scale, channels, 0, half_pixel_centers); in ResizeImageReference() 522 const float height_scale, const float width_scale, in ResizeImage() argument 527 out_width, channels, height_scale, width_scale, in ResizeImage() 536 const float height_scale, const float width_scale, in ResizeImage() argument 547 BuildLerpCache<int32>(out_width, in_width, width_scale, channels, in ResizeImage() 599 const float height_scale, const float width_scale, in ResizeImage() argument 610 BuildLerpCache<int16>(out_width, in_width, width_scale, channels, in ResizeImage() 661 const float height_scale, const float width_scale, in ResizeBilinear() argument 683 out_width, channels, height_scale, width_scale, in ResizeBilinear() [all …]
|
D | quantized_resize_bilinear_op_test.cc | 116 const float height_scale, const float width_scale, in CalcReferenceResizedVal() argument 120 half_pixel_centers, out_width, in_width, channels, x, width_scale); in CalcReferenceResizedVal() 157 const float width_scale = in CheckTensorValue() local 166 out_height, out_width, channels, height_scale, width_scale, min, in CheckTensorValue()
|
/external/tensorflow/tensorflow/lite/kernels/internal/reference/ |
D | resize_bilinear.h | 81 float width_scale = static_cast<float>(input_width) / output_width; in ResizeBilinear() local 86 width_scale = static_cast<float>(input_width - 1) / (output_width - 1); in ResizeBilinear() 99 ComputeInterpolationValues(x, width_scale, op_params.half_pixel_centers, in ResizeBilinear()
|
/external/pytorch/aten/src/ATen/native/cpu/ |
D | UpSampleMoreKernel.cpp | 462 const opmath_t width_scale = area_pixel_compute_scale<opmath_t>( in cpu_upsample_linear_backward() local 472 … iw0, iw1, w0lambda, w1lambda, width_scale, ow, input_width, output_width, align_corners); in cpu_upsample_linear_backward() 497 const opmath_t width_scale = area_pixel_compute_scale<opmath_t>( in cpu_upsample_linear_backward() local 510 … iw0, iw1, w0lambda, w1lambda, width_scale, ow, input_width, output_width, align_corners); in cpu_upsample_linear_backward() 540 const opmath_t width_scale = area_pixel_compute_scale<opmath_t>( in cpu_upsample_linear_backward() local 556 … iw0, iw1, w0lambda, w1lambda, width_scale, ow, input_width, output_width, align_corners); in cpu_upsample_linear_backward() 640 const opmath_t width_scale = area_pixel_compute_scale<opmath_t>( in cpu_upsample_linear_backward_channels_last() local 657 … iw0, iw1, w0lambda, w1lambda, width_scale, ow, input_width, output_width, align_corners); in cpu_upsample_linear_backward_channels_last() 689 const opmath_t width_scale = area_pixel_compute_scale<opmath_t>( in cpu_upsample_linear_backward_channels_last() local 709 … iw0, iw1, w0lambda, w1lambda, width_scale, ow, input_width, output_width, align_corners); in cpu_upsample_linear_backward_channels_last()
|
/external/mesa3d/src/vulkan/util/ |
D | vk_format.h | 296 const uint8_t width_scale = ycbcr_info ? in vk_format_get_plane_width() local 298 return width / width_scale; in vk_format_get_plane_width()
|
/external/XNNPACK/test/ |
D | resize-bilinear-operator-tester.h | 90 inline float width_scale() const { in width_scale() function 251 const float input_x = (float(output_x) + offset) * width_scale() - offset; in TestNHWCxF16() 336 const float input_x = (float(output_x) + offset) * width_scale() - offset; in TestNHWCxF32() 418 const float input_x = (float(output_x) + offset) * width_scale() - offset; in TestNHWCxS8() 501 const float input_x = (float(output_x) + offset) * width_scale() - offset; in TestNHWCxU8() 587 const float input_x = (float(output_x) + offset) * width_scale() - offset; in TestNCHWxF32()
|