/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/kernels/device/composite_device.hpp Source File#
3 min read time
Applies to Linux
composite_device.hpp
Go to the documentation of this file.
31 __global__ void composite(SrcWrapper foreground, SrcWrapper background, MaskWrapper mask, DstWrapper output) {
43 // Range cast all input values to float to avoid overflowing values and keep them in the same range.
50 // If number of channels in output is 4, ensure that the last channel (alpha in this case) is always fully on.
52 output.at(batch, y, x, 0) = RangeCast<dst_type>((MakeType<float, 4>){result.x, result.y, result.z, 1.0f});
__global__ void composite(SrcWrapper foreground, SrcWrapper background, MaskWrapper mask, DstWrapper output)
Definition: composite_device.hpp:31
Definition: non_max_suppression_helpers.hpp:26
Definition: strided_data_wrap.hpp:33