/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/kernels/host/remap_host.hpp Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/kernels/host/remap_host.hpp Source File#

1 min read time

Applies to Linux

rocCV: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/kernels/host/remap_host.hpp Source File
remap_host.hpp
Go to the documentation of this file.
1 
23 #pragma once
24 
25 #include <hip/hip_runtime.h>
26 
27 namespace Kernels {
28 namespace Host {
29 template <typename SrcWrapper, typename DstWrapper, typename MapWrapper>
30 void remap(SrcWrapper input, DstWrapper output, MapWrapper map) {
31  for (int b = 0; b < output.batches(); b++) {
32  for (int y = 0; y < output.height(); y++) {
33  for (int x = 0; x < output.width(); x++) {
34  float2 mapCoordinates = map.at(b, y, x, 0);
35  output.at(b, y, x, 0) = input.at(b, mapCoordinates.y, mapCoordinates.x, 0);
36  }
37  }
38  }
39 }
40 } // namespace Host
41 } // namespace Kernels
void remap(SrcWrapper input, DstWrapper output, MapWrapper map)
Definition: remap_host.hpp:30
Definition: non_max_suppression_helpers.hpp:26